The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
.travis.yml 013
Changes 022
MANIFEST 283646
META.json 034
META.yml 2018
Makefile.PL 1354
README 1010
README.md 0103
lib/Memcached/libmemcached/API.pm 11
lib/Memcached/libmemcached/constants.pm 221
libmemcached.pm 1519
libmemcached.xs 1114
src/README 512
src/libmemcached/.quickly 50
src/libmemcached/COPYING 11
src/libmemcached/ChangeLog 0138
src/libmemcached/Makefile.am 59117
src/libmemcached/Makefile.in 25939614
src/libmemcached/README 313
src/libmemcached/README.FIRST 11
src/libmemcached/README.win32 025
src/libmemcached/aclocal.m4 326377
src/libmemcached/build-aux/config.guess 01558
src/libmemcached/build-aux/config.sub 01791
src/libmemcached/build-aux/depcomp 0791
src/libmemcached/build-aux/install-sh 0527
src/libmemcached/build-aux/ltmain.sh 09655
src/libmemcached/build-aux/missing 0216
src/libmemcached/build-aux/test-driver 0127
src/libmemcached/clients/client_options.h 66
src/libmemcached/clients/execute.c 1310
src/libmemcached/clients/execute.cc 0142
src/libmemcached/clients/execute.h 510
src/libmemcached/clients/generator.c 960
src/libmemcached/clients/generator.cc 0109
src/libmemcached/clients/generator.h 27
src/libmemcached/clients/include.am 5878
src/libmemcached/clients/memaslap.c 0917
src/libmemcached/clients/memcapable.c 19960
src/libmemcached/clients/memcapable.cc 02252
src/libmemcached/clients/memcat.c 2420
src/libmemcached/clients/memcat.cc 0265
src/libmemcached/clients/memcp.c 3170
src/libmemcached/clients/memcp.cc 0452
src/libmemcached/clients/memdump.c 1820
src/libmemcached/clients/memdump.cc 0239
src/libmemcached/clients/memerror.c 1020
src/libmemcached/clients/memerror.cc 0129
src/libmemcached/clients/memexist.cc 0241
src/libmemcached/clients/memflush.c 1540
src/libmemcached/clients/memflush.cc 0198
src/libmemcached/clients/memparse.cc 070
src/libmemcached/clients/memping.cc 0197
src/libmemcached/clients/memrm.c 1760
src/libmemcached/clients/memrm.cc 0257
src/libmemcached/clients/memslap.c 8830
src/libmemcached/clients/memslap.cc 0577
src/libmemcached/clients/memstat.c 3510
src/libmemcached/clients/memstat.cc 0465
src/libmemcached/clients/memtouch.cc 0256
src/libmemcached/clients/ms_atomic.h 120
src/libmemcached/clients/ms_conn.c 8090
src/libmemcached/clients/ms_conn.h 33
src/libmemcached/clients/ms_memslap.h 11
src/libmemcached/clients/ms_setting.c 1313
src/libmemcached/clients/ms_setting.h 44
src/libmemcached/clients/ms_sigsegv.c 68
src/libmemcached/clients/ms_stats.c 95
src/libmemcached/clients/ms_task.c 139
src/libmemcached/clients/ms_thread.c 119
src/libmemcached/clients/utilities.c 2310
src/libmemcached/clients/utilities.cc 0197
src/libmemcached/clients/utilities.h 1220
src/libmemcached/config/autorun.sh 1260
src/libmemcached/config/compile 1430
src/libmemcached/config/config.guess 15010
src/libmemcached/config/config.rpath 6660
src/libmemcached/config/config.sub 17050
src/libmemcached/config/depcomp 6300
src/libmemcached/config/install-sh 5200
src/libmemcached/config/ltmain.sh 84060
src/libmemcached/config/missing 3760
src/libmemcached/config/pandora-plugin 6670
src/libmemcached/config/uncrustify.cfg 11120
src/libmemcached/config.h.in 5260
src/libmemcached/configure 1175824731
src/libmemcached/configure.ac 134319
src/libmemcached/docs/Makefile.am 5620
src/libmemcached/docs/Makefile.in 10000
src/libmemcached/docs/conf.py.in 0361
src/libmemcached/docs/hashkit_create.pod 570
src/libmemcached/docs/hashkit_functions.pod 540
src/libmemcached/docs/hashkit_value.pod 410
src/libmemcached/docs/include.am 0101
src/libmemcached/docs/libmemcached.pod 1270
src/libmemcached/docs/libmemcached_examples.pod 1150
src/libmemcached/docs/libmemcachedutil.pod 400
src/libmemcached/docs/make_index.pl 300
src/libmemcached/docs/memcached_analyze.pod 530
src/libmemcached/docs/memcached_auto.pod 1380
src/libmemcached/docs/memcached_behavior.pod 2920
src/libmemcached/docs/memcached_callback.pod 1230
src/libmemcached/docs/memcached_create.pod 670
src/libmemcached/docs/memcached_delete.pod 610
src/libmemcached/docs/memcached_dump.pod 530
src/libmemcached/docs/memcached_flush.pod 460
src/libmemcached/docs/memcached_flush_buffers.pod 420
src/libmemcached/docs/memcached_generate_hash_value.pod 600
src/libmemcached/docs/memcached_get.pod 1770
src/libmemcached/docs/memcached_memory_allocators.pod 990
src/libmemcached/docs/memcached_pool.pod 990
src/libmemcached/docs/memcached_quit.pod 470
src/libmemcached/docs/memcached_result_st.pod 1150
src/libmemcached/docs/memcached_sasl.pod 640
src/libmemcached/docs/memcached_server_st.pod 840
src/libmemcached/docs/memcached_servers.pod 1180
src/libmemcached/docs/memcached_set.pod 1870
src/libmemcached/docs/memcached_stats.pod 960
src/libmemcached/docs/memcached_strerror.pod 470
src/libmemcached/docs/memcached_user_data.pod 500
src/libmemcached/docs/memcached_verbosity.pod 420
src/libmemcached/docs/memcached_version.pod 560
src/libmemcached/docs/memcapable.pod 610
src/libmemcached/docs/memcat.pod 370
src/libmemcached/docs/memcp.pod 400
src/libmemcached/docs/memdump.pod 310
src/libmemcached/docs/memerror.pod 300
src/libmemcached/docs/memflush.pod 350
src/libmemcached/docs/memrm.pod 340
src/libmemcached/docs/memslap.pod 10070
src/libmemcached/docs/memstat.pod 370
src/libmemcached/example/byteorder.cc 089
src/libmemcached/example/byteorder.h 049
src/libmemcached/example/include.am 1716
src/libmemcached/example/interface_v0.c 5880
src/libmemcached/example/interface_v0.cc 0561
src/libmemcached/example/interface_v1.c 4110
src/libmemcached/example/interface_v1.cc 0417
src/libmemcached/example/memcached_light.c 4740
src/libmemcached/example/memcached_light.cc 0646
src/libmemcached/example/memcached_light.h 441
src/libmemcached/example/storage.c 1710
src/libmemcached/example/storage.cc 0168
src/libmemcached/example/storage.h 41
src/libmemcached/example/storage_innodb.c 5350
src/libmemcached/libhashkit/aes.cc 0185
src/libmemcached/libhashkit/aes.h 049
src/libmemcached/libhashkit/algorithm.c 670
src/libmemcached/libhashkit/algorithm.cc 098
src/libmemcached/libhashkit/algorithm.h 6438
src/libmemcached/libhashkit/behavior.c 90
src/libmemcached/libhashkit/behavior.cc 038
src/libmemcached/libhashkit/behavior.h 260
src/libmemcached/libhashkit/common.h 1347
src/libmemcached/libhashkit/configure.h.in 190
src/libmemcached/libhashkit/crc32.c 850
src/libmemcached/libhashkit/crc32.cc 0122
src/libmemcached/libhashkit/digest.c 560
src/libmemcached/libhashkit/digest.cc 093
src/libmemcached/libhashkit/digest.h 300
src/libmemcached/libhashkit/encrypt.cc 063
src/libmemcached/libhashkit/fnv.c 710
src/libmemcached/libhashkit/fnv_32.cc 073
src/libmemcached/libhashkit/fnv_64.cc 085
src/libmemcached/libhashkit/function.c 1490
src/libmemcached/libhashkit/function.cc 0203
src/libmemcached/libhashkit/function.h 440
src/libmemcached/libhashkit/has.cc 082
src/libmemcached/libhashkit/hashkit.c 1080
src/libmemcached/libhashkit/hashkit.cc 0140
src/libmemcached/libhashkit/hashkit.h 12035
src/libmemcached/libhashkit/hashkitcon.h.in 040
src/libmemcached/libhashkit/hsieh.c 700
src/libmemcached/libhashkit/hsieh.cc 0113
src/libmemcached/libhashkit/include.am 4046
src/libmemcached/libhashkit/include.m4 010
src/libmemcached/libhashkit/is.h 043
src/libmemcached/libhashkit/jenkins.c 2130
src/libmemcached/libhashkit/jenkins.cc 0252
src/libmemcached/libhashkit/ketama.c 1640
src/libmemcached/libhashkit/ketama.cc 0194
src/libmemcached/libhashkit/md5.c 3650
src/libmemcached/libhashkit/md5.cc 0412
src/libmemcached/libhashkit/murmur.c 760
src/libmemcached/libhashkit/murmur.cc 0123
src/libmemcached/libhashkit/murmur3.cc 0317
src/libmemcached/libhashkit/murmur3.h 016
src/libmemcached/libhashkit/murmur3_api.cc 049
src/libmemcached/libhashkit/nohsieh.cc 046
src/libmemcached/libhashkit/one_at_a_time.c 330
src/libmemcached/libhashkit/one_at_a_time.cc 064
src/libmemcached/libhashkit/rijndael.cc 01437
src/libmemcached/libhashkit/rijndael.hpp 049
src/libmemcached/libhashkit/str_algorithm.cc 058
src/libmemcached/libhashkit/strerror.c 260
src/libmemcached/libhashkit/strerror.cc 056
src/libmemcached/libhashkit/strerror.h 230
src/libmemcached/libhashkit/string.cc 0247
src/libmemcached/libhashkit/string.h 057
src/libmemcached/libhashkit/types.h 600
src/libmemcached/libhashkit/visibility.h 510
src/libmemcached/libhashkit-1.0/algorithm.h 088
src/libmemcached/libhashkit-1.0/behavior.h 056
src/libmemcached/libhashkit-1.0/configure.h 053
src/libmemcached/libhashkit-1.0/configure.h.in 053
src/libmemcached/libhashkit-1.0/digest.h 060
src/libmemcached/libhashkit-1.0/function.h 073
src/libmemcached/libhashkit-1.0/has.h 052
src/libmemcached/libhashkit-1.0/hashkit.h 0110
src/libmemcached/libhashkit-1.0/hashkit.hpp 098
src/libmemcached/libhashkit-1.0/include.am 021
src/libmemcached/libhashkit-1.0/str_algorithm.h 048
src/libmemcached/libhashkit-1.0/strerror.h 050
src/libmemcached/libhashkit-1.0/string.h 063
src/libmemcached/libhashkit-1.0/types.h 098
src/libmemcached/libhashkit-1.0/visibility.h 048
src/libmemcached/libmemcached/allocators.c 940
src/libmemcached/libmemcached/allocators.cc 0154
src/libmemcached/libmemcached/allocators.h 560
src/libmemcached/libmemcached/allocators.hpp 047
src/libmemcached/libmemcached/analyze.c 1070
src/libmemcached/libmemcached/analyze.cc 0120
src/libmemcached/libmemcached/analyze.h 430
src/libmemcached/libmemcached/array.c 0128
src/libmemcached/libmemcached/array.h 068
src/libmemcached/libmemcached/assert.hpp 093
src/libmemcached/libmemcached/auto.c 2950
src/libmemcached/libmemcached/auto.cc 0385
src/libmemcached/libmemcached/auto.h 850
src/libmemcached/libmemcached/backtrace.cc 0131
src/libmemcached/libmemcached/backtrace.hpp 048
src/libmemcached/libmemcached/behavior.c 4220
src/libmemcached/libmemcached/behavior.cc 0724
src/libmemcached/libmemcached/behavior.h 510
src/libmemcached/libmemcached/behavior.hpp 040
src/libmemcached/libmemcached/byteorder.c 430
src/libmemcached/libmemcached/byteorder.cc 083
src/libmemcached/libmemcached/byteorder.h 3938
src/libmemcached/libmemcached/callback.c 1860
src/libmemcached/libmemcached/callback.cc 0160
src/libmemcached/libmemcached/callback.h 380
src/libmemcached/libmemcached/common.h 166159
src/libmemcached/libmemcached/configure.h.in 290
src/libmemcached/libmemcached/connect.c 5730
src/libmemcached/libmemcached/connect.cc 0821
src/libmemcached/libmemcached/connect.hpp 040
src/libmemcached/libmemcached/constants.h 1650
src/libmemcached/libmemcached/continuum.hpp 046
src/libmemcached/libmemcached/csl/common.h 052
src/libmemcached/libmemcached/csl/context.cc 0138
src/libmemcached/libmemcached/csl/context.h 0138
src/libmemcached/libmemcached/csl/include.am 039
src/libmemcached/libmemcached/csl/parser.cc 02368
src/libmemcached/libmemcached/csl/parser.h 0144
src/libmemcached/libmemcached/csl/parser.yy 0543
src/libmemcached/libmemcached/csl/scanner.cc 02938
src/libmemcached/libmemcached/csl/scanner.h 0374
src/libmemcached/libmemcached/csl/scanner.l 0239
src/libmemcached/libmemcached/csl/server.h 052
src/libmemcached/libmemcached/csl/symbol.h 055
src/libmemcached/libmemcached/delete.c 2190
src/libmemcached/libmemcached/delete.cc 0221
src/libmemcached/libmemcached/delete.h 330
src/libmemcached/libmemcached/do.c 990
src/libmemcached/libmemcached/do.cc 0113
src/libmemcached/libmemcached/do.h 340
src/libmemcached/libmemcached/do.hpp 043
src/libmemcached/libmemcached/dump.c 930
src/libmemcached/libmemcached/dump.cc 0159
src/libmemcached/libmemcached/dump.h 270
src/libmemcached/libmemcached/encoding_key.cc 056
src/libmemcached/libmemcached/encoding_key.h 048
src/libmemcached/libmemcached/error.cc 0676
src/libmemcached/libmemcached/error.hpp 090
src/libmemcached/libmemcached/exception.hpp 630
src/libmemcached/libmemcached/exist.cc 0164
src/libmemcached/libmemcached/fetch.c 1080
src/libmemcached/libmemcached/fetch.cc 0320
src/libmemcached/libmemcached/fetch.h 290
src/libmemcached/libmemcached/flag.cc 0156
src/libmemcached/libmemcached/flag.hpp 059
src/libmemcached/libmemcached/flush.c 1010
src/libmemcached/libmemcached/flush.cc 0173
src/libmemcached/libmemcached/flush.h 260
src/libmemcached/libmemcached/flush_buffers.c 260
src/libmemcached/libmemcached/flush_buffers.cc 071
src/libmemcached/libmemcached/flush_buffers.h 260
src/libmemcached/libmemcached/get.c 6170
src/libmemcached/libmemcached/get.cc 0738
src/libmemcached/libmemcached/get.h 860
src/libmemcached/libmemcached/hash.c 1380
src/libmemcached/libmemcached/hash.cc 0195
src/libmemcached/libmemcached/hash.h 420
src/libmemcached/libmemcached/hash.hpp 040
src/libmemcached/libmemcached/hosts.c 4390
src/libmemcached/libmemcached/hosts.cc 0605
src/libmemcached/libmemcached/include.am 151130
src/libmemcached/libmemcached/initialize_query.cc 080
src/libmemcached/libmemcached/initialize_query.h 041
src/libmemcached/libmemcached/instance.cc 0362
src/libmemcached/libmemcached/instance.hpp 0200
src/libmemcached/libmemcached/internal.h 1333
src/libmemcached/libmemcached/io.c 7980
src/libmemcached/libmemcached/io.cc 0931
src/libmemcached/libmemcached/io.h 8335
src/libmemcached/libmemcached/io.hpp 073
src/libmemcached/libmemcached/is.h 095
src/libmemcached/libmemcached/key.c 270
src/libmemcached/libmemcached/key.cc 0111
src/libmemcached/libmemcached/key.hpp 043
src/libmemcached/libmemcached/libmemcached_probes.d 02
src/libmemcached/libmemcached/libmemcached_probes.h 1039
src/libmemcached/libmemcached/memcached/protocol_binary.h 8301
src/libmemcached/libmemcached/memcached/vbucket.h 059
src/libmemcached/libmemcached/memcached.c 3280
src/libmemcached/libmemcached/memcached.cc 0493
src/libmemcached/libmemcached/memcached.h 19833
src/libmemcached/libmemcached/memcached.hpp 99334
src/libmemcached/libmemcached/memcached_util.h 220
src/libmemcached/libmemcached/memory.h 0111
src/libmemcached/libmemcached/namespace.cc 094
src/libmemcached/libmemcached/namespace.h 046
src/libmemcached/libmemcached/options.cc 0185
src/libmemcached/libmemcached/options.hpp 056
src/libmemcached/libmemcached/parse.c 740
src/libmemcached/libmemcached/parse.cc 0124
src/libmemcached/libmemcached/parse.h 260
src/libmemcached/libmemcached/platform.h 320
src/libmemcached/libmemcached/poll.cc 085
src/libmemcached/libmemcached/poll.h 048
src/libmemcached/libmemcached/protocol/ascii_handler.c 9250
src/libmemcached/libmemcached/protocol/ascii_handler.h 80
src/libmemcached/libmemcached/protocol/binary_handler.c 10830
src/libmemcached/libmemcached/protocol/binary_handler.h 150
src/libmemcached/libmemcached/protocol/cache.c 1490
src/libmemcached/libmemcached/protocol/cache.h 1160
src/libmemcached/libmemcached/protocol/callback.h 4180
src/libmemcached/libmemcached/protocol/common.h 1360
src/libmemcached/libmemcached/protocol/pedantic.c 2020
src/libmemcached/libmemcached/protocol/protocol_handler.c 3650
src/libmemcached/libmemcached/protocol_handler.h 2180
src/libmemcached/libmemcached/purge.c 900
src/libmemcached/libmemcached/purge.cc 0165
src/libmemcached/libmemcached/quit.c 980
src/libmemcached/libmemcached/quit.cc 0157
src/libmemcached/libmemcached/quit.h 290
src/libmemcached/libmemcached/quit.hpp 041
src/libmemcached/libmemcached/response.c 5840
src/libmemcached/libmemcached/response.cc 0937
src/libmemcached/libmemcached/response.h 2338
src/libmemcached/libmemcached/result.c 1380
src/libmemcached/libmemcached/result.cc 0189
src/libmemcached/libmemcached/result.h 7234
src/libmemcached/libmemcached/sasl.c 3750
src/libmemcached/libmemcached/sasl.cc 0541
src/libmemcached/libmemcached/sasl.h 650
src/libmemcached/libmemcached/sasl.hpp 042
src/libmemcached/libmemcached/server.c 2940
src/libmemcached/libmemcached/server.cc 0295
src/libmemcached/libmemcached/server.h 1340
src/libmemcached/libmemcached/server.hpp 0106
src/libmemcached/libmemcached/server_instance.h 060
src/libmemcached/libmemcached/server_list.c 770
src/libmemcached/libmemcached/server_list.cc 0163
src/libmemcached/libmemcached/server_list.h 530
src/libmemcached/libmemcached/server_list.hpp 047
src/libmemcached/libmemcached/socket.hpp 080
src/libmemcached/libmemcached/stats.c 5520
src/libmemcached/libmemcached/stats.cc 0848
src/libmemcached/libmemcached/stats.h 720
src/libmemcached/libmemcached/storage.c 5490
src/libmemcached/libmemcached/storage.cc 0598
src/libmemcached/libmemcached/storage.h 1100
src/libmemcached/libmemcached/strerror.c 980
src/libmemcached/libmemcached/strerror.cc 0195
src/libmemcached/libmemcached/strerror.h 260
src/libmemcached/libmemcached/string.c 2030
src/libmemcached/libmemcached/string.cc 0330
src/libmemcached/libmemcached/string.h 820
src/libmemcached/libmemcached/string.hpp 094
src/libmemcached/libmemcached/touch.cc 0158
src/libmemcached/libmemcached/types.h 900
src/libmemcached/libmemcached/udp.cc 077
src/libmemcached/libmemcached/udp.hpp 059
src/libmemcached/libmemcached/util/ping.c 380
src/libmemcached/libmemcached/util/ping.h 260
src/libmemcached/libmemcached/util/pool.c 2680
src/libmemcached/libmemcached/util/pool.h 510
src/libmemcached/libmemcached/util/version.c 590
src/libmemcached/libmemcached/util/version.h 290
src/libmemcached/libmemcached/util.h 1232
src/libmemcached/libmemcached/verbosity.c 590
src/libmemcached/libmemcached/verbosity.cc 0107
src/libmemcached/libmemcached/verbosity.h 270
src/libmemcached/libmemcached/version.c 1290
src/libmemcached/libmemcached/version.cc 0230
src/libmemcached/libmemcached/version.h 290
src/libmemcached/libmemcached/version.hpp 044
src/libmemcached/libmemcached/virtual_bucket.c 0120
src/libmemcached/libmemcached/virtual_bucket.h 056
src/libmemcached/libmemcached/visibility.h 540
src/libmemcached/libmemcached/watchpoint.h 7135
src/libmemcached/libmemcached/windows.hpp 0125
src/libmemcached/libmemcached-1.0/alloc.h 054
src/libmemcached/libmemcached-1.0/allocators.h 064
src/libmemcached/libmemcached-1.0/analyze.h 056
src/libmemcached/libmemcached-1.0/auto.h 0111
src/libmemcached/libmemcached-1.0/basic_string.h 055
src/libmemcached/libmemcached-1.0/behavior.h 083
src/libmemcached/libmemcached-1.0/callback.h 055
src/libmemcached/libmemcached-1.0/callbacks.h 053
src/libmemcached/libmemcached-1.0/configure.h 052
src/libmemcached/libmemcached-1.0/configure.h.in 052
src/libmemcached/libmemcached-1.0/defaults.h 056
src/libmemcached/libmemcached-1.0/delete.h 057
src/libmemcached/libmemcached-1.0/deprecated_types.h 061
src/libmemcached/libmemcached-1.0/dump.h 051
src/libmemcached/libmemcached-1.0/encoding_key.h 049
src/libmemcached/libmemcached-1.0/error.h 067
src/libmemcached/libmemcached-1.0/exception.hpp 060
src/libmemcached/libmemcached-1.0/exist.h 052
src/libmemcached/libmemcached-1.0/fetch.h 053
src/libmemcached/libmemcached-1.0/flush.h 049
src/libmemcached/libmemcached-1.0/flush_buffers.h 049
src/libmemcached/libmemcached-1.0/get.h 0110
src/libmemcached/libmemcached-1.0/hash.h 065
src/libmemcached/libmemcached-1.0/include.am 056
src/libmemcached/libmemcached-1.0/limits.h 046
src/libmemcached/libmemcached-1.0/memcached.h 0169
src/libmemcached/libmemcached-1.0/memcached.hpp 0878
src/libmemcached/libmemcached-1.0/options.h 049
src/libmemcached/libmemcached-1.0/parse.h 023
src/libmemcached/libmemcached-1.0/platform.h 062
src/libmemcached/libmemcached-1.0/quit.h 049
src/libmemcached/libmemcached-1.0/result.h 089
src/libmemcached/libmemcached-1.0/return.h 082
src/libmemcached/libmemcached-1.0/sasl.h 070
src/libmemcached/libmemcached-1.0/server.h 0126
src/libmemcached/libmemcached-1.0/server_list.h 068
src/libmemcached/libmemcached-1.0/stats.h 069
src/libmemcached/libmemcached-1.0/storage.h 0131
src/libmemcached/libmemcached-1.0/strerror.h 050
src/libmemcached/libmemcached-1.0/struct/allocator.h 046
src/libmemcached/libmemcached-1.0/struct/analysis.h 051
src/libmemcached/libmemcached-1.0/struct/callback.h 044
src/libmemcached/libmemcached-1.0/struct/include.am 013
src/libmemcached/libmemcached-1.0/struct/memcached.h 0128
src/libmemcached/libmemcached-1.0/struct/result.h 056
src/libmemcached/libmemcached-1.0/struct/sasl.h 054
src/libmemcached/libmemcached-1.0/struct/server.h 0100
src/libmemcached/libmemcached-1.0/struct/stat.h 068
src/libmemcached/libmemcached-1.0/struct/string.h 059
src/libmemcached/libmemcached-1.0/t/c_sasl_test.c 061
src/libmemcached/libmemcached-1.0/t/c_test.c 061
src/libmemcached/libmemcached-1.0/t/cc_test.cc 063
src/libmemcached/libmemcached-1.0/t/include.am 032
src/libmemcached/libmemcached-1.0/touch.h 059
src/libmemcached/libmemcached-1.0/triggers.h 064
src/libmemcached/libmemcached-1.0/types/behavior.h 085
src/libmemcached/libmemcached-1.0/types/callback.h 054
src/libmemcached/libmemcached-1.0/types/connection.h 049
src/libmemcached/libmemcached-1.0/types/hash.h 059
src/libmemcached/libmemcached-1.0/types/include.am 08
src/libmemcached/libmemcached-1.0/types/return.h 095
src/libmemcached/libmemcached-1.0/types/server_distribution.h 054
src/libmemcached/libmemcached-1.0/types.h 083
src/libmemcached/libmemcached-1.0/verbosity.h 050
src/libmemcached/libmemcached-1.0/version.h 052
src/libmemcached/libmemcached-1.0/visibility.h 067
src/libmemcached/libmemcachedinternal/include.am 027
src/libmemcached/libmemcachedinternal/util/include.am 017
src/libmemcached/libmemcachedprotocol/ascii_handler.c 01161
src/libmemcached/libmemcachedprotocol/ascii_handler.h 040
src/libmemcached/libmemcachedprotocol/binary_handler.c 01198
src/libmemcached/libmemcachedprotocol/binary_handler.h 047
src/libmemcached/libmemcachedprotocol/cache.c 0189
src/libmemcached/libmemcachedprotocol/cache.h 0148
src/libmemcached/libmemcachedprotocol/common.h 0162
src/libmemcached/libmemcachedprotocol/handler.c 0441
src/libmemcached/libmemcachedprotocol/include.am 036
src/libmemcached/libmemcachedprotocol/pedantic.c 0237
src/libmemcached/libmemcachedprotocol-0.0/binary.h 0728
src/libmemcached/libmemcachedprotocol-0.0/callback.h 0416
src/libmemcached/libmemcachedprotocol-0.0/handler.h 0218
src/libmemcached/libmemcachedprotocol-0.0/include.am 09
src/libmemcached/libmemcachedprotocol-0.0/vbucket.h 059
src/libmemcached/libmemcachedutil/common.h 049
src/libmemcached/libmemcachedutil/flush.cc 060
src/libmemcached/libmemcachedutil/include.am 026
src/libmemcached/libmemcachedutil/pid.cc 0161
src/libmemcached/libmemcachedutil/ping.cc 0136
src/libmemcached/libmemcachedutil/pool.cc 0523
src/libmemcached/libmemcachedutil/version.cc 088
src/libmemcached/libmemcachedutil-1.0/flush.h 050
src/libmemcached/libmemcachedutil-1.0/include.am 013
src/libmemcached/libmemcachedutil-1.0/ostream.hpp 050
src/libmemcached/libmemcachedutil-1.0/pid.h 058
src/libmemcached/libmemcachedutil-1.0/ping.h 052
src/libmemcached/libmemcachedutil-1.0/pool.h 083
src/libmemcached/libmemcachedutil-1.0/util.h 046
src/libmemcached/libmemcachedutil-1.0/version.h 053
src/libmemcached/libtest/abort.cc 047
src/libmemcached/libtest/alarm.cc 0102
src/libmemcached/libtest/alarm.h 046
src/libmemcached/libtest/backtrace_test.cc 0123
src/libmemcached/libtest/binaries.cc 041
src/libmemcached/libtest/binaries.h 041
src/libmemcached/libtest/blobslap_worker.cc 0165
src/libmemcached/libtest/blobslap_worker.h 043
src/libmemcached/libtest/callbacks.h 052
src/libmemcached/libtest/client.cc 0389
src/libmemcached/libtest/client.hpp 080
src/libmemcached/libtest/cmdline.cc 0837
src/libmemcached/libtest/cmdline.h 0248
src/libmemcached/libtest/collection.cc 0191
src/libmemcached/libtest/collection.h 0112
src/libmemcached/libtest/common.h 0121
src/libmemcached/libtest/comparison.cc 087
src/libmemcached/libtest/comparison.hpp 0160
src/libmemcached/libtest/core.cc 066
src/libmemcached/libtest/core.h 044
src/libmemcached/libtest/core_count.cc 0135
src/libmemcached/libtest/cpu.cc 083
src/libmemcached/libtest/cpu.hpp 043
src/libmemcached/libtest/dns.cc 0118
src/libmemcached/libtest/dns.hpp 044
src/libmemcached/libtest/dream.cc 058
src/libmemcached/libtest/dream.h 044
src/libmemcached/libtest/drizzled.cc 0210
src/libmemcached/libtest/drizzled.h 050
src/libmemcached/libtest/error.h 054
src/libmemcached/libtest/exception/disconnected.hpp 062
src/libmemcached/libtest/exception/fatal.cc 0119
src/libmemcached/libtest/exception/fatal.hpp 087
src/libmemcached/libtest/exception.cc 0108
src/libmemcached/libtest/exception.hpp 094
src/libmemcached/libtest/formatter.cc 0260
src/libmemcached/libtest/formatter.hpp 085
src/libmemcached/libtest/framework.cc 0234
src/libmemcached/libtest/framework.h 0200
src/libmemcached/libtest/gearmand.cc 0178
src/libmemcached/libtest/gearmand.h 045
src/libmemcached/libtest/get.h 051
src/libmemcached/libtest/has.cc 0226
src/libmemcached/libtest/has.hpp 076
src/libmemcached/libtest/http.cc 0217
src/libmemcached/libtest/http.hpp 0132
src/libmemcached/libtest/include.am 0256
src/libmemcached/libtest/is_local.cc 060
src/libmemcached/libtest/is_local.hpp 050
src/libmemcached/libtest/is_pid.hpp 043
src/libmemcached/libtest/killpid.cc 0225
src/libmemcached/libtest/killpid.h 051
src/libmemcached/libtest/libtool.cc 073
src/libmemcached/libtest/libtool.hpp 043
src/libmemcached/libtest/lite.h 0413
src/libmemcached/libtest/m4/ax_lib_mysql.m4 0151
src/libmemcached/libtest/m4/ax_prog_mysqld.m4 058
src/libmemcached/libtest/m4/mysql.m4 024
src/libmemcached/libtest/main.cc 0396
src/libmemcached/libtest/memcached.cc 0239
src/libmemcached/libtest/memcached.h 046
src/libmemcached/libtest/memcached.hpp 0100
src/libmemcached/libtest/poll_error.hpp 0100
src/libmemcached/libtest/port.cc 0231
src/libmemcached/libtest/port.h 056
src/libmemcached/libtest/result/base.hpp 054
src/libmemcached/libtest/result/fail.hpp 056
src/libmemcached/libtest/result/skip.hpp 054
src/libmemcached/libtest/result/success.hpp 059
src/libmemcached/libtest/result.cc 082
src/libmemcached/libtest/result.hpp 056
src/libmemcached/libtest/run.gdb 07
src/libmemcached/libtest/runner.cc 0203
src/libmemcached/libtest/runner.h 073
src/libmemcached/libtest/server.cc 0540
src/libmemcached/libtest/server.h 0297
src/libmemcached/libtest/server_container.cc 0395
src/libmemcached/libtest/server_container.h 0151
src/libmemcached/libtest/signal.cc 0259
src/libmemcached/libtest/signal.h 080
src/libmemcached/libtest/skiptest.cc 057
src/libmemcached/libtest/socket.cc 062
src/libmemcached/libtest/socket.hpp 047
src/libmemcached/libtest/stream.h 0223
src/libmemcached/libtest/strerror.cc 071
src/libmemcached/libtest/strerror.h 054
src/libmemcached/libtest/string.hpp 046
src/libmemcached/libtest/test.h 0210
src/libmemcached/libtest/test.hpp 0102
src/libmemcached/libtest/thread.hpp 0325
src/libmemcached/libtest/timer.cc 0150
src/libmemcached/libtest/timer.hpp 073
src/libmemcached/libtest/tmpfile.cc 070
src/libmemcached/libtest/tmpfile.hpp 047
src/libmemcached/libtest/unittest.cc 01229
src/libmemcached/libtest/valgrind.h 055
src/libmemcached/libtest/vchar.cc 0169
src/libmemcached/libtest/vchar.hpp 071
src/libmemcached/libtest/version.h 042
src/libmemcached/libtest/version.h.in 042
src/libmemcached/libtest/visibility.h 077
src/libmemcached/libtest/wait.cc 0194
src/libmemcached/libtest/wait.h 0114
src/libmemcached/libtest/yatl.h 043
src/libmemcached/libtest/yatl.m4 013
src/libmemcached/libtest/yatlcon.h.in 041
src/libmemcached/m4/ac_cxx_compile_stdcxx_0x.m4 1030
src/libmemcached/m4/ac_cxx_header_stdcxx_98.m4 830
src/libmemcached/m4/acx_pthread.m4 2710
src/libmemcached/m4/ax_add_am_macro.m4 029
src/libmemcached/m4/ax_am_jobserver.m4 055
src/libmemcached/m4/ax_am_macros.m4 044
src/libmemcached/m4/ax_append_compile_flags.m4 065
src/libmemcached/m4/ax_append_flag.m4 069
src/libmemcached/m4/ax_append_link_flags.m4 063
src/libmemcached/m4/ax_append_to_file.m4 027
src/libmemcached/m4/ax_assert.m4 066
src/libmemcached/m4/ax_check_compile_flag.m4 072
src/libmemcached/m4/ax_check_library.m4 092
src/libmemcached/m4/ax_check_link_flag.m4 071
src/libmemcached/m4/ax_compiler_vendor.m4 085
src/libmemcached/m4/ax_compiler_version.m4 0100
src/libmemcached/m4/ax_count_cpus.m4 057
src/libmemcached/m4/ax_cxx_gcc_abi_demangle.m4 062
src/libmemcached/m4/ax_debug.m4 064
src/libmemcached/m4/ax_endian.m4 035
src/libmemcached/m4/ax_file_escapes.m4 030
src/libmemcached/m4/ax_gcc_atomic_builtins.m4 037
src/libmemcached/m4/ax_harden_compiler_flags.m4 0365
src/libmemcached/m4/ax_hex_version.m4 033
src/libmemcached/m4/ax_libevent.m4 0128
src/libmemcached/m4/ax_libmemcached.m4 0138
src/libmemcached/m4/ax_memcached.m4 069
src/libmemcached/m4/ax_platform.m4 056
src/libmemcached/m4/ax_print_to_file.m4 027
src/libmemcached/m4/ax_prog_sphinx_build.m4 048
src/libmemcached/m4/ax_pthread.m4 0332
src/libmemcached/m4/ax_pthread_timedjoin_np.m4 050
src/libmemcached/m4/ax_restore_flags.m4 052
src/libmemcached/m4/ax_sasl.m4 051
src/libmemcached/m4/ax_save_flags.m4 071
src/libmemcached/m4/ax_uuid.m4 0124
src/libmemcached/m4/ax_vcs_checkout.m4 075
src/libmemcached/m4/ax_with_prog.m4 070
src/libmemcached/m4/bottom.m4 032
src/libmemcached/m4/byteorder.m4 1111
src/libmemcached/m4/eagain.m4 280
src/libmemcached/m4/enable_utillib.m4 160
src/libmemcached/m4/fnv.m4 016
src/libmemcached/m4/gearmand.m4 09
src/libmemcached/m4/gettext.m4 3790
src/libmemcached/m4/have_cinttypes.m4 097
src/libmemcached/m4/have_cstdint.m4 089
src/libmemcached/m4/hsieh.m4 11
src/libmemcached/m4/iconv.m4 1800
src/libmemcached/m4/include.am 06
src/libmemcached/m4/lib-ld.m4 1100
src/libmemcached/m4/lib-link.m4 7670
src/libmemcached/m4/lib-prefix.m4 2210
src/libmemcached/m4/libgearman.m4 05
src/libmemcached/m4/libtool.m4 8121444
src/libmemcached/m4/ltoptions.m4 824
src/libmemcached/m4/ltversion.m4 66
src/libmemcached/m4/lt~obsolete.m4 39
src/libmemcached/m4/memaslap.m4 09
src/libmemcached/m4/memcached.m4 310
src/libmemcached/m4/murmur.m4 018
src/libmemcached/m4/pandora_64bit.m4 600
src/libmemcached/m4/pandora_canonical.m4 2520
src/libmemcached/m4/pandora_check_compiler_version.m4 370
src/libmemcached/m4/pandora_check_cxx_standard.m4 230
src/libmemcached/m4/pandora_cinttypes.m4 340
src/libmemcached/m4/pandora_clock_gettime.m4 150
src/libmemcached/m4/pandora_cstdint.m4 330
src/libmemcached/m4/pandora_cxx_demangle.m4 270
src/libmemcached/m4/pandora_drizzle_build.m4 1120
src/libmemcached/m4/pandora_enable_dtrace.m4 68
src/libmemcached/m4/pandora_ensure_gcc_version.m4 620
src/libmemcached/m4/pandora_extensions.m4 160
src/libmemcached/m4/pandora_fdatasync.m4 250
src/libmemcached/m4/pandora_have_better_malloc.m4 680
src/libmemcached/m4/pandora_have_boost.m4 730
src/libmemcached/m4/pandora_have_gcc_atomics.m4 370
src/libmemcached/m4/pandora_have_innodb.m4 410
src/libmemcached/m4/pandora_have_libavahi.m4 410
src/libmemcached/m4/pandora_have_libbdb.m4 400
src/libmemcached/m4/pandora_have_libboost_options.m4 470
src/libmemcached/m4/pandora_have_libcassandra.m4 440
src/libmemcached/m4/pandora_have_libdl.m4 510
src/libmemcached/m4/pandora_have_libdrizzle.m4 610
src/libmemcached/m4/pandora_have_libevent.m4 660
src/libmemcached/m4/pandora_have_libgearman.m4 410
src/libmemcached/m4/pandora_have_libgtest.m4 440
src/libmemcached/m4/pandora_have_libhashkit.m4 420
src/libmemcached/m4/pandora_have_libinnodb.m4 640
src/libmemcached/m4/pandora_have_libldap.m4 730
src/libmemcached/m4/pandora_have_libmemcached.m4 1060
src/libmemcached/m4/pandora_have_libmysqlclient.m4 1460
src/libmemcached/m4/pandora_have_libndbclient.m4 800
src/libmemcached/m4/pandora_have_libpcre.m4 730
src/libmemcached/m4/pandora_have_libpq.m4 460
src/libmemcached/m4/pandora_have_libpqxx.m4 440
src/libmemcached/m4/pandora_have_libreadline.m4 2420
src/libmemcached/m4/pandora_have_libsqlite3.m4 420
src/libmemcached/m4/pandora_have_libtokyocabinet.m4 540
src/libmemcached/m4/pandora_have_libuuid.m4 550
src/libmemcached/m4/pandora_have_libvbucket.m4 400
src/libmemcached/m4/pandora_have_libxml2.m4 520
src/libmemcached/m4/pandora_have_libz.m4 510
src/libmemcached/m4/pandora_have_protobuf.m4 800
src/libmemcached/m4/pandora_have_sasl.m4 1330
src/libmemcached/m4/pandora_have_thrift.m4 450
src/libmemcached/m4/pandora_header_assert.m4 230
src/libmemcached/m4/pandora_libtool.m4 250
src/libmemcached/m4/pandora_optimize.m4 790
src/libmemcached/m4/pandora_platform.m4 900
src/libmemcached/m4/pandora_plugins.m4 570
src/libmemcached/m4/pandora_print_callstack.m4 610
src/libmemcached/m4/pandora_pthread.m4 2580
src/libmemcached/m4/pandora_python3_devel.m4 2360
src/libmemcached/m4/pandora_run_cpplint.m4 80
src/libmemcached/m4/pandora_sasl.m4 1330
src/libmemcached/m4/pandora_shared_ptr.m4 590
src/libmemcached/m4/pandora_stack_direction.m4 390
src/libmemcached/m4/pandora_stl_hash.m4 890
src/libmemcached/m4/pandora_swig.m4 390
src/libmemcached/m4/pandora_use_pipe.m4 360
src/libmemcached/m4/pandora_vc_build.m4 1320
src/libmemcached/m4/pandora_version.m4 110
src/libmemcached/m4/pandora_visibility.m4 570
src/libmemcached/m4/pandora_warnings.m4 3580
src/libmemcached/m4/pandora_with_gettext.m4 440
src/libmemcached/m4/pandora_with_lua.m4 550
src/libmemcached/m4/pandora_with_memcached.m4 410
src/libmemcached/m4/pandora_with_perl.m4 810
src/libmemcached/m4/pandora_with_php.m4 560
src/libmemcached/m4/pandora_with_python.m4 370
src/libmemcached/m4/pandora_with_python3.m4 440
src/libmemcached/m4/pandora_with_r.m4 330
src/libmemcached/m4/pandora_with_ruby.m4 790
src/libmemcached/m4/pkg.m4 1570
src/libmemcached/m4/po.m4 4490
src/libmemcached/m4/pod2man.m4 70
src/libmemcached/m4/podchecker.m4 70
src/libmemcached/m4/progtest.m4 920
src/libmemcached/m4/protocol_binary.m4 2519
src/libmemcached/m4/socket_send_flags.m4 047
src/libmemcached/m4/visibility.m4 077
src/libmemcached/man/hashkit_clone.3 0121
src/libmemcached/man/hashkit_crc32.3 0130
src/libmemcached/man/hashkit_create.3 0121
src/libmemcached/man/hashkit_fnv1_32.3 0130
src/libmemcached/man/hashkit_fnv1_64.3 0130
src/libmemcached/man/hashkit_fnv1a_32.3 0130
src/libmemcached/man/hashkit_fnv1a_64.3 0130
src/libmemcached/man/hashkit_free.3 0121
src/libmemcached/man/hashkit_functions.3 0130
src/libmemcached/man/hashkit_hsieh.3 0130
src/libmemcached/man/hashkit_is_allocated.3 0121
src/libmemcached/man/hashkit_jenkins.3 0130
src/libmemcached/man/hashkit_md5.3 0130
src/libmemcached/man/hashkit_murmur.3 0130
src/libmemcached/man/hashkit_value.3 092
src/libmemcached/man/include.am 0128
src/libmemcached/man/libhashkit.3 087
src/libmemcached/man/libmemcached.3 0232
src/libmemcached/man/libmemcached_check_configuration.3 0333
src/libmemcached/man/libmemcached_configuration.3 0333
src/libmemcached/man/libmemcached_examples.3 0211
src/libmemcached/man/libmemcachedutil.3 097
src/libmemcached/man/memaslap.1 01191
src/libmemcached/man/memcached.3 0333
src/libmemcached/man/memcached_add.3 0147
src/libmemcached/man/memcached_add_by_key.3 0147
src/libmemcached/man/memcached_analyze.3 0107
src/libmemcached/man/memcached_append.3 0145
src/libmemcached/man/memcached_append_by_key.3 0145
src/libmemcached/man/memcached_behavior_get.3 0378
src/libmemcached/man/memcached_behavior_set.3 0378
src/libmemcached/man/memcached_callback_get.3 0209
src/libmemcached/man/memcached_callback_set.3 0209
src/libmemcached/man/memcached_cas.3 0117
src/libmemcached/man/memcached_cas_by_key.3 0117
src/libmemcached/man/memcached_clone.3 0133
src/libmemcached/man/memcached_create.3 0133
src/libmemcached/man/memcached_decrement.3 0151
src/libmemcached/man/memcached_decrement_with_initial.3 0151
src/libmemcached/man/memcached_delete.3 0110
src/libmemcached/man/memcached_delete_by_key.3 0110
src/libmemcached/man/memcached_destroy_sasl_auth_data.3 0118
src/libmemcached/man/memcached_dump.3 0104
src/libmemcached/man/memcached_exist.3 094
src/libmemcached/man/memcached_exist_by_key.3 094
src/libmemcached/man/memcached_fetch.3 0105
src/libmemcached/man/memcached_fetch_execute.3 0187
src/libmemcached/man/memcached_fetch_result.3 0187
src/libmemcached/man/memcached_flush_buffers.3 098
src/libmemcached/man/memcached_free.3 0133
src/libmemcached/man/memcached_generate_hash.3 0159
src/libmemcached/man/memcached_generate_hash_value.3 0159
src/libmemcached/man/memcached_get.3 0187
src/libmemcached/man/memcached_get_by_key.3 0187
src/libmemcached/man/memcached_get_memory_allocators.3 0138
src/libmemcached/man/memcached_get_sasl_callbacks.3 0118
src/libmemcached/man/memcached_get_user_data.3 0114
src/libmemcached/man/memcached_increment.3 0151
src/libmemcached/man/memcached_increment_with_initial.3 0151
src/libmemcached/man/memcached_last_error_message.3 090
src/libmemcached/man/memcached_lib_version.3 0102
src/libmemcached/man/memcached_mget.3 0187
src/libmemcached/man/memcached_mget_by_key.3 0187
src/libmemcached/man/memcached_mget_execute.3 0187
src/libmemcached/man/memcached_mget_execute_by_key.3 0187
src/libmemcached/man/memcached_pool.3 0166
src/libmemcached/man/memcached_pool_behavior_get.3 0166
src/libmemcached/man/memcached_pool_behavior_set.3 0166
src/libmemcached/man/memcached_pool_create.3 0166
src/libmemcached/man/memcached_pool_destroy.3 0166
src/libmemcached/man/memcached_pool_fetch.3 0166
src/libmemcached/man/memcached_pool_pop.3 0166
src/libmemcached/man/memcached_pool_push.3 0166
src/libmemcached/man/memcached_pool_release.3 0166
src/libmemcached/man/memcached_pool_st.3 0166
src/libmemcached/man/memcached_prepend.3 0145
src/libmemcached/man/memcached_prepend_by_key.3 0145
src/libmemcached/man/memcached_quit.3 099
src/libmemcached/man/memcached_replace.3 0147
src/libmemcached/man/memcached_replace_by_key.3 0147
src/libmemcached/man/memcached_sasl_set_auth_data.3 0118
src/libmemcached/man/memcached_server_add.3 0157
src/libmemcached/man/memcached_server_count.3 0157
src/libmemcached/man/memcached_server_cursor.3 0157
src/libmemcached/man/memcached_server_list.3 0157
src/libmemcached/man/memcached_server_list_append.3 0146
src/libmemcached/man/memcached_server_list_count.3 0146
src/libmemcached/man/memcached_server_list_free.3 0146
src/libmemcached/man/memcached_server_push.3 0157
src/libmemcached/man/memcached_servers_parse.3 0146
src/libmemcached/man/memcached_set.3 0147
src/libmemcached/man/memcached_set_by_key.3 0147
src/libmemcached/man/memcached_set_memory_allocators.3 0138
src/libmemcached/man/memcached_set_sasl_callbacks.3 0118
src/libmemcached/man/memcached_set_user_data.3 0114
src/libmemcached/man/memcached_stat.3 0137
src/libmemcached/man/memcached_stat_execute.3 0137
src/libmemcached/man/memcached_stat_get_keys.3 0137
src/libmemcached/man/memcached_stat_get_value.3 0137
src/libmemcached/man/memcached_stat_servername.3 0137
src/libmemcached/man/memcached_strerror.3 093
src/libmemcached/man/memcached_touch.3 099
src/libmemcached/man/memcached_touch_by_key.3 099
src/libmemcached/man/memcached_verbosity.3 094
src/libmemcached/man/memcached_version.3 0102
src/libmemcached/man/memcapable.1 0117
src/libmemcached/man/memcat.1 0107
src/libmemcached/man/memcp.1 0110
src/libmemcached/man/memdump.1 092
src/libmemcached/man/memerror.1 091
src/libmemcached/man/memexist.1 0102
src/libmemcached/man/memflush.1 0105
src/libmemcached/man/memparse.1 090
src/libmemcached/man/memping.1 0102
src/libmemcached/man/memrm.1 0104
src/libmemcached/man/memslap.1 0101
src/libmemcached/man/memstat.1 0106
src/libmemcached/man/memtouch.1 0102
src/libmemcached/mem_config.in 0657
src/libmemcached/poll/include.am 80
src/libmemcached/poll/poll.c 770
src/libmemcached/poll/poll.h 450
src/libmemcached/rpm/include.mk 052
src/libmemcached/support/include.am 64
src/libmemcached/support/libmemcached-fc.spec.in 1050
src/libmemcached/support/libmemcached.pc.in 23
src/libmemcached/support/libmemcached.spec 0344
src/libmemcached/support/libmemcached.spec.in 66147
src/libmemcached/tests/atomsmasher.c 2910
src/libmemcached/tests/basic.h 066
src/libmemcached/tests/callbacks.h 041
src/libmemcached/tests/cli.am 0133
src/libmemcached/tests/cpp_example.cc 0195
src/libmemcached/tests/cycle.cc 0143
src/libmemcached/tests/debug.h 048
src/libmemcached/tests/deprecated.h 049
src/libmemcached/tests/error_conditions.h 048
src/libmemcached/tests/exist.h 042
src/libmemcached/tests/failure.cc 0239
src/libmemcached/tests/hash_plus.cc 4766
src/libmemcached/tests/hash_results.h 013
src/libmemcached/tests/hashkit_functions.c 5790
src/libmemcached/tests/hashkit_functions.cc 0592
src/libmemcached/tests/include.am 295118
src/libmemcached/tests/ketama.h 042
src/libmemcached/tests/ketama_test_cases.h 41
src/libmemcached/tests/ketama_test_cases_spy.h 31
src/libmemcached/tests/keys.hpp 0145
src/libmemcached/tests/libmemcached-1.0/all_tests.cc 097
src/libmemcached/tests/libmemcached-1.0/all_tests.h 0524
src/libmemcached/tests/libmemcached-1.0/all_tests_socket.cc 080
src/libmemcached/tests/libmemcached-1.0/atomsmasher.cc 0284
src/libmemcached/tests/libmemcached-1.0/basic.cc 0135
src/libmemcached/tests/libmemcached-1.0/callback_counter.cc 051
src/libmemcached/tests/libmemcached-1.0/callback_counter.h 040
src/libmemcached/tests/libmemcached-1.0/callbacks.cc 087
src/libmemcached/tests/libmemcached-1.0/debug.cc 0206
src/libmemcached/tests/libmemcached-1.0/deprecated.cc 074
src/libmemcached/tests/libmemcached-1.0/dump.cc 0144
src/libmemcached/tests/libmemcached-1.0/dump.h 040
src/libmemcached/tests/libmemcached-1.0/encoding_key.cc 0375
src/libmemcached/tests/libmemcached-1.0/encoding_key.h 051
src/libmemcached/tests/libmemcached-1.0/error_conditions.cc 064
src/libmemcached/tests/libmemcached-1.0/exist.cc 074
src/libmemcached/tests/libmemcached-1.0/fetch_all_results.cc 062
src/libmemcached/tests/libmemcached-1.0/fetch_all_results.h 041
src/libmemcached/tests/libmemcached-1.0/generate.cc 0396
src/libmemcached/tests/libmemcached-1.0/generate.h 053
src/libmemcached/tests/libmemcached-1.0/haldenbrand.cc 0182
src/libmemcached/tests/libmemcached-1.0/haldenbrand.h 042
src/libmemcached/tests/libmemcached-1.0/include.am 0271
src/libmemcached/tests/libmemcached-1.0/internals.cc 067
src/libmemcached/tests/libmemcached-1.0/ketama.cc 0291
src/libmemcached/tests/libmemcached-1.0/mem_functions.cc 05088
src/libmemcached/tests/libmemcached-1.0/mem_functions.h 0190
src/libmemcached/tests/libmemcached-1.0/memcached_get.cc 0219
src/libmemcached/tests/libmemcached-1.0/memcached_get.h 044
src/libmemcached/tests/libmemcached-1.0/namespace.cc 0109
src/libmemcached/tests/libmemcached-1.0/parser.cc 0790
src/libmemcached/tests/libmemcached-1.0/parser.h 0118
src/libmemcached/tests/libmemcached-1.0/plus.cpp 0340
src/libmemcached/tests/libmemcached-1.0/pool.cc 0497
src/libmemcached/tests/libmemcached-1.0/print.cc 082
src/libmemcached/tests/libmemcached-1.0/replication.cc 0446
src/libmemcached/tests/libmemcached-1.0/sasl.cc 0117
src/libmemcached/tests/libmemcached-1.0/server_add.cc 0105
src/libmemcached/tests/libmemcached-1.0/setup_and_teardowns.cc 0278
src/libmemcached/tests/libmemcached-1.0/setup_and_teardowns.h 066
src/libmemcached/tests/libmemcached-1.0/stat.cc 0102
src/libmemcached/tests/libmemcached-1.0/stat.h 040
src/libmemcached/tests/libmemcached-1.0/string.cc 0192
src/libmemcached/tests/libmemcached-1.0/touch.cc 0152
src/libmemcached/tests/libmemcached-1.0/virtual_buckets.cc 0146
src/libmemcached/tests/libmemcached_test_container.h 082
src/libmemcached/tests/libmemcached_world.h 16979
src/libmemcached/tests/libmemcached_world_socket.h 095
src/libmemcached/tests/mem_functions.c 64440
src/libmemcached/tests/mem_plus.cc 740
src/libmemcached/tests/mem_udp.c 5090
src/libmemcached/tests/mem_udp.cc 0577
src/libmemcached/tests/memc.hpp 0104
src/libmemcached/tests/memcapable.cc 0126
src/libmemcached/tests/memcat.cc 0151
src/libmemcached/tests/memcp.cc 0123
src/libmemcached/tests/memdump.cc 0129
src/libmemcached/tests/memerror.cc 0131
src/libmemcached/tests/memexist.cc 0166
src/libmemcached/tests/memflush.cc 0119
src/libmemcached/tests/memping.cc 0121
src/libmemcached/tests/memrm.cc 0171
src/libmemcached/tests/memslap.cc 0192
src/libmemcached/tests/memstat.cc 0130
src/libmemcached/tests/memtouch.cc 0162
src/libmemcached/tests/namespace.h 041
src/libmemcached/tests/parser.am 028
src/libmemcached/tests/parser.cc 0107
src/libmemcached/tests/plus.cpp 3160
src/libmemcached/tests/pool.h 044
src/libmemcached/tests/print.h 048
src/libmemcached/tests/replication.h 054
src/libmemcached/tests/runner.h 0153
src/libmemcached/tests/server.c 2390
src/libmemcached/tests/server.h 330
src/libmemcached/tests/server_add.h 043
src/libmemcached/tests/start.c 290
src/libmemcached/tests/string.h 067
src/libmemcached/tests/test.c 3710
src/libmemcached/tests/test.h 1950
src/libmemcached/tests/touch.h 041
src/libmemcached/tests/virtual_buckets.h 051
src/libmemcached/unittests/include.am 200
src/libmemcached/unittests/main.cc 210
src/libmemcached/unittests/strings.cc 1340
src/libmemcached/util/daemon.cc 0194
src/libmemcached/util/daemon.hpp 043
src/libmemcached/util/include.am 021
src/libmemcached/util/instance.hpp 0117
src/libmemcached/util/log.hpp 0226
src/libmemcached/util/logfile.hpp 066
src/libmemcached/util/operation.hpp 0103
src/libmemcached/util/pidfile.cc 0162
src/libmemcached/util/pidfile.hpp 066
src/libmemcached/util/signal.hpp 0106
src/libmemcached/util/string.hpp 057
src/libmemcached/version.m4 01
src/libmemcached/win32/include.am 13
src/libmemcached/win32/wrappers.h 1335
src/libmemcached.patch 058
t/00-load.t 37
t/04-strerror.t 67
t/42-get_server_for_key.t 031
typemap 32
1001 files changed (This is a version diff) 81155160534
@@ -0,0 +1,13 @@
+language: perl
+perl:
+  - "5.18"
+  - "5.16"
+  - "5.14"
+  - "5.12"
+  - "5.10"
+services:
+  - memcached
+before_install:
+  - env | sort
+  - sudo apt-get install libcloog-ppl0
+  - cpanm --verbose --installdeps --notest . || echo failed
@@ -2,6 +2,28 @@
 
 Memcached::libmemcached::Changes - List of significant changes
 
+=head2 Changes in 1.001800 - 7th April 2014
+
+  Sync with libmemcached 1.0.18
+
+=head2 Changes in 1.001702 - 14th March 2014
+
+  Change bug tracker to GitHub
+  Fix link to current repository, also add to META. Thanks to dsteinbrunner
+  Work around missing libcloog-ppl0 compilation issues, RT#88378
+  Improve handling of case where last_return==MEMCACHED_ERRNO
+    but lmc_state->last_errno==0, RT#41299.
+
+=head2 Changes in 1.001701 - 2nd Sept 2013
+
+  Sync with libmemcached 1.0.17
+  Fixed links in docs, RT#66291
+  Fixed whatis in pod of Memcached::libmemcached::API, RT#71172
+  Fixed undef warnings related to expiration, RT#69996
+  Don't let DESTDIR env var upset libmemcached build (Chip Salzenberg).
+
+  Note that get_server_for_key() may have a memory leak.
+
 =head2 Changes in 0.4406 4th Jan 2011
 
   Added get_server_for_key() thanks to Roy Hooper.
@@ -1,3 +1,4 @@
+.travis.yml
 Changes
 lib/Memcached/libmemcached/API.pm
 lib/Memcached/libmemcached/constants.pm
@@ -28,30 +29,41 @@ lib/Memcached/libmemcached/memcached_version.pm
 libmemcached.pm
 libmemcached.xs
 Makefile.PL
-MANIFEST
+MANIFEST			This list of files
 ppport.h
-README
+README.md
 responses.csv
 responses.txt
-src/libmemcached/.quickly
 src/libmemcached/aclocal.m4
 src/libmemcached/AUTHORS
+src/libmemcached/build-aux/config.guess
+src/libmemcached/build-aux/config.sub
+src/libmemcached/build-aux/depcomp
+src/libmemcached/build-aux/install-sh
+src/libmemcached/build-aux/ltmain.sh
+src/libmemcached/build-aux/missing
+src/libmemcached/build-aux/test-driver
 src/libmemcached/ChangeLog
 src/libmemcached/clients/client_options.h
-src/libmemcached/clients/execute.c
+src/libmemcached/clients/execute.cc
 src/libmemcached/clients/execute.h
-src/libmemcached/clients/generator.c
+src/libmemcached/clients/generator.cc
 src/libmemcached/clients/generator.h
 src/libmemcached/clients/include.am
-src/libmemcached/clients/memcapable.c
-src/libmemcached/clients/memcat.c
-src/libmemcached/clients/memcp.c
-src/libmemcached/clients/memdump.c
-src/libmemcached/clients/memerror.c
-src/libmemcached/clients/memflush.c
-src/libmemcached/clients/memrm.c
-src/libmemcached/clients/memslap.c
-src/libmemcached/clients/memstat.c
+src/libmemcached/clients/memaslap.c
+src/libmemcached/clients/memcapable.cc
+src/libmemcached/clients/memcat.cc
+src/libmemcached/clients/memcp.cc
+src/libmemcached/clients/memdump.cc
+src/libmemcached/clients/memerror.cc
+src/libmemcached/clients/memexist.cc
+src/libmemcached/clients/memflush.cc
+src/libmemcached/clients/memparse.cc
+src/libmemcached/clients/memping.cc
+src/libmemcached/clients/memrm.cc
+src/libmemcached/clients/memslap.cc
+src/libmemcached/clients/memstat.cc
+src/libmemcached/clients/memtouch.cc
 src/libmemcached/clients/ms_atomic.h
 src/libmemcached/clients/ms_conn.c
 src/libmemcached/clients/ms_conn.h
@@ -66,330 +78,679 @@ src/libmemcached/clients/ms_task.c
 src/libmemcached/clients/ms_task.h
 src/libmemcached/clients/ms_thread.c
 src/libmemcached/clients/ms_thread.h
-src/libmemcached/clients/utilities.c
+src/libmemcached/clients/utilities.cc
 src/libmemcached/clients/utilities.h
-src/libmemcached/config.h.in
-src/libmemcached/config/autorun.sh
-src/libmemcached/config/compile
-src/libmemcached/config/config.guess
-src/libmemcached/config/config.rpath
-src/libmemcached/config/config.sub
-src/libmemcached/config/depcomp
-src/libmemcached/config/install-sh
-src/libmemcached/config/ltmain.sh
-src/libmemcached/config/missing
-src/libmemcached/config/pandora-plugin
-src/libmemcached/config/uncrustify.cfg
 src/libmemcached/configure
 src/libmemcached/configure.ac
 src/libmemcached/COPYING
-src/libmemcached/docs/hashkit_create.pod
-src/libmemcached/docs/hashkit_functions.pod
-src/libmemcached/docs/hashkit_value.pod
-src/libmemcached/docs/libmemcached.pod
-src/libmemcached/docs/libmemcached_examples.pod
-src/libmemcached/docs/libmemcachedutil.pod
-src/libmemcached/docs/make_index.pl
-src/libmemcached/docs/Makefile.am
-src/libmemcached/docs/Makefile.in
-src/libmemcached/docs/memcached_analyze.pod
-src/libmemcached/docs/memcached_auto.pod
-src/libmemcached/docs/memcached_behavior.pod
-src/libmemcached/docs/memcached_callback.pod
-src/libmemcached/docs/memcached_create.pod
-src/libmemcached/docs/memcached_delete.pod
-src/libmemcached/docs/memcached_dump.pod
-src/libmemcached/docs/memcached_flush.pod
-src/libmemcached/docs/memcached_flush_buffers.pod
-src/libmemcached/docs/memcached_generate_hash_value.pod
-src/libmemcached/docs/memcached_get.pod
-src/libmemcached/docs/memcached_memory_allocators.pod
-src/libmemcached/docs/memcached_pool.pod
-src/libmemcached/docs/memcached_quit.pod
-src/libmemcached/docs/memcached_result_st.pod
-src/libmemcached/docs/memcached_sasl.pod
-src/libmemcached/docs/memcached_server_st.pod
-src/libmemcached/docs/memcached_servers.pod
-src/libmemcached/docs/memcached_set.pod
-src/libmemcached/docs/memcached_stats.pod
-src/libmemcached/docs/memcached_strerror.pod
-src/libmemcached/docs/memcached_user_data.pod
-src/libmemcached/docs/memcached_verbosity.pod
-src/libmemcached/docs/memcached_version.pod
-src/libmemcached/docs/memcapable.pod
-src/libmemcached/docs/memcat.pod
-src/libmemcached/docs/memcp.pod
-src/libmemcached/docs/memdump.pod
-src/libmemcached/docs/memerror.pod
-src/libmemcached/docs/memflush.pod
-src/libmemcached/docs/memrm.pod
-src/libmemcached/docs/memslap.pod
-src/libmemcached/docs/memstat.pod
+src/libmemcached/docs/conf.py.in
+src/libmemcached/docs/include.am
+src/libmemcached/example/byteorder.cc
+src/libmemcached/example/byteorder.h
 src/libmemcached/example/include.am
-src/libmemcached/example/interface_v0.c
-src/libmemcached/example/interface_v1.c
-src/libmemcached/example/memcached_light.c
+src/libmemcached/example/interface_v0.cc
+src/libmemcached/example/interface_v1.cc
+src/libmemcached/example/memcached_light.cc
 src/libmemcached/example/memcached_light.h
-src/libmemcached/example/storage.c
+src/libmemcached/example/storage.cc
 src/libmemcached/example/storage.h
-src/libmemcached/example/storage_innodb.c
-src/libmemcached/libhashkit/algorithm.c
+src/libmemcached/libhashkit-1.0/algorithm.h
+src/libmemcached/libhashkit-1.0/behavior.h
+src/libmemcached/libhashkit-1.0/configure.h
+src/libmemcached/libhashkit-1.0/configure.h.in
+src/libmemcached/libhashkit-1.0/digest.h
+src/libmemcached/libhashkit-1.0/function.h
+src/libmemcached/libhashkit-1.0/has.h
+src/libmemcached/libhashkit-1.0/hashkit.h
+src/libmemcached/libhashkit-1.0/hashkit.hpp
+src/libmemcached/libhashkit-1.0/include.am
+src/libmemcached/libhashkit-1.0/str_algorithm.h
+src/libmemcached/libhashkit-1.0/strerror.h
+src/libmemcached/libhashkit-1.0/string.h
+src/libmemcached/libhashkit-1.0/types.h
+src/libmemcached/libhashkit-1.0/visibility.h
+src/libmemcached/libhashkit/aes.cc
+src/libmemcached/libhashkit/aes.h
+src/libmemcached/libhashkit/algorithm.cc
 src/libmemcached/libhashkit/algorithm.h
-src/libmemcached/libhashkit/behavior.c
-src/libmemcached/libhashkit/behavior.h
+src/libmemcached/libhashkit/behavior.cc
 src/libmemcached/libhashkit/common.h
-src/libmemcached/libhashkit/configure.h.in
-src/libmemcached/libhashkit/crc32.c
-src/libmemcached/libhashkit/digest.c
-src/libmemcached/libhashkit/digest.h
-src/libmemcached/libhashkit/fnv.c
-src/libmemcached/libhashkit/function.c
-src/libmemcached/libhashkit/function.h
-src/libmemcached/libhashkit/hashkit.c
+src/libmemcached/libhashkit/crc32.cc
+src/libmemcached/libhashkit/digest.cc
+src/libmemcached/libhashkit/encrypt.cc
+src/libmemcached/libhashkit/fnv_32.cc
+src/libmemcached/libhashkit/fnv_64.cc
+src/libmemcached/libhashkit/function.cc
+src/libmemcached/libhashkit/has.cc
+src/libmemcached/libhashkit/hashkit.cc
 src/libmemcached/libhashkit/hashkit.h
-src/libmemcached/libhashkit/hsieh.c
+src/libmemcached/libhashkit/hashkitcon.h.in
+src/libmemcached/libhashkit/hsieh.cc
 src/libmemcached/libhashkit/include.am
-src/libmemcached/libhashkit/jenkins.c
-src/libmemcached/libhashkit/ketama.c
-src/libmemcached/libhashkit/md5.c
-src/libmemcached/libhashkit/murmur.c
-src/libmemcached/libhashkit/one_at_a_time.c
-src/libmemcached/libhashkit/strerror.c
-src/libmemcached/libhashkit/strerror.h
-src/libmemcached/libhashkit/types.h
-src/libmemcached/libhashkit/visibility.h
-src/libmemcached/libmemcached/allocators.c
-src/libmemcached/libmemcached/allocators.h
-src/libmemcached/libmemcached/analyze.c
-src/libmemcached/libmemcached/analyze.h
-src/libmemcached/libmemcached/auto.c
-src/libmemcached/libmemcached/auto.h
-src/libmemcached/libmemcached/behavior.c
-src/libmemcached/libmemcached/behavior.h
-src/libmemcached/libmemcached/byteorder.c
+src/libmemcached/libhashkit/include.m4
+src/libmemcached/libhashkit/is.h
+src/libmemcached/libhashkit/jenkins.cc
+src/libmemcached/libhashkit/ketama.cc
+src/libmemcached/libhashkit/md5.cc
+src/libmemcached/libhashkit/murmur.cc
+src/libmemcached/libhashkit/murmur3.cc
+src/libmemcached/libhashkit/murmur3.h
+src/libmemcached/libhashkit/murmur3_api.cc
+src/libmemcached/libhashkit/nohsieh.cc
+src/libmemcached/libhashkit/one_at_a_time.cc
+src/libmemcached/libhashkit/rijndael.cc
+src/libmemcached/libhashkit/rijndael.hpp
+src/libmemcached/libhashkit/str_algorithm.cc
+src/libmemcached/libhashkit/strerror.cc
+src/libmemcached/libhashkit/string.cc
+src/libmemcached/libhashkit/string.h
+src/libmemcached/libmemcached-1.0/alloc.h
+src/libmemcached/libmemcached-1.0/allocators.h
+src/libmemcached/libmemcached-1.0/analyze.h
+src/libmemcached/libmemcached-1.0/auto.h
+src/libmemcached/libmemcached-1.0/basic_string.h
+src/libmemcached/libmemcached-1.0/behavior.h
+src/libmemcached/libmemcached-1.0/callback.h
+src/libmemcached/libmemcached-1.0/callbacks.h
+src/libmemcached/libmemcached-1.0/configure.h
+src/libmemcached/libmemcached-1.0/configure.h.in
+src/libmemcached/libmemcached-1.0/defaults.h
+src/libmemcached/libmemcached-1.0/delete.h
+src/libmemcached/libmemcached-1.0/deprecated_types.h
+src/libmemcached/libmemcached-1.0/dump.h
+src/libmemcached/libmemcached-1.0/encoding_key.h
+src/libmemcached/libmemcached-1.0/error.h
+src/libmemcached/libmemcached-1.0/exception.hpp
+src/libmemcached/libmemcached-1.0/exist.h
+src/libmemcached/libmemcached-1.0/fetch.h
+src/libmemcached/libmemcached-1.0/flush.h
+src/libmemcached/libmemcached-1.0/flush_buffers.h
+src/libmemcached/libmemcached-1.0/get.h
+src/libmemcached/libmemcached-1.0/hash.h
+src/libmemcached/libmemcached-1.0/include.am
+src/libmemcached/libmemcached-1.0/limits.h
+src/libmemcached/libmemcached-1.0/memcached.h
+src/libmemcached/libmemcached-1.0/memcached.hpp
+src/libmemcached/libmemcached-1.0/options.h
+src/libmemcached/libmemcached-1.0/parse.h
+src/libmemcached/libmemcached-1.0/platform.h
+src/libmemcached/libmemcached-1.0/quit.h
+src/libmemcached/libmemcached-1.0/result.h
+src/libmemcached/libmemcached-1.0/return.h
+src/libmemcached/libmemcached-1.0/sasl.h
+src/libmemcached/libmemcached-1.0/server.h
+src/libmemcached/libmemcached-1.0/server_list.h
+src/libmemcached/libmemcached-1.0/stats.h
+src/libmemcached/libmemcached-1.0/storage.h
+src/libmemcached/libmemcached-1.0/strerror.h
+src/libmemcached/libmemcached-1.0/struct/allocator.h
+src/libmemcached/libmemcached-1.0/struct/analysis.h
+src/libmemcached/libmemcached-1.0/struct/callback.h
+src/libmemcached/libmemcached-1.0/struct/include.am
+src/libmemcached/libmemcached-1.0/struct/memcached.h
+src/libmemcached/libmemcached-1.0/struct/result.h
+src/libmemcached/libmemcached-1.0/struct/sasl.h
+src/libmemcached/libmemcached-1.0/struct/server.h
+src/libmemcached/libmemcached-1.0/struct/stat.h
+src/libmemcached/libmemcached-1.0/struct/string.h
+src/libmemcached/libmemcached-1.0/t/c_sasl_test.c
+src/libmemcached/libmemcached-1.0/t/c_test.c
+src/libmemcached/libmemcached-1.0/t/cc_test.cc
+src/libmemcached/libmemcached-1.0/t/include.am
+src/libmemcached/libmemcached-1.0/touch.h
+src/libmemcached/libmemcached-1.0/triggers.h
+src/libmemcached/libmemcached-1.0/types.h
+src/libmemcached/libmemcached-1.0/types/behavior.h
+src/libmemcached/libmemcached-1.0/types/callback.h
+src/libmemcached/libmemcached-1.0/types/connection.h
+src/libmemcached/libmemcached-1.0/types/hash.h
+src/libmemcached/libmemcached-1.0/types/include.am
+src/libmemcached/libmemcached-1.0/types/return.h
+src/libmemcached/libmemcached-1.0/types/server_distribution.h
+src/libmemcached/libmemcached-1.0/verbosity.h
+src/libmemcached/libmemcached-1.0/version.h
+src/libmemcached/libmemcached-1.0/visibility.h
+src/libmemcached/libmemcached/allocators.cc
+src/libmemcached/libmemcached/allocators.hpp
+src/libmemcached/libmemcached/analyze.cc
+src/libmemcached/libmemcached/array.c
+src/libmemcached/libmemcached/array.h
+src/libmemcached/libmemcached/assert.hpp
+src/libmemcached/libmemcached/auto.cc
+src/libmemcached/libmemcached/backtrace.cc
+src/libmemcached/libmemcached/backtrace.hpp
+src/libmemcached/libmemcached/behavior.cc
+src/libmemcached/libmemcached/behavior.hpp
+src/libmemcached/libmemcached/byteorder.cc
 src/libmemcached/libmemcached/byteorder.h
-src/libmemcached/libmemcached/callback.c
-src/libmemcached/libmemcached/callback.h
+src/libmemcached/libmemcached/callback.cc
 src/libmemcached/libmemcached/common.h
-src/libmemcached/libmemcached/configure.h.in
-src/libmemcached/libmemcached/connect.c
-src/libmemcached/libmemcached/constants.h
-src/libmemcached/libmemcached/delete.c
-src/libmemcached/libmemcached/delete.h
-src/libmemcached/libmemcached/do.c
-src/libmemcached/libmemcached/do.h
-src/libmemcached/libmemcached/dump.c
-src/libmemcached/libmemcached/dump.h
-src/libmemcached/libmemcached/exception.hpp
-src/libmemcached/libmemcached/fetch.c
-src/libmemcached/libmemcached/fetch.h
-src/libmemcached/libmemcached/flush.c
-src/libmemcached/libmemcached/flush.h
-src/libmemcached/libmemcached/flush_buffers.c
-src/libmemcached/libmemcached/flush_buffers.h
-src/libmemcached/libmemcached/get.c
-src/libmemcached/libmemcached/get.h
-src/libmemcached/libmemcached/hash.c
-src/libmemcached/libmemcached/hash.h
-src/libmemcached/libmemcached/hosts.c
+src/libmemcached/libmemcached/connect.cc
+src/libmemcached/libmemcached/connect.hpp
+src/libmemcached/libmemcached/continuum.hpp
+src/libmemcached/libmemcached/csl/common.h
+src/libmemcached/libmemcached/csl/context.cc
+src/libmemcached/libmemcached/csl/context.h
+src/libmemcached/libmemcached/csl/include.am
+src/libmemcached/libmemcached/csl/parser.cc
+src/libmemcached/libmemcached/csl/parser.h
+src/libmemcached/libmemcached/csl/parser.yy
+src/libmemcached/libmemcached/csl/scanner.cc
+src/libmemcached/libmemcached/csl/scanner.h
+src/libmemcached/libmemcached/csl/scanner.l
+src/libmemcached/libmemcached/csl/server.h
+src/libmemcached/libmemcached/csl/symbol.h
+src/libmemcached/libmemcached/delete.cc
+src/libmemcached/libmemcached/do.cc
+src/libmemcached/libmemcached/do.hpp
+src/libmemcached/libmemcached/dump.cc
+src/libmemcached/libmemcached/encoding_key.cc
+src/libmemcached/libmemcached/encoding_key.h
+src/libmemcached/libmemcached/error.cc
+src/libmemcached/libmemcached/error.hpp
+src/libmemcached/libmemcached/exist.cc
+src/libmemcached/libmemcached/fetch.cc
+src/libmemcached/libmemcached/flag.cc
+src/libmemcached/libmemcached/flag.hpp
+src/libmemcached/libmemcached/flush.cc
+src/libmemcached/libmemcached/flush_buffers.cc
+src/libmemcached/libmemcached/get.cc
+src/libmemcached/libmemcached/hash.cc
+src/libmemcached/libmemcached/hash.hpp
+src/libmemcached/libmemcached/hosts.cc
 src/libmemcached/libmemcached/include.am
+src/libmemcached/libmemcached/initialize_query.cc
+src/libmemcached/libmemcached/initialize_query.h
+src/libmemcached/libmemcached/instance.cc
+src/libmemcached/libmemcached/instance.hpp
 src/libmemcached/libmemcached/internal.h
-src/libmemcached/libmemcached/io.c
+src/libmemcached/libmemcached/io.cc
 src/libmemcached/libmemcached/io.h
-src/libmemcached/libmemcached/key.c
+src/libmemcached/libmemcached/io.hpp
+src/libmemcached/libmemcached/is.h
+src/libmemcached/libmemcached/key.cc
+src/libmemcached/libmemcached/key.hpp
 src/libmemcached/libmemcached/libmemcached_probes.d
 src/libmemcached/libmemcached/libmemcached_probes.h
-src/libmemcached/libmemcached/memcached.c
+src/libmemcached/libmemcached/memcached.cc
 src/libmemcached/libmemcached/memcached.h
 src/libmemcached/libmemcached/memcached.hpp
 src/libmemcached/libmemcached/memcached/protocol_binary.h
 src/libmemcached/libmemcached/memcached/README.txt
-src/libmemcached/libmemcached/memcached_util.h
-src/libmemcached/libmemcached/parse.c
-src/libmemcached/libmemcached/parse.h
-src/libmemcached/libmemcached/platform.h
-src/libmemcached/libmemcached/protocol/ascii_handler.c
-src/libmemcached/libmemcached/protocol/ascii_handler.h
-src/libmemcached/libmemcached/protocol/binary_handler.c
-src/libmemcached/libmemcached/protocol/binary_handler.h
-src/libmemcached/libmemcached/protocol/cache.c
-src/libmemcached/libmemcached/protocol/cache.h
-src/libmemcached/libmemcached/protocol/callback.h
-src/libmemcached/libmemcached/protocol/common.h
-src/libmemcached/libmemcached/protocol/pedantic.c
-src/libmemcached/libmemcached/protocol/protocol_handler.c
-src/libmemcached/libmemcached/protocol_handler.h
-src/libmemcached/libmemcached/purge.c
-src/libmemcached/libmemcached/quit.c
-src/libmemcached/libmemcached/quit.h
-src/libmemcached/libmemcached/response.c
+src/libmemcached/libmemcached/memcached/vbucket.h
+src/libmemcached/libmemcached/memory.h
+src/libmemcached/libmemcached/namespace.cc
+src/libmemcached/libmemcached/namespace.h
+src/libmemcached/libmemcached/options.cc
+src/libmemcached/libmemcached/options.hpp
+src/libmemcached/libmemcached/parse.cc
+src/libmemcached/libmemcached/poll.cc
+src/libmemcached/libmemcached/poll.h
+src/libmemcached/libmemcached/purge.cc
+src/libmemcached/libmemcached/quit.cc
+src/libmemcached/libmemcached/quit.hpp
+src/libmemcached/libmemcached/response.cc
 src/libmemcached/libmemcached/response.h
-src/libmemcached/libmemcached/result.c
+src/libmemcached/libmemcached/result.cc
 src/libmemcached/libmemcached/result.h
-src/libmemcached/libmemcached/sasl.c
-src/libmemcached/libmemcached/sasl.h
-src/libmemcached/libmemcached/server.c
-src/libmemcached/libmemcached/server.h
-src/libmemcached/libmemcached/server_list.c
-src/libmemcached/libmemcached/server_list.h
-src/libmemcached/libmemcached/stats.c
-src/libmemcached/libmemcached/stats.h
-src/libmemcached/libmemcached/storage.c
-src/libmemcached/libmemcached/storage.h
-src/libmemcached/libmemcached/strerror.c
-src/libmemcached/libmemcached/strerror.h
-src/libmemcached/libmemcached/string.c
-src/libmemcached/libmemcached/string.h
-src/libmemcached/libmemcached/types.h
+src/libmemcached/libmemcached/sasl.cc
+src/libmemcached/libmemcached/sasl.hpp
+src/libmemcached/libmemcached/server.cc
+src/libmemcached/libmemcached/server.hpp
+src/libmemcached/libmemcached/server_instance.h
+src/libmemcached/libmemcached/server_list.cc
+src/libmemcached/libmemcached/server_list.hpp
+src/libmemcached/libmemcached/socket.hpp
+src/libmemcached/libmemcached/stats.cc
+src/libmemcached/libmemcached/storage.cc
+src/libmemcached/libmemcached/strerror.cc
+src/libmemcached/libmemcached/string.cc
+src/libmemcached/libmemcached/string.hpp
+src/libmemcached/libmemcached/touch.cc
+src/libmemcached/libmemcached/udp.cc
+src/libmemcached/libmemcached/udp.hpp
 src/libmemcached/libmemcached/util.h
-src/libmemcached/libmemcached/util/ping.c
-src/libmemcached/libmemcached/util/ping.h
-src/libmemcached/libmemcached/util/pool.c
-src/libmemcached/libmemcached/util/pool.h
-src/libmemcached/libmemcached/util/version.c
-src/libmemcached/libmemcached/util/version.h
-src/libmemcached/libmemcached/verbosity.c
-src/libmemcached/libmemcached/verbosity.h
-src/libmemcached/libmemcached/version.c
-src/libmemcached/libmemcached/version.h
-src/libmemcached/libmemcached/visibility.h
+src/libmemcached/libmemcached/verbosity.cc
+src/libmemcached/libmemcached/version.cc
+src/libmemcached/libmemcached/version.hpp
+src/libmemcached/libmemcached/virtual_bucket.c
+src/libmemcached/libmemcached/virtual_bucket.h
 src/libmemcached/libmemcached/watchpoint.h
-src/libmemcached/m4/ac_cxx_compile_stdcxx_0x.m4
-src/libmemcached/m4/ac_cxx_header_stdcxx_98.m4
-src/libmemcached/m4/acx_pthread.m4
+src/libmemcached/libmemcached/windows.hpp
+src/libmemcached/libmemcachedinternal/include.am
+src/libmemcached/libmemcachedinternal/util/include.am
+src/libmemcached/libmemcachedprotocol-0.0/binary.h
+src/libmemcached/libmemcachedprotocol-0.0/callback.h
+src/libmemcached/libmemcachedprotocol-0.0/handler.h
+src/libmemcached/libmemcachedprotocol-0.0/include.am
+src/libmemcached/libmemcachedprotocol-0.0/vbucket.h
+src/libmemcached/libmemcachedprotocol/ascii_handler.c
+src/libmemcached/libmemcachedprotocol/ascii_handler.h
+src/libmemcached/libmemcachedprotocol/binary_handler.c
+src/libmemcached/libmemcachedprotocol/binary_handler.h
+src/libmemcached/libmemcachedprotocol/cache.c
+src/libmemcached/libmemcachedprotocol/cache.h
+src/libmemcached/libmemcachedprotocol/common.h
+src/libmemcached/libmemcachedprotocol/handler.c
+src/libmemcached/libmemcachedprotocol/include.am
+src/libmemcached/libmemcachedprotocol/pedantic.c
+src/libmemcached/libmemcachedutil-1.0/flush.h
+src/libmemcached/libmemcachedutil-1.0/include.am
+src/libmemcached/libmemcachedutil-1.0/ostream.hpp
+src/libmemcached/libmemcachedutil-1.0/pid.h
+src/libmemcached/libmemcachedutil-1.0/ping.h
+src/libmemcached/libmemcachedutil-1.0/pool.h
+src/libmemcached/libmemcachedutil-1.0/util.h
+src/libmemcached/libmemcachedutil-1.0/version.h
+src/libmemcached/libmemcachedutil/common.h
+src/libmemcached/libmemcachedutil/flush.cc
+src/libmemcached/libmemcachedutil/include.am
+src/libmemcached/libmemcachedutil/pid.cc
+src/libmemcached/libmemcachedutil/ping.cc
+src/libmemcached/libmemcachedutil/pool.cc
+src/libmemcached/libmemcachedutil/version.cc
+src/libmemcached/libtest/abort.cc
+src/libmemcached/libtest/alarm.cc
+src/libmemcached/libtest/alarm.h
+src/libmemcached/libtest/backtrace_test.cc
+src/libmemcached/libtest/binaries.cc
+src/libmemcached/libtest/binaries.h
+src/libmemcached/libtest/blobslap_worker.cc
+src/libmemcached/libtest/blobslap_worker.h
+src/libmemcached/libtest/callbacks.h
+src/libmemcached/libtest/client.cc
+src/libmemcached/libtest/client.hpp
+src/libmemcached/libtest/cmdline.cc
+src/libmemcached/libtest/cmdline.h
+src/libmemcached/libtest/collection.cc
+src/libmemcached/libtest/collection.h
+src/libmemcached/libtest/common.h
+src/libmemcached/libtest/comparison.cc
+src/libmemcached/libtest/comparison.hpp
+src/libmemcached/libtest/core.cc
+src/libmemcached/libtest/core.h
+src/libmemcached/libtest/core_count.cc
+src/libmemcached/libtest/cpu.cc
+src/libmemcached/libtest/cpu.hpp
+src/libmemcached/libtest/dns.cc
+src/libmemcached/libtest/dns.hpp
+src/libmemcached/libtest/dream.cc
+src/libmemcached/libtest/dream.h
+src/libmemcached/libtest/drizzled.cc
+src/libmemcached/libtest/drizzled.h
+src/libmemcached/libtest/error.h
+src/libmemcached/libtest/exception.cc
+src/libmemcached/libtest/exception.hpp
+src/libmemcached/libtest/exception/disconnected.hpp
+src/libmemcached/libtest/exception/fatal.cc
+src/libmemcached/libtest/exception/fatal.hpp
+src/libmemcached/libtest/formatter.cc
+src/libmemcached/libtest/formatter.hpp
+src/libmemcached/libtest/framework.cc
+src/libmemcached/libtest/framework.h
+src/libmemcached/libtest/gearmand.cc
+src/libmemcached/libtest/gearmand.h
+src/libmemcached/libtest/get.h
+src/libmemcached/libtest/has.cc
+src/libmemcached/libtest/has.hpp
+src/libmemcached/libtest/http.cc
+src/libmemcached/libtest/http.hpp
+src/libmemcached/libtest/include.am
+src/libmemcached/libtest/is_local.cc
+src/libmemcached/libtest/is_local.hpp
+src/libmemcached/libtest/is_pid.hpp
+src/libmemcached/libtest/killpid.cc
+src/libmemcached/libtest/killpid.h
+src/libmemcached/libtest/libtool.cc
+src/libmemcached/libtest/libtool.hpp
+src/libmemcached/libtest/lite.h
+src/libmemcached/libtest/m4/ax_lib_mysql.m4
+src/libmemcached/libtest/m4/ax_prog_mysqld.m4
+src/libmemcached/libtest/m4/mysql.m4
+src/libmemcached/libtest/main.cc
+src/libmemcached/libtest/memcached.cc
+src/libmemcached/libtest/memcached.h
+src/libmemcached/libtest/memcached.hpp
+src/libmemcached/libtest/poll_error.hpp
+src/libmemcached/libtest/port.cc
+src/libmemcached/libtest/port.h
+src/libmemcached/libtest/result.cc
+src/libmemcached/libtest/result.hpp
+src/libmemcached/libtest/result/base.hpp
+src/libmemcached/libtest/result/fail.hpp
+src/libmemcached/libtest/result/skip.hpp
+src/libmemcached/libtest/result/success.hpp
+src/libmemcached/libtest/run.gdb
+src/libmemcached/libtest/runner.cc
+src/libmemcached/libtest/runner.h
+src/libmemcached/libtest/server.cc
+src/libmemcached/libtest/server.h
+src/libmemcached/libtest/server_container.cc
+src/libmemcached/libtest/server_container.h
+src/libmemcached/libtest/signal.cc
+src/libmemcached/libtest/signal.h
+src/libmemcached/libtest/skiptest.cc
+src/libmemcached/libtest/socket.cc
+src/libmemcached/libtest/socket.hpp
+src/libmemcached/libtest/stream.h
+src/libmemcached/libtest/strerror.cc
+src/libmemcached/libtest/strerror.h
+src/libmemcached/libtest/string.hpp
+src/libmemcached/libtest/test.h
+src/libmemcached/libtest/test.hpp
+src/libmemcached/libtest/thread.hpp
+src/libmemcached/libtest/timer.cc
+src/libmemcached/libtest/timer.hpp
+src/libmemcached/libtest/tmpfile.cc
+src/libmemcached/libtest/tmpfile.hpp
+src/libmemcached/libtest/unittest.cc
+src/libmemcached/libtest/valgrind.h
+src/libmemcached/libtest/vchar.cc
+src/libmemcached/libtest/vchar.hpp
+src/libmemcached/libtest/version.h
+src/libmemcached/libtest/version.h.in
+src/libmemcached/libtest/visibility.h
+src/libmemcached/libtest/wait.cc
+src/libmemcached/libtest/wait.h
+src/libmemcached/libtest/yatl.h
+src/libmemcached/libtest/yatl.m4
+src/libmemcached/libtest/yatlcon.h.in
+src/libmemcached/m4/ax_add_am_macro.m4
+src/libmemcached/m4/ax_am_jobserver.m4
+src/libmemcached/m4/ax_am_macros.m4
+src/libmemcached/m4/ax_append_compile_flags.m4
+src/libmemcached/m4/ax_append_flag.m4
+src/libmemcached/m4/ax_append_link_flags.m4
+src/libmemcached/m4/ax_append_to_file.m4
+src/libmemcached/m4/ax_assert.m4
+src/libmemcached/m4/ax_check_compile_flag.m4
+src/libmemcached/m4/ax_check_library.m4
+src/libmemcached/m4/ax_check_link_flag.m4
+src/libmemcached/m4/ax_compiler_vendor.m4
+src/libmemcached/m4/ax_compiler_version.m4
+src/libmemcached/m4/ax_count_cpus.m4
+src/libmemcached/m4/ax_cxx_gcc_abi_demangle.m4
+src/libmemcached/m4/ax_debug.m4
+src/libmemcached/m4/ax_endian.m4
+src/libmemcached/m4/ax_file_escapes.m4
+src/libmemcached/m4/ax_gcc_atomic_builtins.m4
+src/libmemcached/m4/ax_harden_compiler_flags.m4
+src/libmemcached/m4/ax_hex_version.m4
+src/libmemcached/m4/ax_libevent.m4
+src/libmemcached/m4/ax_libmemcached.m4
+src/libmemcached/m4/ax_memcached.m4
+src/libmemcached/m4/ax_platform.m4
+src/libmemcached/m4/ax_print_to_file.m4
+src/libmemcached/m4/ax_prog_sphinx_build.m4
+src/libmemcached/m4/ax_pthread.m4
+src/libmemcached/m4/ax_pthread_timedjoin_np.m4
+src/libmemcached/m4/ax_restore_flags.m4
+src/libmemcached/m4/ax_sasl.m4
+src/libmemcached/m4/ax_save_flags.m4
+src/libmemcached/m4/ax_uuid.m4
+src/libmemcached/m4/ax_vcs_checkout.m4
+src/libmemcached/m4/ax_with_prog.m4
+src/libmemcached/m4/bottom.m4
 src/libmemcached/m4/byteorder.m4
 src/libmemcached/m4/deprecated.m4
-src/libmemcached/m4/eagain.m4
-src/libmemcached/m4/enable_utillib.m4
-src/libmemcached/m4/gettext.m4
+src/libmemcached/m4/fnv.m4
+src/libmemcached/m4/gearmand.m4
+src/libmemcached/m4/have_cinttypes.m4
+src/libmemcached/m4/have_cstdint.m4
 src/libmemcached/m4/hsieh.m4
-src/libmemcached/m4/iconv.m4
-src/libmemcached/m4/lib-ld.m4
-src/libmemcached/m4/lib-link.m4
-src/libmemcached/m4/lib-prefix.m4
+src/libmemcached/m4/include.am
+src/libmemcached/m4/libgearman.m4
 src/libmemcached/m4/libtool.m4
 src/libmemcached/m4/ltoptions.m4
 src/libmemcached/m4/ltsugar.m4
 src/libmemcached/m4/ltversion.m4
 src/libmemcached/m4/lt~obsolete.m4
-src/libmemcached/m4/memcached.m4
-src/libmemcached/m4/pandora_64bit.m4
-src/libmemcached/m4/pandora_canonical.m4
-src/libmemcached/m4/pandora_check_compiler_version.m4
-src/libmemcached/m4/pandora_check_cxx_standard.m4
-src/libmemcached/m4/pandora_cinttypes.m4
-src/libmemcached/m4/pandora_clock_gettime.m4
-src/libmemcached/m4/pandora_cstdint.m4
-src/libmemcached/m4/pandora_cxx_demangle.m4
-src/libmemcached/m4/pandora_drizzle_build.m4
+src/libmemcached/m4/memaslap.m4
+src/libmemcached/m4/murmur.m4
 src/libmemcached/m4/pandora_enable_dtrace.m4
-src/libmemcached/m4/pandora_ensure_gcc_version.m4
-src/libmemcached/m4/pandora_extensions.m4
-src/libmemcached/m4/pandora_fdatasync.m4
-src/libmemcached/m4/pandora_have_better_malloc.m4
-src/libmemcached/m4/pandora_have_boost.m4
-src/libmemcached/m4/pandora_have_gcc_atomics.m4
-src/libmemcached/m4/pandora_have_innodb.m4
-src/libmemcached/m4/pandora_have_libavahi.m4
-src/libmemcached/m4/pandora_have_libbdb.m4
-src/libmemcached/m4/pandora_have_libboost_options.m4
-src/libmemcached/m4/pandora_have_libcassandra.m4
-src/libmemcached/m4/pandora_have_libdl.m4
-src/libmemcached/m4/pandora_have_libdrizzle.m4
-src/libmemcached/m4/pandora_have_libevent.m4
-src/libmemcached/m4/pandora_have_libgearman.m4
-src/libmemcached/m4/pandora_have_libgtest.m4
-src/libmemcached/m4/pandora_have_libhashkit.m4
-src/libmemcached/m4/pandora_have_libinnodb.m4
-src/libmemcached/m4/pandora_have_libldap.m4
-src/libmemcached/m4/pandora_have_libmemcached.m4
-src/libmemcached/m4/pandora_have_libmysqlclient.m4
-src/libmemcached/m4/pandora_have_libndbclient.m4
-src/libmemcached/m4/pandora_have_libpcre.m4
-src/libmemcached/m4/pandora_have_libpq.m4
-src/libmemcached/m4/pandora_have_libpqxx.m4
-src/libmemcached/m4/pandora_have_libreadline.m4
-src/libmemcached/m4/pandora_have_libsqlite3.m4
-src/libmemcached/m4/pandora_have_libtokyocabinet.m4
-src/libmemcached/m4/pandora_have_libuuid.m4
-src/libmemcached/m4/pandora_have_libvbucket.m4
-src/libmemcached/m4/pandora_have_libxml2.m4
-src/libmemcached/m4/pandora_have_libz.m4
-src/libmemcached/m4/pandora_have_protobuf.m4
-src/libmemcached/m4/pandora_have_sasl.m4
-src/libmemcached/m4/pandora_have_thrift.m4
-src/libmemcached/m4/pandora_header_assert.m4
-src/libmemcached/m4/pandora_libtool.m4
-src/libmemcached/m4/pandora_optimize.m4
-src/libmemcached/m4/pandora_platform.m4
-src/libmemcached/m4/pandora_plugins.m4
-src/libmemcached/m4/pandora_print_callstack.m4
-src/libmemcached/m4/pandora_pthread.m4
-src/libmemcached/m4/pandora_python3_devel.m4
-src/libmemcached/m4/pandora_run_cpplint.m4
-src/libmemcached/m4/pandora_sasl.m4
-src/libmemcached/m4/pandora_shared_ptr.m4
-src/libmemcached/m4/pandora_stack_direction.m4
-src/libmemcached/m4/pandora_stl_hash.m4
-src/libmemcached/m4/pandora_swig.m4
-src/libmemcached/m4/pandora_use_pipe.m4
-src/libmemcached/m4/pandora_vc_build.m4
-src/libmemcached/m4/pandora_version.m4
-src/libmemcached/m4/pandora_visibility.m4
-src/libmemcached/m4/pandora_warnings.m4
-src/libmemcached/m4/pandora_with_gettext.m4
-src/libmemcached/m4/pandora_with_lua.m4
-src/libmemcached/m4/pandora_with_memcached.m4
-src/libmemcached/m4/pandora_with_perl.m4
-src/libmemcached/m4/pandora_with_php.m4
-src/libmemcached/m4/pandora_with_python.m4
-src/libmemcached/m4/pandora_with_python3.m4
-src/libmemcached/m4/pandora_with_r.m4
-src/libmemcached/m4/pandora_with_ruby.m4
-src/libmemcached/m4/pkg.m4
-src/libmemcached/m4/po.m4
-src/libmemcached/m4/pod2man.m4
-src/libmemcached/m4/podchecker.m4
-src/libmemcached/m4/progtest.m4
 src/libmemcached/m4/protocol_binary.m4
 src/libmemcached/m4/setsockopt.m4
+src/libmemcached/m4/socket_send_flags.m4
+src/libmemcached/m4/visibility.m4
 src/libmemcached/Makefile.am
 src/libmemcached/Makefile.in
+src/libmemcached/man/hashkit_clone.3
+src/libmemcached/man/hashkit_crc32.3
+src/libmemcached/man/hashkit_create.3
+src/libmemcached/man/hashkit_fnv1_32.3
+src/libmemcached/man/hashkit_fnv1_64.3
+src/libmemcached/man/hashkit_fnv1a_32.3
+src/libmemcached/man/hashkit_fnv1a_64.3
+src/libmemcached/man/hashkit_free.3
+src/libmemcached/man/hashkit_functions.3
+src/libmemcached/man/hashkit_hsieh.3
+src/libmemcached/man/hashkit_is_allocated.3
+src/libmemcached/man/hashkit_jenkins.3
+src/libmemcached/man/hashkit_md5.3
+src/libmemcached/man/hashkit_murmur.3
+src/libmemcached/man/hashkit_value.3
+src/libmemcached/man/include.am
+src/libmemcached/man/libhashkit.3
+src/libmemcached/man/libmemcached.3
+src/libmemcached/man/libmemcached_check_configuration.3
+src/libmemcached/man/libmemcached_configuration.3
+src/libmemcached/man/libmemcached_examples.3
+src/libmemcached/man/libmemcachedutil.3
+src/libmemcached/man/memaslap.1
+src/libmemcached/man/memcached.3
+src/libmemcached/man/memcached_add.3
+src/libmemcached/man/memcached_add_by_key.3
+src/libmemcached/man/memcached_analyze.3
+src/libmemcached/man/memcached_append.3
+src/libmemcached/man/memcached_append_by_key.3
+src/libmemcached/man/memcached_behavior_get.3
+src/libmemcached/man/memcached_behavior_set.3
+src/libmemcached/man/memcached_callback_get.3
+src/libmemcached/man/memcached_callback_set.3
+src/libmemcached/man/memcached_cas.3
+src/libmemcached/man/memcached_cas_by_key.3
+src/libmemcached/man/memcached_clone.3
+src/libmemcached/man/memcached_create.3
+src/libmemcached/man/memcached_decrement.3
+src/libmemcached/man/memcached_decrement_with_initial.3
+src/libmemcached/man/memcached_delete.3
+src/libmemcached/man/memcached_delete_by_key.3
+src/libmemcached/man/memcached_destroy_sasl_auth_data.3
+src/libmemcached/man/memcached_dump.3
+src/libmemcached/man/memcached_exist.3
+src/libmemcached/man/memcached_exist_by_key.3
+src/libmemcached/man/memcached_fetch.3
+src/libmemcached/man/memcached_fetch_execute.3
+src/libmemcached/man/memcached_fetch_result.3
+src/libmemcached/man/memcached_flush_buffers.3
+src/libmemcached/man/memcached_free.3
+src/libmemcached/man/memcached_generate_hash.3
+src/libmemcached/man/memcached_generate_hash_value.3
+src/libmemcached/man/memcached_get.3
+src/libmemcached/man/memcached_get_by_key.3
+src/libmemcached/man/memcached_get_memory_allocators.3
+src/libmemcached/man/memcached_get_sasl_callbacks.3
+src/libmemcached/man/memcached_get_user_data.3
+src/libmemcached/man/memcached_increment.3
+src/libmemcached/man/memcached_increment_with_initial.3
+src/libmemcached/man/memcached_last_error_message.3
+src/libmemcached/man/memcached_lib_version.3
+src/libmemcached/man/memcached_mget.3
+src/libmemcached/man/memcached_mget_by_key.3
+src/libmemcached/man/memcached_mget_execute.3
+src/libmemcached/man/memcached_mget_execute_by_key.3
+src/libmemcached/man/memcached_pool.3
+src/libmemcached/man/memcached_pool_behavior_get.3
+src/libmemcached/man/memcached_pool_behavior_set.3
+src/libmemcached/man/memcached_pool_create.3
+src/libmemcached/man/memcached_pool_destroy.3
+src/libmemcached/man/memcached_pool_fetch.3
+src/libmemcached/man/memcached_pool_pop.3
+src/libmemcached/man/memcached_pool_push.3
+src/libmemcached/man/memcached_pool_release.3
+src/libmemcached/man/memcached_pool_st.3
+src/libmemcached/man/memcached_prepend.3
+src/libmemcached/man/memcached_prepend_by_key.3
+src/libmemcached/man/memcached_quit.3
+src/libmemcached/man/memcached_replace.3
+src/libmemcached/man/memcached_replace_by_key.3
+src/libmemcached/man/memcached_sasl_set_auth_data.3
+src/libmemcached/man/memcached_server_add.3
+src/libmemcached/man/memcached_server_count.3
+src/libmemcached/man/memcached_server_cursor.3
+src/libmemcached/man/memcached_server_list.3
+src/libmemcached/man/memcached_server_list_append.3
+src/libmemcached/man/memcached_server_list_count.3
+src/libmemcached/man/memcached_server_list_free.3
+src/libmemcached/man/memcached_server_push.3
+src/libmemcached/man/memcached_servers_parse.3
+src/libmemcached/man/memcached_set.3
+src/libmemcached/man/memcached_set_by_key.3
+src/libmemcached/man/memcached_set_memory_allocators.3
+src/libmemcached/man/memcached_set_sasl_callbacks.3
+src/libmemcached/man/memcached_set_user_data.3
+src/libmemcached/man/memcached_stat.3
+src/libmemcached/man/memcached_stat_execute.3
+src/libmemcached/man/memcached_stat_get_keys.3
+src/libmemcached/man/memcached_stat_get_value.3
+src/libmemcached/man/memcached_stat_servername.3
+src/libmemcached/man/memcached_strerror.3
+src/libmemcached/man/memcached_touch.3
+src/libmemcached/man/memcached_touch_by_key.3
+src/libmemcached/man/memcached_verbosity.3
+src/libmemcached/man/memcached_version.3
+src/libmemcached/man/memcapable.1
+src/libmemcached/man/memcat.1
+src/libmemcached/man/memcp.1
+src/libmemcached/man/memdump.1
+src/libmemcached/man/memerror.1
+src/libmemcached/man/memexist.1
+src/libmemcached/man/memflush.1
+src/libmemcached/man/memparse.1
+src/libmemcached/man/memping.1
+src/libmemcached/man/memrm.1
+src/libmemcached/man/memslap.1
+src/libmemcached/man/memstat.1
+src/libmemcached/man/memtouch.1
+src/libmemcached/mem_config.in
 src/libmemcached/NEWS
-src/libmemcached/poll/include.am
-src/libmemcached/poll/poll.c
-src/libmemcached/poll/poll.h
 src/libmemcached/README
 src/libmemcached/README.FIRST
+src/libmemcached/README.win32
+src/libmemcached/rpm/include.mk
 src/libmemcached/support/include.am
-src/libmemcached/support/libmemcached-fc.spec.in
 src/libmemcached/support/libmemcached.pc.in
+src/libmemcached/support/libmemcached.spec
 src/libmemcached/support/libmemcached.spec.in
 src/libmemcached/support/set_benchmark.sh
-src/libmemcached/tests/atomsmasher.c
+src/libmemcached/tests/basic.h
+src/libmemcached/tests/callbacks.h
+src/libmemcached/tests/cli.am
+src/libmemcached/tests/cpp_example.cc
+src/libmemcached/tests/cycle.cc
+src/libmemcached/tests/debug.h
+src/libmemcached/tests/deprecated.h
+src/libmemcached/tests/error_conditions.h
+src/libmemcached/tests/exist.h
+src/libmemcached/tests/failure.cc
 src/libmemcached/tests/hash_plus.cc
 src/libmemcached/tests/hash_results.h
-src/libmemcached/tests/hashkit_functions.c
+src/libmemcached/tests/hashkit_functions.cc
 src/libmemcached/tests/include.am
+src/libmemcached/tests/ketama.h
 src/libmemcached/tests/ketama_test_cases.h
 src/libmemcached/tests/ketama_test_cases_spy.h
+src/libmemcached/tests/keys.hpp
+src/libmemcached/tests/libmemcached-1.0/all_tests.cc
+src/libmemcached/tests/libmemcached-1.0/all_tests.h
+src/libmemcached/tests/libmemcached-1.0/all_tests_socket.cc
+src/libmemcached/tests/libmemcached-1.0/atomsmasher.cc
+src/libmemcached/tests/libmemcached-1.0/basic.cc
+src/libmemcached/tests/libmemcached-1.0/callback_counter.cc
+src/libmemcached/tests/libmemcached-1.0/callback_counter.h
+src/libmemcached/tests/libmemcached-1.0/callbacks.cc
+src/libmemcached/tests/libmemcached-1.0/debug.cc
+src/libmemcached/tests/libmemcached-1.0/deprecated.cc
+src/libmemcached/tests/libmemcached-1.0/dump.cc
+src/libmemcached/tests/libmemcached-1.0/dump.h
+src/libmemcached/tests/libmemcached-1.0/encoding_key.cc
+src/libmemcached/tests/libmemcached-1.0/encoding_key.h
+src/libmemcached/tests/libmemcached-1.0/error_conditions.cc
+src/libmemcached/tests/libmemcached-1.0/exist.cc
+src/libmemcached/tests/libmemcached-1.0/fetch_all_results.cc
+src/libmemcached/tests/libmemcached-1.0/fetch_all_results.h
+src/libmemcached/tests/libmemcached-1.0/generate.cc
+src/libmemcached/tests/libmemcached-1.0/generate.h
+src/libmemcached/tests/libmemcached-1.0/haldenbrand.cc
+src/libmemcached/tests/libmemcached-1.0/haldenbrand.h
+src/libmemcached/tests/libmemcached-1.0/include.am
+src/libmemcached/tests/libmemcached-1.0/internals.cc
+src/libmemcached/tests/libmemcached-1.0/ketama.cc
+src/libmemcached/tests/libmemcached-1.0/mem_functions.cc
+src/libmemcached/tests/libmemcached-1.0/mem_functions.h
+src/libmemcached/tests/libmemcached-1.0/memcached_get.cc
+src/libmemcached/tests/libmemcached-1.0/memcached_get.h
+src/libmemcached/tests/libmemcached-1.0/namespace.cc
+src/libmemcached/tests/libmemcached-1.0/parser.cc
+src/libmemcached/tests/libmemcached-1.0/parser.h
+src/libmemcached/tests/libmemcached-1.0/plus.cpp
+src/libmemcached/tests/libmemcached-1.0/pool.cc
+src/libmemcached/tests/libmemcached-1.0/print.cc
+src/libmemcached/tests/libmemcached-1.0/replication.cc
+src/libmemcached/tests/libmemcached-1.0/sasl.cc
+src/libmemcached/tests/libmemcached-1.0/server_add.cc
+src/libmemcached/tests/libmemcached-1.0/setup_and_teardowns.cc
+src/libmemcached/tests/libmemcached-1.0/setup_and_teardowns.h
+src/libmemcached/tests/libmemcached-1.0/stat.cc
+src/libmemcached/tests/libmemcached-1.0/stat.h
+src/libmemcached/tests/libmemcached-1.0/string.cc
+src/libmemcached/tests/libmemcached-1.0/touch.cc
+src/libmemcached/tests/libmemcached-1.0/virtual_buckets.cc
+src/libmemcached/tests/libmemcached_test_container.h
 src/libmemcached/tests/libmemcached_world.h
-src/libmemcached/tests/mem_functions.c
-src/libmemcached/tests/mem_plus.cc
-src/libmemcached/tests/mem_udp.c
-src/libmemcached/tests/plus.cpp
-src/libmemcached/tests/server.c
-src/libmemcached/tests/server.h
-src/libmemcached/tests/start.c
-src/libmemcached/tests/test.c
-src/libmemcached/tests/test.h
+src/libmemcached/tests/libmemcached_world_socket.h
+src/libmemcached/tests/mem_udp.cc
+src/libmemcached/tests/memc.hpp
+src/libmemcached/tests/memcapable.cc
+src/libmemcached/tests/memcat.cc
+src/libmemcached/tests/memcp.cc
+src/libmemcached/tests/memdump.cc
+src/libmemcached/tests/memerror.cc
+src/libmemcached/tests/memexist.cc
+src/libmemcached/tests/memflush.cc
+src/libmemcached/tests/memping.cc
+src/libmemcached/tests/memrm.cc
+src/libmemcached/tests/memslap.cc
+src/libmemcached/tests/memstat.cc
+src/libmemcached/tests/memtouch.cc
+src/libmemcached/tests/namespace.h
+src/libmemcached/tests/parser.am
+src/libmemcached/tests/parser.cc
+src/libmemcached/tests/pool.h
+src/libmemcached/tests/print.h
+src/libmemcached/tests/replication.h
+src/libmemcached/tests/runner.h
+src/libmemcached/tests/server_add.h
+src/libmemcached/tests/string.h
+src/libmemcached/tests/touch.h
+src/libmemcached/tests/virtual_buckets.h
 src/libmemcached/THANKS
 src/libmemcached/TODO
-src/libmemcached/unittests/include.am
-src/libmemcached/unittests/main.cc
-src/libmemcached/unittests/strings.cc
+src/libmemcached/util/daemon.cc
+src/libmemcached/util/daemon.hpp
+src/libmemcached/util/include.am
+src/libmemcached/util/instance.hpp
+src/libmemcached/util/log.hpp
+src/libmemcached/util/logfile.hpp
+src/libmemcached/util/operation.hpp
+src/libmemcached/util/pidfile.cc
+src/libmemcached/util/pidfile.hpp
+src/libmemcached/util/signal.hpp
+src/libmemcached/util/string.hpp
+src/libmemcached/version.m4
 src/libmemcached/win32/include.am
 src/libmemcached/win32/wrappers.h
+src/libmemcached.patch
 src/README
 t/00-load.t
 t/01-import.t
@@ -415,6 +776,7 @@ t/35-replace.t
 t/36-replace-by-key.t
 t/40-delete.t
 t/41-delete-by-key.t
+t/42-get_server_for_key.t
 t/50-quit.t
 t/51-flush.t
 t/60-stats.t
@@ -428,4 +790,5 @@ t/pod-coverage.t
 t/pod.t
 TODO
 typemap
-META.yml                                 Module meta-data (added by MakeMaker)
+META.yml                                 Module YAML meta-data (added by MakeMaker)
+META.json                                Module JSON meta-data (added by MakeMaker)
@@ -0,0 +1,34 @@
+{
+   "abstract" : "Thin fast full interface to the libmemcached client API",
+   "author" : [
+      "Tim Bunce <Tim.Bunce@pobox.com>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921",
+   "license" : [
+      "unknown"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+      "version" : "2"
+   },
+   "name" : "Memcached-libmemcached",
+   "no_index" : {
+      "directory" : [
+         "t",
+         "inc"
+      ]
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "bugtracker" : {
+         "web" : "https://github.com/timbunce/Memcached-libmemcached/issues/"
+      },
+      "repository" : {
+         "type" : "git",
+         "url" : "git://github.com/timbunce/Memcached-libmemcached.git",
+         "web" : "https://github.com/timbunce/Memcached-libmemcached"
+      }
+   },
+   "version" : "1.001801"
+}
@@ -1,22 +1,20 @@
---- #YAML:1.0
-name:               Memcached-libmemcached
-version:            0.4406
-abstract:           Thin fast full interface to the libmemcached client API
+---
+abstract: 'Thin fast full interface to the libmemcached client API'
 author:
-    - Tim Bunce <Tim.Bunce@pobox.com>
-license:            unknown
-distribution_type:  module
-configure_requires:
-    ExtUtils::MakeMaker:  0
-build_requires:
-    ExtUtils::MakeMaker:  0
-requires:
-    Test::More:  0
-no_index:
-    directory:
-        - t
-        - inc
-generated_by:       ExtUtils::MakeMaker version 6.56
+  - 'Tim Bunce <Tim.Bunce@pobox.com>'
+build_requires: {}
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
+license: unknown
 meta-spec:
-    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
-    version:  1.4
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: Memcached-libmemcached
+no_index:
+  directory:
+    - t
+    - inc
+resources:
+  bugtracker: https://github.com/timbunce/Memcached-libmemcached/issues/
+  repository: git://github.com/timbunce/Memcached-libmemcached.git
+version: 1.001801
@@ -19,15 +19,19 @@ BEGIN {
 my $lmcd_src = "src/libmemcached";
 GetOptions(
     'g!'    => \my $opt_g,      # enable debugging
+    'd!'    => \my $opt_d,      # debug Makefile.PL
     'pg!'   => \my $opt_pg,     # enable profiling
     'cov!'  => \my $opt_cov,    # enable test coverage analysis
     'bin!'  => \my $opt_bin,    # install bintools from libmemcached
     'src=s' => \$lmcd_src,     # unpacked source code for libmemcached
 ) or exit 1;
 
+$Data::Dumper::Indent = 1;
+$Data::Dumper::Sortkeys = 1;
+
+my $lmcd_api_ver = "1.0"; # eg $lmcd_src/libmemcached-$lmcd_api_ver/
 my $lmcd_inst = getcwd()."/src_inst";
 my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached$Config{lib_ext}";
-my @lmcd_pod = sort <$lmcd_src/docs/memcached_*.pod>;
 my $is_developer = (-d ".svn" || -d ".git");
 
 my ($lmcd_h) = eval { build_libmemcached() };
@@ -50,6 +54,7 @@ if (my $gccversion = $Config{gccversion}) {     # ask gcc to be more pedantic
         $opts{DEFINE} .= ' -Wmissing-prototypes';
     }
 }
+$opts{LIBS} = ["-lstdc++"]; # else error: libmemcached.so: undefined symbol: __gxx_personality_v0
 $opts{OPTIMIZE} = "-g"  if $opt_g;
 $opts{CCFLAGS}  = "-pg" if $opt_pg;
 my $coverage_flags = "";
@@ -82,6 +87,21 @@ WriteMakefile(
     PREREQ_PM           => {
         'Test::More' => 0,
     },
+    META_MERGE          => {
+        'meta-spec' => {
+            version => 2,
+        },
+        resources => {
+            bugtracker => {
+                web  => 'https://github.com/timbunce/Memcached-libmemcached/issues/',
+            },
+            repository => {
+                type => 'git',
+                url  => 'git://github.com/timbunce/Memcached-libmemcached.git',
+                web  => 'https://github.com/timbunce/Memcached-libmemcached',
+            },
+        },
+    },
     dynamic_lib         => {
         OTHERLDFLAGS => ($opt_pg ? "-pg " : "")
                       . ($opt_g  ? "-g "  : "") 
@@ -106,6 +126,7 @@ sub postamble {
 return qq{
 COVER = cover
 LMCD_SRC=$lmcd_src
+LMCD_API_VER=$lmcd_api_ver
 LMCD_INST=$lmcd_inst
 LMCD_BUILT_LIB=$lmcd_built_lib
 }.q{
@@ -172,6 +193,8 @@ sub run {
 }
 
 sub build_libmemcached {
+    local $ENV{DESTDIR};  # do not let Perl module config leak through
+
     sync_libmemcached_pod();
     extract_libmemcached_functions();
     extract_libmemcached_constants();
@@ -179,11 +202,17 @@ sub build_libmemcached {
     return if -d "$lmcd_inst/lib"; # XXX assume it built ok. use 'make realclean' to rm
     mkdir $lmcd_inst, 0775 unless -d $lmcd_inst;
     run("cd $lmcd_src && make distclean") if -f "$lmcd_src/Makefile";
-    my $configure_args = '--disable-sasl --with-pic --disable-shared';
-    $configure_args .= ' --enable-debug' if $opt_g;
-    $configure_args .= ' CFLAGS=-pg LDFLAGS=-pg' if $opt_pg;
+    my $configure_args = '--with-pic';# --disable-shared';
+    $configure_args .= ' --disable-sasl'; # please fix
+    $configure_args .= ' --with-lib-prefix=/opt/local'
+        if -d "/opt/local" and $^O eq 'darwin'; # macports
+    $configure_args .= ' --enable-debug'
+        if $opt_g;
+    $configure_args .= ' --enable-profiling'
+        if $opt_pg;
     if ($is_developer) {    # XXX make a Makefile.PL argument/option
     }
+    $configure_args .= ' --disable-jobserver';
     run("cd $lmcd_src && ./configure --prefix=$lmcd_inst $configure_args");
     #run("cd $lmcd_src && make test") if $is_developer; # XXX
     run("cd $lmcd_src && make install");
@@ -193,6 +222,8 @@ sub sync_libmemcached_pod {
     return unless -d ".svn";
     # we duplicate the libmemcached pod in svn so that the docs can be read on search.cpan.org
     my $perl_pod_dir = "lib/Memcached/libmemcached";
+    my @lmcd_pod;
+warn "sync_libmemcached_pod XXXXXXXXXXXXXX";
     for my $src_pod (@lmcd_pod) {
         (my $dst_pod = $src_pod) =~ s!$lmcd_src/docs!$perl_pod_dir!;
         $dst_pod =~ s/\.pod/\.pm/;
@@ -218,8 +249,9 @@ sub extract_libmemcached_functions {
     my %libmemcached_func;
 
     # find all memcached_* functions
-    warn "Reading libmemcached pod docs to find all public functions\n";
-    for my $src_pod (@lmcd_pod) {
+    warn "Finding all public functions\n";
+    my @headers = <$lmcd_src/libmemcached-$lmcd_api_ver/*.h>;
+    for my $src_pod (@headers) {
         open my $fh, "<$src_pod" or die "Can't open $src_pod: $!";
         #warn $src_pod;
         while (<$fh>) {
@@ -249,35 +281,44 @@ sub extract_libmemcached_constants {
     my %libmemcached_const;
 
     # find all MEMCACHED_* constants (#define and enum)
-    warn "Reading headers to find all constants\n";
     my $in_enum = 0;
     my @const;
 
-    my @headers = ("$lmcd_src/libmemcached/memcached.h", 
-                   "$lmcd_src/libmemcached/constants.h");
+    #my @headers = ("$lmcd_src/libmemcached/memcached.h", "$lmcd_src/libmemcached/constants.h");
+    my @headers = (
+        <$lmcd_src/libmemcached-$lmcd_api_ver/types/*.h>,
+        "$lmcd_src/libmemcached-$lmcd_api_ver/limits.h",
+        "$lmcd_src/libmemcached-$lmcd_api_ver/defaults.h",
+    );
+    warn "Reading ".@headers." header files to find all constants\n";
     for my $h (@headers) {
+        warn "  $h\n" if $opt_d;
         open my $fh, "<$h" or die "Can't open $h: $!";
         while (<$fh>) {
             if ($in_enum) {
-                if (m/^ \s* } \s* (\w+)/x) { # end of enum
-                    $libmemcached_const{$_} = $1 for @const;
+                if (m/^ \s* }/x) { # end of enum
+                    $libmemcached_const{$_} = $in_enum for @const;
                     @const = ();
                     $in_enum = 0;
+                    warn "  << $in_enum" if $opt_d;
                 }
                 elsif (m/^ \s* (MEMCACHED_\w+)/x) {
                     my $symbol = $1;
                     if ( $symbol !~ /MEMCACHED_CALLBACK_(MALLOC|REALLOC|FREE)_FUNCTION/) {
                         push @const, $symbol;
+                        warn "  enum $_" if $opt_d;
                     }
                 }
             }
-            elsif (m/^ \s* typedef \s+ enum /x) {
-                $in_enum = 1;
+            elsif (m/^ \s* (?:typedef \s+)? enum \s+ (\w+) \s+ {/x) {
+                $in_enum = $1;
+                warn "  >> $_" if $opt_d;
             }
             elsif (m/\# \s* define \s+ (MEMCACHED_\w+)/x) {
                 my $symbol = $1;
                 if ($symbol !~ /_H$/) {
                     $libmemcached_const{$1} = "defines";
+                    warn "  $_" if $opt_d;
                 }
             }
         }
@@ -1,101 +0,0 @@
-Memcached-libmemcached
-
-Memcached::libmemcached is a very thin, highly efficient, wrapper around the
-libmemcached library.
-
-It gives full access to the rich functionality offered by libmemcached.
-libmemcached is fast, light on memory usage, thread safe, and provides full
-access to server side methods.
-
- - Synchronous and Asynchronous support.
- - TCP and Unix Socket protocols.
- - A half dozen or so different hash algorithms.
- - Implementations of the new cas, replace, and append operators.
- - Man pages written up on entire API.
- - Implements both modulo and consistent hashing solutions. 
-
-INSTALLATION
-
-To install this module, run the following commands:
-
-	perl Makefile.PL
-	make
-	make test           (see TESTING below)
-	make install
-
-Note that the "perl Makefile.PL" step will configure and build a private copy
-of libmemcached from source. So don't be surprised to see pages of output
-during that step.
-
-If you'd like to have the commandline tools that come with libmemcached installed, invoke Makefile.PL as:
-
-    perl Makefile.PL --bin
-    
-See http://libmemcached.org for details.
-
-
-TESTING
-
-The "make test" command can run some tests without using a memcached server.
-Others are skipped unless a memcached server can be found.
-By default the tests look for a memcached server at the standard port on localhost.
-
-To use one or more other servers set the PERL_LIBMEMCACHED_TEST_SERVERS
-environment variable to a comma separated list of hostname:port values.
-
-Most tests require just one server but some require at least 5 servers.
-
-SUPPORT AND DOCUMENTATION
-
-After installing, you can find documentation for this module with the
-perldoc command.
-
-    perldoc Memcached::libmemcached
-
-You can also look for information at:
-
-    RT, CPAN's request tracker
-        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Memcached-libmemcached
-
-    AnnoCPAN, Annotated CPAN documentation
-        http://annocpan.org/dist/Memcached-libmemcached
-
-    CPAN Ratings
-        http://cpanratings.perl.org/d/Memcached-libmemcached
-
-    Search CPAN
-        http://search.cpan.org/dist/Memcached-libmemcached
-
-
-COPYRIGHT AND LICENCE
-
-Copyright (C) 2008 Tim Bunce
-
-This program is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-DEVELOPER TOOLS
-
-Debugging
-
-    make realclean # if perl Makefile.PL already run
-    perl Makefile.PL -g
-
-Profiling
-
-    make realclean # if perl Makefile.PL already run
-    perl Makefile.PL -pg
-
-Test coverage analysis
-
-    make realclean # if perl Makefile.PL already run
-    perl Makefile.PL -cov
-    make
-    make testcover
-
-Install commandline tools from libmemcached
-
-    perl Makefile.PL -bin
-    make 
-    make install
-
@@ -0,0 +1,103 @@
+# Memcached-libmemcached
+
+[![Build Status](https://secure.travis-ci.org/timbunce/Memcached-libmemcached.png)](http://travis-ci.org/timbunce/Memcached-libmemcached/)
+
+Memcached::libmemcached is a very thin, highly efficient, wrapper around the
+libmemcached library.
+
+It gives full access to the rich functionality offered by libmemcached.
+libmemcached is fast, light on memory usage, thread safe, and provides full
+access to server side methods.
+
+ - Synchronous and Asynchronous support.
+ - TCP and Unix Socket protocols.
+ - A half dozen or so different hash algorithms.
+ - Implementations of the new cas, replace, and append operators.
+ - Man pages written up on entire API.
+ - Implements both modulo and consistent hashing solutions. 
+
+# INSTALLATION
+
+To install this module, run the following commands:
+
+    perl Makefile.PL
+    make
+    make test           (see TESTING below)
+    make install
+
+Note that the "perl Makefile.PL" step will configure and build a private copy
+of libmemcached from source. So don't be surprised to see pages of output
+during that step.
+
+If you'd like to have the commandline tools that come with libmemcached installed, invoke Makefile.PL as:
+
+    perl Makefile.PL --bin
+    
+See http://libmemcached.org for details.
+
+
+# TESTING
+
+The "make test" command can run some tests without using a memcached server.
+Others are skipped unless a memcached server can be found.
+By default the tests look for a memcached server at the standard port on localhost.
+
+To use one or more other servers set the PERL_LIBMEMCACHED_TEST_SERVERS
+environment variable to a comma separated list of hostname:port values.
+
+Most tests require just one server but some require at least 5 servers.
+
+# SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the
+perldoc command.
+
+    perldoc Memcached::libmemcached
+
+You can also look for information at:
+
+    RT, CPAN's request tracker
+        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Memcached-libmemcached
+
+    AnnoCPAN, Annotated CPAN documentation
+        http://annocpan.org/dist/Memcached-libmemcached
+
+    CPAN Ratings
+        http://cpanratings.perl.org/d/Memcached-libmemcached
+
+    Search CPAN
+        http://search.cpan.org/dist/Memcached-libmemcached
+
+
+# COPYRIGHT AND LICENCE
+
+Copyright (C) 2008, 2013 Tim Bunce
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+# DEVELOPER TOOLS
+
+Debugging
+
+    make realclean # if perl Makefile.PL already run
+    perl Makefile.PL -g
+
+Profiling
+
+    make realclean # if perl Makefile.PL already run
+    perl Makefile.PL -pg
+
+Test coverage analysis
+
+    make realclean # if perl Makefile.PL already run
+    perl Makefile.PL -cov
+    make
+    make testcover
+
+Install commandline tools from libmemcached
+
+    perl Makefile.PL -bin
+    make 
+    make install
+
@@ -2,7 +2,7 @@ package Memcached::libmemcached::API;
 
 =head1 NAME
 
-Memcached::libmemcached::API - 
+Memcached::libmemcached::API - Private volitile module
 
 =head1 SYNOPSIS
 
@@ -18,14 +18,20 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_CONTINUUM_SIZE
   MEMCACHED_DEFAULT_CONNECT_TIMEOUT
   MEMCACHED_DEFAULT_PORT
+  MEMCACHED_DEFAULT_PORT_STRING
   MEMCACHED_DEFAULT_TIMEOUT
   MEMCACHED_EXPIRATION_NOT_ADD
+  MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH
   MEMCACHED_MAX_BUFFER
   MEMCACHED_MAX_HOST_SORT_LENGTH
   MEMCACHED_MAX_KEY
   MEMCACHED_POINTS_PER_SERVER
   MEMCACHED_POINTS_PER_SERVER_KETAMA
   MEMCACHED_PREFIX_KEY_MAX_SIZE
+  MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT
+  MEMCACHED_SERVER_FAILURE_LIMIT
+  MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT
+  MEMCACHED_SERVER_TIMEOUT_LIMIT
   MEMCACHED_STRIDE
   MEMCACHED_VERSION_STRING_LENGTH
 
@@ -37,6 +43,7 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
   MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
   MEMCACHED_BEHAVIOR_CORK
+  MEMCACHED_BEHAVIOR_DEAD_TIMEOUT
   MEMCACHED_BEHAVIOR_DISTRIBUTION
   MEMCACHED_BEHAVIOR_HASH
   MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
@@ -46,6 +53,7 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_BEHAVIOR_KETAMA
   MEMCACHED_BEHAVIOR_KETAMA_HASH
   MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+  MEMCACHED_BEHAVIOR_LOAD_FROM_FILE
   MEMCACHED_BEHAVIOR_MAX
   MEMCACHED_BEHAVIOR_NOREPLY
   MEMCACHED_BEHAVIOR_NO_BLOCK
@@ -53,8 +61,10 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_BEHAVIOR_POLL_TIMEOUT
   MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
   MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+  MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
   MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
   MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+  MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT
   MEMCACHED_BEHAVIOR_SND_TIMEOUT
   MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
   MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
@@ -74,16 +84,15 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_CALLBACK_DELETE_TRIGGER
   MEMCACHED_CALLBACK_GET_FAILURE
   MEMCACHED_CALLBACK_MAX
+  MEMCACHED_CALLBACK_NAMESPACE
   MEMCACHED_CALLBACK_PREFIX_KEY
   MEMCACHED_CALLBACK_USER_DATA
 
 =head2 :memcached_connection_t
 
-  MEMCACHED_CONNECTION_MAX
   MEMCACHED_CONNECTION_TCP
   MEMCACHED_CONNECTION_UDP
   MEMCACHED_CONNECTION_UNIX_SOCKET
-  MEMCACHED_CONNECTION_UNKNOWN
 
 =head2 :memcached_hash_t
 
@@ -99,6 +108,7 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_HASH_MAX
   MEMCACHED_HASH_MD5
   MEMCACHED_HASH_MURMUR
+  MEMCACHED_HASH_MURMUR3
 
 =head2 :memcached_return_t
 
@@ -114,15 +124,18 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_DATA_DOES_NOT_EXIST
   MEMCACHED_DATA_EXISTS
   MEMCACHED_DELETED
+  MEMCACHED_DEPRECATED
   MEMCACHED_E2BIG
   MEMCACHED_END
   MEMCACHED_ERRNO
+  MEMCACHED_ERROR
   MEMCACHED_FAILURE
   MEMCACHED_FAIL_UNIX_SOCKET
   MEMCACHED_FETCH_NOTFINISHED
   MEMCACHED_HOST_LOOKUP_FAILURE
   MEMCACHED_INVALID_ARGUMENTS
   MEMCACHED_INVALID_HOST_PROTOCOL
+  MEMCACHED_IN_PROGRESS
   MEMCACHED_ITEM
   MEMCACHED_KEY_TOO_BIG
   MEMCACHED_MAXIMUM_RETURN
@@ -132,11 +145,15 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_NOT_SUPPORTED
   MEMCACHED_NO_KEY_PROVIDED
   MEMCACHED_NO_SERVERS
+  MEMCACHED_PARSE_ERROR
+  MEMCACHED_PARSE_USER_ERROR
   MEMCACHED_PARTIAL_READ
   MEMCACHED_PROTOCOL_ERROR
   MEMCACHED_READ_FAILURE
   MEMCACHED_SERVER_ERROR
   MEMCACHED_SERVER_MARKED_DEAD
+  MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE
+  MEMCACHED_SERVER_TEMPORARILY_DISABLED
   MEMCACHED_SOME_ERRORS
   MEMCACHED_STAT
   MEMCACHED_STORED
@@ -153,8 +170,10 @@ Each constant can be imported individually by name. Groups of related constants,
   MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
   MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY
   MEMCACHED_DISTRIBUTION_CONSISTENT_MAX
+  MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED
   MEMCACHED_DISTRIBUTION_MODULA
   MEMCACHED_DISTRIBUTION_RANDOM
+  MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET
 
 =cut
 
@@ -9,11 +9,11 @@ Memcached::libmemcached - Thin fast full interface to the libmemcached client AP
 
 =head1 VERSION
 
-Version 0.4406 (with libmemcached-0.44 embedded)
+Version 1.001801 (with libmemcached-1.0.18 embedded)
 
 =cut
 
-our $VERSION = '0.4406'; # also alter in pod above
+our $VERSION = '1.001801'; # also alter in pod above
 
 use Carp;
 use base qw(Exporter);
@@ -56,7 +56,7 @@ access to server side methods.
  - Man pages written up on entire API.
  - Implements both modulo and consistent hashing solutions. 
 
-(At the moment Memcached::libmemcached is very new and not all the functions in
+(Memcached::libmemcached is fairly new and not all the functions in
 libmemcached have perl interfaces yet.  It's usually trivial to add functions -
 just a few lines in libmemcached.xs, a few lines of documentation, and a few
 lines of testing.  Volunteers welcome!)
@@ -68,7 +68,7 @@ This documentation provides summary of the functions, along with any issues
 specific to this perl interface, and references to the documentation for the
 corresponding functions in the underlying library.
 
-For more information on libmemcached, see L<http://libmemcached.org>
+For more information on libmemcached, see L<http://docs.libmemcached.org>
 
 =head1 CONVENTIONS
 
@@ -141,7 +141,7 @@ L</errstr> method.
 =head2 Unimplemented Functions
 
 Functions relating to managing lists of servers (memcached_server_push, and
-memcached_server_list) have not been implemenetd because they're not needed and
+memcached_server_list) have not been implemented because they're not needed and
 likely to be deprecated by libmemcached.
 
 Functions relating to iterating through results (memcached_result_*) have not
@@ -169,7 +169,10 @@ functions, for example, you can use:
   use Memcached::libmemcached qw(/^memcached/);
 
 Refer to L<Memcached::libmemcached::constants> for a full list of the available
-constants and the tags they are grouped by.
+constants and the tags they are grouped by. To see a list of all available
+functions and constants you can execute:
+
+  perl -MMemcached::libmemcached -le 'print $_ for @Memcached::libmemcached::EXPORT_OK'
 
 =head1 FUNCTIONS
 
@@ -457,7 +460,7 @@ See L<walk_stats>.
 
   $version = memcached_lib_version()
 
-Returns a simple version string, like "0.15", representing the libmemcached
+Returns a simple version string, like "1.0.17", representing the libmemcached
 version (version of the client library, not server).
 
 =head2 memcached_version
@@ -762,6 +765,8 @@ L<http://www.tim.bunce.name>
 
 =head1 CURRENT MAINTAINER
 
+Matthew Horsfall (alh) C<< <wolfsage@gmail.com> >>
+
 Daisuke Maki C<< <daisuke@endeworks.jp> >> with occasional bursts of input from Tim Bunce.
 
 =head1 ACKNOWLEDGEMENTS
@@ -771,22 +776,21 @@ and Patrick Galbraith and Daisuke Maki for helping with the implementation.
 
 =head1 PORTABILITY
 
-See Slaven Rezic's excellent CPAN Testers Matrix at L<http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Memcached-libmemcached>
+See Slaven Rezic's excellent CPAN Testers Matrix at L<http://matrix.cpantesters.org/?dist=Memcached-libmemcached>
 
 Along with Dave Cantrell's excellent CPAN Dependency tracker at
-L<http://cpandeps.cantrell.org.uk/?module=Memcached%3A%3Alibmemcached&perl=any+version&os=any+OS>
+L<http://deps.cpantesters.org/?module=Memcached%3A%3Alibmemcached&perl=any+version&os=any+OS>
 
 =head1 BUGS
 
-Please report any bugs or feature requests to
-C<bug-memcached-libmemcached@rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Memcached-libmemcached>.
-I will be notified, and then you'll automatically be notified of progress on
-your bug as I make changes.
+Please report any bugs or feature requests to the GitHub issue tracker at
+L<https://github.com/timbunce/Memcached-libmemcached/issues>.
+We will be notified, and then you'll automatically be notified of progress on
+your bug as we make changes.
 
 =head1 CONTRIBUTING
 
-The source is hosted at github: L<http://github.com/lestrrat/Memcached-libmemcached>
+The source is hosted at github: L<https://github.com/timbunce/Memcached-libmemcached>
 Patches and volunteers always welcome.
 
 =head1 COPYRIGHT & LICENSE
@@ -8,7 +8,6 @@
 #include "ppport.h"
 
 #include <libmemcached/memcached.h>
-#include <libmemcached/constants.h>
 
 #define MEMCACHED_CALLBACK_MALLOC_FUNCTION 4
 #define MEMCACHED_CALLBACK_REALLOC_FUNCTION 5
@@ -58,7 +57,7 @@ typedef time_t               lmc_expiration;
             if (lmc_state->trace_level > 1 || (lmc_state->trace_level && !LMC_RETURN_OK(ret))) \
                 warn("\t<= %s return %d %s", what, ret, memcached_strerror(ptr, ret)); \
             lmc_state->last_return = ret;   \
-            lmc_state->last_errno  = ptr->cached_errno; /* if MEMCACHED_ERRNO */ \
+            lmc_state->last_errno  = memcached_last_error_errno(ptr); /* if MEMCACHED_ERRNO */ \
         } else { /* should never happen */ \
             warn("LMC_RECORD_RETURN_ERR(%d %s): no lmc_state structure in memcached_st so error not recorded!", \
                 ret, memcached_strerror(ptr, ret)); \
@@ -390,8 +389,8 @@ _fetch_all_into_hashref(memcached_st *ptr, memcached_return rc, HV *dest_ref)
 
     /* rc is the return code from the preceeding mget */
     if (!LMC_RETURN_OK(rc)) {
-        if (rc == MEMCACHED_NOTFOUND) {
-            /* when number_of_keys==0 memcached_mget returns MEMCACHED_NOTFOUND
+        if (rc == MEMCACHED_INVALID_ARGUMENTS) {
+            /* when number_of_keys==0 memcached_mget returns MEMCACHED_INVALID_ARGUMENTS
             * which we'd normally translate into a false return value
             * but that's not really appropriate here
             */
@@ -409,7 +408,7 @@ _fetch_all_into_hashref(memcached_st *ptr, memcached_return rc, HV *dest_ref)
 
 
 static memcached_return_t
-_walk_stats_cb(memcached_server_instance_st instance,
+_walk_stats_cb(const memcached_instance_st *instance,
     const char *key,   size_t key_length,
     const char *value, size_t value_length,
     void *cb)
@@ -434,6 +433,7 @@ _walk_stats_cb(memcached_server_instance_st instance,
 }
 
 
+
 MODULE=Memcached::libmemcached  PACKAGE=Memcached::libmemcached
 
 PROTOTYPES: DISABLED
@@ -821,7 +821,7 @@ memcached_flush(Memcached__libmemcached ptr, lmc_expiration expiration=0)
 void
 memcached_quit(Memcached__libmemcached ptr)
 
-char *
+const char *
 memcached_strerror(Memcached__libmemcached ptr, memcached_return rc)
 
 const char *
@@ -859,8 +859,11 @@ errstr(Memcached__libmemcached ptr)
         /* setup return value as a dualvar with int err code and string error message */
         sv_setiv(RETVAL, lmc_state->last_return);
         sv_setpv(RETVAL, memcached_strerror(ptr, lmc_state->last_return));
-        if (lmc_state->last_return == MEMCACHED_ERRNO)
-            sv_catpvf(RETVAL, " %s", strerror(lmc_state->last_errno));
+        if (lmc_state->last_return == MEMCACHED_ERRNO) {
+            /* lmc_state->last_errno should be meaningful here but sometimes isn't */
+            /* See https://rt.cpan.org/Ticket/Display.html?id=41299 */
+            sv_catpvf(RETVAL, " %s", (lmc_state->last_errno) ? strerror(lmc_state->last_errno) : "(last_errno==0!)");
+        }
         SvIOK_on(RETVAL); /* set as dualvar */
     OUTPUT:
         RETVAL
@@ -977,7 +980,7 @@ walk_stats(Memcached__libmemcached ptr, SV *stats_args, CV *cb)
         RETVAL = memcached_stat_execute(clone, SvPV_nolen(stats_args), _walk_stats_cb, cb);
         if (!LMC_RETURN_OK(RETVAL)) {
             LMC_RECORD_RETURN_ERR("memcached_stat_execute", ptr, RETVAL);
-            LMC_STATE_FROM_PTR(ptr)->last_errno = clone->cached_errno;
+            LMC_STATE_FROM_PTR(ptr)->last_errno = memcached_last_error_errno(clone);
             memcached_free(clone);
             XSRETURN_NO;
         }
@@ -991,7 +994,7 @@ walk_stats(Memcached__libmemcached ptr, SV *stats_args, CV *cb)
 SV * get_server_for_key(Memcached__libmemcached ptr, char *key)
     CODE:
         memcached_return_t err;
-        memcached_server_instance_st sp = memcached_server_by_key(ptr, key, strlen(key), &err);
+        const memcached_instance_st *sp = memcached_server_by_key(ptr, key, strlen(key), &err);
         if (sp == NULL)
             XSRETURN_UNDEF;
 
@@ -999,7 +1002,7 @@ SV * get_server_for_key(Memcached__libmemcached ptr, char *key)
             memcached_server_name(sp),
             memcached_server_port(sp)
         );
-        memcached_server_free(sp);
+        /* memcached_instance_free(sp); ??? */
     
     OUTPUT:
         RETVAL
@@ -10,10 +10,17 @@
 #
 v=${1?Specify the version to use as an argument, e.g., 0.45}
 rm -f libmemcached-$v.tar.gz
-wget http://launchpad.net/libmemcached/1.0/$v/+download/libmemcached-$v.tar.gz
+wget --no-check-certificate https://launchpad.net/libmemcached/1.0/$v/+download/libmemcached-$v.tar.gz
+rm -rf libmemcached
 tar xfz libmemcached-$v.tar.gz
-rm -rf libmemcached-prev
-mv libmemcached libmemcached-prev
 mv libmemcached-$v libmemcached
-git add libmemcached
-(cd .. && make manifest)
+#
+# Note that libmemcached.patch is targeted to libmemcached version 1.0.18.
+# The patches to memflush.cc and byteorder.cc fixed compilation failures
+# on MacOSX, and may not apply to future releases of libmemcached.
+#
+patch -p2 < libmemcached.patch
+#
+git add -u libmemcached # notice deleted files
+git add libmemcached    # notice added files
+(cd .. && perl -MExtUtils::Manifest=mkmanifest -e mkmanifest)
@@ -1,5 +0,0 @@
-project = libmemcached
-version = 0.4.2
-template = pandora-build
-project-type = library
-pandora-version = 0.134
@@ -1,6 +1,6 @@
 Software License Agreement (BSD License)
 
-Copyright (c) 2007, TangentOrg (Brian Aker)
+Copyright (c) 2012, Data Differential (http://datadifferential.com/)
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -1,3 +1,141 @@
+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.
@@ -1,83 +1,110 @@
-ACLOCAL_AMFLAGS = -I m4
+# vim:ft=automake
+
+ACLOCAL_AMFLAGS= -I m4 -I libtest/m4
+AM_YFLAGS= -d
 
 # includes append to these:
 SUFFIXES =
-PHONY =
+.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= \
-	    ${srcdir}/m4/pandora_*.m4 \
-	    .quickly \
-	    README.FIRST \
-	    config/autorun.sh \
-	    config/pandora-plugin \
-	    config/uncrustify.cfg \
-	    m4/ac_cxx_header_stdcxx_98.m4 \
-	    m4/acx_pthread.m4  \
-	    m4/gettext.m4 \
-	    m4/iconv.m4 \
-	    m4/pkg.m4 \
-	    m4/po.m4 \
-	    m4/progtest.m4
-
-TEST_DOCS=
-if BUILD_DOCS
-SUBDIRS = docs
-TEST_DOCS+=test-docs
-endif
+EXTRA_DIST=
+dist_man_MANS=
+MAINTAINERCLEANFILES=
+
+#includes additional rules from aminclude.am
+@INC_AMINCLUDE@
+
+DISTCLEANFILES+= aminclude.am
 
-test-docs:
-	(cd docs && $(MAKE) test-docs)
+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 libhashkit/include.am
-include unittests/include.am
-include tests/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 poll/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
 
-fedora:
-	rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-	rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-	cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-	rpmbuild -ba support/libmemcached.spec
-	cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-	cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
+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
 
-generic:
-	rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-	rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-	cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-	rpmbuild -ba support/libmemcached.spec
-	cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-	cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
+clean-local: clean-libtest-check clean-docs-check clean-rpm
 
-rpm: all dist generic fedora
-
-merge-clean:
-	find ./ | $(GREP) \.gcda | xargs rm -f
-	find ./ | $(GREP) \.gcno | xargs rm -f
-	find ./ | $(GREP) \.gz | xargs rm -f
-	find ./ | $(GREP) \.orig | xargs rm -f
-	find ./ | $(GREP) \.rej | xargs rm -f
-	find ./ | $(GREP) \.rpm | xargs rm -f
-	find ./ | $(GREP) \~$$ | xargs rm -f
-	bzr unknowns
 
 lcov: lcov-clean check
 	@echo
@@ -85,13 +112,44 @@ lcov: lcov-clean check
 	@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
+	@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
-
+	@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)
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
+# 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.
@@ -16,6 +15,102 @@
 @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
 
@@ -50,10 +145,124 @@
 # 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@
@@ -72,119 +281,701 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-target_triplet = @target@
-TESTS = $(check_PROGRAMS)
-bin_PROGRAMS = clients/memcapable$(EXEEXT) clients/memcat$(EXEEXT) \
-	clients/memcp$(EXEEXT) clients/memdump$(EXEEXT) \
-	clients/memerror$(EXEEXT) clients/memflush$(EXEEXT) \
-	clients/memrm$(EXEEXT) clients/memstat$(EXEEXT) \
-	$(am__EXEEXT_1)
-noinst_PROGRAMS = tests/atomsmasher$(EXEEXT) tests/hashplus$(EXEEXT) \
-	tests/memplus$(EXEEXT) tests/startservers$(EXEEXT) \
-	tests/testapp$(EXEEXT) tests/testhashkit$(EXEEXT) \
-	tests/testplus$(EXEEXT) tests/testudp$(EXEEXT) $(am__EXEEXT_3)
-check_PROGRAMS = $(am__EXEEXT_2)
-@BUILD_DOCS_TRUE@am__append_1 = test-docs
-DIST_COMMON = README $(am__configure_deps) \
-	$(am__nobase_include_HEADERS_DIST) $(include_HEADERS) \
-	$(noinst_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/clients/include.am $(srcdir)/config.h.in \
-	$(srcdir)/example/include.am $(srcdir)/libhashkit/include.am \
-	$(srcdir)/libmemcached/include.am $(srcdir)/poll/include.am \
-	$(srcdir)/support/include.am $(srcdir)/tests/include.am \
-	$(srcdir)/unittests/include.am $(srcdir)/win32/include.am \
-	$(top_srcdir)/configure \
-	$(top_srcdir)/libhashkit/configure.h.in \
-	$(top_srcdir)/libmemcached/configure.h.in \
-	$(top_srcdir)/support/libmemcached-fc.spec.in \
+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 AUTHORS COPYING \
-	ChangeLog NEWS THANKS TODO config/compile config/config.guess \
-	config/config.rpath config/config.sub config/depcomp \
-	config/install-sh config/ltmain.sh config/missing
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_2 = \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@			 libmemcached/memcached_util.h \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@			 libmemcached/util.h \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@			 libmemcached/util/ping.h \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@			 libmemcached/util/pool.h \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@			 libmemcached/util/version.h
-
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_3 = libmemcached/libmemcachedutil.la
-@BUILD_BYTEORDER_TRUE@am__append_4 = libmemcached/libbyteorder.la
-@BUILD_BYTEORDER_TRUE@am__append_5 = libmemcached/libbyteorder.la
-@BUILD_BYTEORDER_TRUE@am__append_6 = libmemcached/libbyteorder.la
-@HAVE_SASL_TRUE@am__append_7 = $(LIBSASL)
-@HAVE_SASL_TRUE@am__append_8 = libmemcached/sasl.c
-@HAVE_DTRACE_TRUE@am__append_9 = libmemcached/dtrace_probes.h
-@HAVE_DTRACE_TRUE@am__append_10 = libmemcached/dtrace_probes.h
-@DTRACE_NEEDS_OBJECTS_TRUE@am__append_11 = libmemcached/libmemcached_probes.d
-@DTRACE_NEEDS_OBJECTS_TRUE@am__append_12 = libmemcached/libmemcached_probes.o
-@DTRACE_NEEDS_OBJECTS_TRUE@am__append_13 = libmemcached/libmemcached_probes.o
-@HAVE_SASL_TRUE@am__append_14 = $(LIBSASL)
-@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__append_15 = clients/memslap
-@BUILD_BYTEORDER_TRUE@am__append_16 = libmemcached/libbyteorder.la
-@INCLUDE_HSIEH_SRC_TRUE@am__append_17 = libhashkit/hsieh.c
-@HAVE_LIBGTEST_TRUE@am__append_18 = unittests/unittests
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_19 = libmemcached/libmemcachedutil.la
-@HAVE_LIBEVENT_TRUE@am__append_20 = example/memcached_light
-@BUILD_BYTEORDER_TRUE@am__append_21 = libmemcached/libbyteorder.la
-@HAVE_LIBINNODB_TRUE@am__append_22 = example/storage_innodb.c
-@HAVE_LIBINNODB_FALSE@am__append_23 = example/storage.c
-@BUILD_POLL_TRUE@am__append_24 = poll/poll.c
-@BUILD_WIN32_WRAPPERS_TRUE@am__append_25 = -no-undefined
-@BUILD_WIN32_WRAPPERS_TRUE@am__append_26 = -no-undefined
-@BUILD_WIN32_WRAPPERS_TRUE@am__append_27 = -no-undefined
-@BUILD_WIN32_WRAPPERS_TRUE@am__append_28 = -no-undefined
+	$(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/ac_cxx_compile_stdcxx_0x.m4 \
-	$(top_srcdir)/m4/ac_cxx_header_stdcxx_98.m4 \
-	$(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/byteorder.m4 \
-	$(top_srcdir)/m4/deprecated.m4 $(top_srcdir)/m4/eagain.m4 \
-	$(top_srcdir)/m4/enable_utillib.m4 $(top_srcdir)/m4/hsieh.m4 \
-	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.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/memcached.m4 \
-	$(top_srcdir)/m4/pandora_64bit.m4 \
-	$(top_srcdir)/m4/pandora_canonical.m4 \
-	$(top_srcdir)/m4/pandora_check_compiler_version.m4 \
-	$(top_srcdir)/m4/pandora_check_cxx_standard.m4 \
-	$(top_srcdir)/m4/pandora_clock_gettime.m4 \
-	$(top_srcdir)/m4/pandora_cxx_demangle.m4 \
+	$(top_srcdir)/m4/memaslap.m4 $(top_srcdir)/m4/murmur.m4 \
 	$(top_srcdir)/m4/pandora_enable_dtrace.m4 \
-	$(top_srcdir)/m4/pandora_extensions.m4 \
-	$(top_srcdir)/m4/pandora_have_better_malloc.m4 \
-	$(top_srcdir)/m4/pandora_have_gcc_atomics.m4 \
-	$(top_srcdir)/m4/pandora_have_libevent.m4 \
-	$(top_srcdir)/m4/pandora_have_libgtest.m4 \
-	$(top_srcdir)/m4/pandora_have_libinnodb.m4 \
-	$(top_srcdir)/m4/pandora_header_assert.m4 \
-	$(top_srcdir)/m4/pandora_libtool.m4 \
-	$(top_srcdir)/m4/pandora_optimize.m4 \
-	$(top_srcdir)/m4/pandora_platform.m4 \
-	$(top_srcdir)/m4/pandora_print_callstack.m4 \
-	$(top_srcdir)/m4/pandora_pthread.m4 \
-	$(top_srcdir)/m4/pandora_sasl.m4 \
-	$(top_srcdir)/m4/pandora_use_pipe.m4 \
-	$(top_srcdir)/m4/pandora_vc_build.m4 \
-	$(top_srcdir)/m4/pandora_version.m4 \
-	$(top_srcdir)/m4/pandora_visibility.m4 \
-	$(top_srcdir)/m4/pandora_warnings.m4 \
-	$(top_srcdir)/m4/pandora_with_gettext.m4 \
-	$(top_srcdir)/m4/pod2man.m4 $(top_srcdir)/m4/podchecker.m4 \
 	$(top_srcdir)/m4/protocol_binary.m4 \
-	$(top_srcdir)/m4/setsockopt.m4 $(top_srcdir)/configure.ac
+	$(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 = config.h
-CONFIG_CLEAN_FILES = libhashkit/configure.h libmemcached/configure.h \
-	support/libmemcached.pc support/libmemcached.spec \
-	support/libmemcached-fc.spec
+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 \
@@ -207,285 +998,1398 @@ am__nobase_list = $(am__nobase_strip_setup); \
 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)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" \
-	"$(DESTDIR)$(includedir)"
+	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
+	"$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" \
+	"$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-clients_libgenexec_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_clients_libgenexec_la_OBJECTS = clients/generator.lo \
-	clients/execute.lo
-clients_libgenexec_la_OBJECTS = $(am_clients_libgenexec_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
 clients_libutilities_la_LIBADD =
-am_clients_libutilities_la_OBJECTS = clients/utilities.lo
+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)
-libhashkit_libhashkit_la_LIBADD =
-am__libhashkit_libhashkit_la_SOURCES_DIST = libhashkit/algorithm.c \
-	libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
-	libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
-	libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
-	libhashkit/murmur.c libhashkit/one_at_a_time.c \
-	libhashkit/strerror.c libhashkit/hsieh.c
-@INCLUDE_HSIEH_SRC_TRUE@am__objects_1 = libhashkit/libhashkit_libhashkit_la-hsieh.lo
-am_libhashkit_libhashkit_la_OBJECTS =  \
-	libhashkit/libhashkit_libhashkit_la-algorithm.lo \
-	libhashkit/libhashkit_libhashkit_la-behavior.lo \
-	libhashkit/libhashkit_libhashkit_la-crc32.lo \
-	libhashkit/libhashkit_libhashkit_la-fnv.lo \
-	libhashkit/libhashkit_libhashkit_la-digest.lo \
-	libhashkit/libhashkit_libhashkit_la-function.lo \
-	libhashkit/libhashkit_libhashkit_la-hashkit.lo \
-	libhashkit/libhashkit_libhashkit_la-jenkins.lo \
-	libhashkit/libhashkit_libhashkit_la-ketama.lo \
-	libhashkit/libhashkit_libhashkit_la-md5.lo \
-	libhashkit/libhashkit_libhashkit_la-murmur.lo \
-	libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo \
-	libhashkit/libhashkit_libhashkit_la-strerror.lo \
-	$(am__objects_1)
+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=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) \
+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/algorithm.c \
-	libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
-	libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
-	libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
-	libhashkit/murmur.c libhashkit/one_at_a_time.c \
-	libhashkit/strerror.c libhashkit/hsieh.c
-@INCLUDE_HSIEH_SRC_TRUE@am__objects_2 = libhashkit/libhashkit_libhashkitinc_la-hsieh.lo
-am__objects_3 = libhashkit/libhashkit_libhashkitinc_la-algorithm.lo \
-	libhashkit/libhashkit_libhashkitinc_la-behavior.lo \
-	libhashkit/libhashkit_libhashkitinc_la-crc32.lo \
-	libhashkit/libhashkit_libhashkitinc_la-fnv.lo \
-	libhashkit/libhashkit_libhashkitinc_la-digest.lo \
-	libhashkit/libhashkit_libhashkitinc_la-function.lo \
-	libhashkit/libhashkit_libhashkitinc_la-hashkit.lo \
-	libhashkit/libhashkit_libhashkitinc_la-jenkins.lo \
-	libhashkit/libhashkit_libhashkitinc_la-ketama.lo \
-	libhashkit/libhashkit_libhashkitinc_la-md5.lo \
-	libhashkit/libhashkit_libhashkitinc_la-murmur.lo \
-	libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo \
-	libhashkit/libhashkit_libhashkitinc_la-strerror.lo \
-	$(am__objects_2)
-am_libhashkit_libhashkitinc_la_OBJECTS = $(am__objects_3)
+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=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) \
-	$(libhashkit_libhashkitinc_la_LDFLAGS) $(LDFLAGS) -o $@
-libmemcached_libbyteorder_la_LIBADD =
-am__libmemcached_libbyteorder_la_SOURCES_DIST =  \
-	libmemcached/byteorder.c
-@BUILD_BYTEORDER_TRUE@am_libmemcached_libbyteorder_la_OBJECTS =  \
-@BUILD_BYTEORDER_TRUE@	libmemcached/byteorder.lo
-libmemcached_libbyteorder_la_OBJECTS =  \
-	$(am_libmemcached_libbyteorder_la_OBJECTS)
-@BUILD_BYTEORDER_TRUE@am_libmemcached_libbyteorder_la_rpath =
+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/allocators.c libmemcached/analyze.c \
-	libmemcached/auto.c libmemcached/behavior.c \
-	libmemcached/connect.c libmemcached/delete.c libmemcached/do.c \
-	libmemcached/dump.c libmemcached/fetch.c libmemcached/flush.c \
-	libmemcached/flush_buffers.c libmemcached/get.c \
-	libmemcached/hash.c libmemcached/hosts.c libmemcached/io.c \
-	libmemcached/key.c libmemcached/memcached.c \
-	libmemcached/parse.c libmemcached/purge.c libmemcached/quit.c \
-	libmemcached/response.c libmemcached/result.c \
-	libmemcached/server.c libmemcached/server_list.c \
-	libmemcached/stats.c libmemcached/storage.c \
-	libmemcached/strerror.c libmemcached/verbosity.c \
-	libmemcached/version.c libmemcached/sasl.c \
-	libmemcached/libmemcached_probes.d poll/poll.c
-@HAVE_SASL_TRUE@am__objects_4 = libmemcached/libmemcached_libmemcached_la-sasl.lo
-am__objects_5 =
-@BUILD_POLL_TRUE@am__objects_6 =  \
-@BUILD_POLL_TRUE@	poll/libmemcached_libmemcached_la-poll.lo
-am_libmemcached_libmemcached_la_OBJECTS =  \
-	libmemcached/libmemcached_libmemcached_la-allocators.lo \
-	libmemcached/libmemcached_libmemcached_la-analyze.lo \
-	libmemcached/libmemcached_libmemcached_la-auto.lo \
-	libmemcached/libmemcached_libmemcached_la-behavior.lo \
-	libmemcached/libmemcached_libmemcached_la-connect.lo \
-	libmemcached/libmemcached_libmemcached_la-delete.lo \
-	libmemcached/libmemcached_libmemcached_la-do.lo \
-	libmemcached/libmemcached_libmemcached_la-dump.lo \
-	libmemcached/libmemcached_libmemcached_la-fetch.lo \
-	libmemcached/libmemcached_libmemcached_la-flush.lo \
-	libmemcached/libmemcached_libmemcached_la-flush_buffers.lo \
-	libmemcached/libmemcached_libmemcached_la-get.lo \
-	libmemcached/libmemcached_libmemcached_la-hash.lo \
-	libmemcached/libmemcached_libmemcached_la-hosts.lo \
-	libmemcached/libmemcached_libmemcached_la-io.lo \
-	libmemcached/libmemcached_libmemcached_la-key.lo \
-	libmemcached/libmemcached_libmemcached_la-memcached.lo \
-	libmemcached/libmemcached_libmemcached_la-parse.lo \
-	libmemcached/libmemcached_libmemcached_la-purge.lo \
-	libmemcached/libmemcached_libmemcached_la-quit.lo \
-	libmemcached/libmemcached_libmemcached_la-response.lo \
-	libmemcached/libmemcached_libmemcached_la-result.lo \
-	libmemcached/libmemcached_libmemcached_la-server.lo \
-	libmemcached/libmemcached_libmemcached_la-server_list.lo \
-	libmemcached/libmemcached_libmemcached_la-stats.lo \
-	libmemcached/libmemcached_libmemcached_la-storage.lo \
-	libmemcached/libmemcached_libmemcached_la-strerror.lo \
-	libmemcached/libmemcached_libmemcached_la-verbosity.lo \
-	libmemcached/libmemcached_libmemcached_la-version.lo \
-	$(am__objects_4) $(am__objects_5) $(am__objects_6)
+	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=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) \
+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 $@
-libmemcached_libmemcachedcallbacks_la_LIBADD =
-am_libmemcached_libmemcachedcallbacks_la_OBJECTS = libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo
-libmemcached_libmemcachedcallbacks_la_OBJECTS =  \
-	$(am_libmemcached_libmemcachedcallbacks_la_OBJECTS)
-libmemcached_libmemcachedcallbacks_la_LINK = $(LIBTOOL) $(AM_V_lt) \
-	--tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libmemcached_libmemcachedcallbacks_la_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-libmemcached_libmemcachedinternal_la_LIBADD =
-am_libmemcached_libmemcachedinternal_la_OBJECTS =  \
-	libmemcached/string.lo
-libmemcached_libmemcachedinternal_la_OBJECTS =  \
-	$(am_libmemcached_libmemcachedinternal_la_OBJECTS)
-am_libmemcached_libmemcachedprotocol_la_OBJECTS = libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo \
-	libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo \
-	libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo \
-	libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo \
-	libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo
+@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=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
-	$(CCLD) $(libmemcached_libmemcachedprotocol_la_CFLAGS) \
-	$(CFLAGS) $(libmemcached_libmemcachedprotocol_la_LDFLAGS) \
+	--tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
+	$(CXXLD) $(libmemcached_libmemcachedprotocol_la_CXXFLAGS) \
+	$(CXXFLAGS) $(libmemcached_libmemcachedprotocol_la_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_libmemcached_libmemcachedutil_la_OBJECTS =  \
-	libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo \
-	libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo \
-	libmemcached/util/libmemcached_libmemcachedutil_la-version.lo
+@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=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(libmemcached_libmemcachedutil_la_CFLAGS) $(CFLAGS) \
-	$(libmemcached_libmemcachedutil_la_LDFLAGS) $(LDFLAGS) -o $@
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am_libmemcached_libmemcachedutil_la_rpath =  \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	-rpath $(libdir)
-tests_libserver_la_LIBADD =
-am_tests_libserver_la_OBJECTS = tests/server.lo
-tests_libserver_la_OBJECTS = $(am_tests_libserver_la_OBJECTS)
-tests_libtest_la_LIBADD =
-am_tests_libtest_la_OBJECTS = tests/test.lo
-tests_libtest_la_OBJECTS = $(am_tests_libtest_la_OBJECTS)
-@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_1 = clients/memslap$(EXEEXT)
-@HAVE_LIBGTEST_TRUE@am__EXEEXT_2 = unittests/unittests$(EXEEXT)
-@HAVE_LIBEVENT_TRUE@am__EXEEXT_3 = example/memcached_light$(EXEEXT)
+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_memcapable_OBJECTS = clients/memcapable.$(OBJEXT)
+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)
-@HAVE_SASL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) clients/libutilities.la \
-	libmemcached/libmemcached.la $(am__DEPENDENCIES_2)
-clients_memcapable_DEPENDENCIES = $(am__DEPENDENCIES_3) \
-	$(am__append_16)
-am_clients_memcat_OBJECTS = clients/memcat.$(OBJEXT)
+@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)
-clients_memcat_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memcp_OBJECTS = clients/memcp.$(OBJEXT)
+@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)
-clients_memcp_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memdump_OBJECTS = clients/memdump.$(OBJEXT)
+@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)
-clients_memdump_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memerror_OBJECTS = clients/memerror.$(OBJEXT)
+@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)
-clients_memerror_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memflush_OBJECTS = clients/memflush.$(OBJEXT)
+@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)
-clients_memflush_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memrm_OBJECTS = clients/memrm.$(OBJEXT)
+@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)
-clients_memrm_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am_clients_memslap_OBJECTS = clients/memslap.$(OBJEXT) \
-	clients/ms_conn.$(OBJEXT) clients/ms_setting.$(OBJEXT) \
-	clients/ms_sigsegv.$(OBJEXT) clients/ms_stats.$(OBJEXT) \
-	clients/ms_task.$(OBJEXT) clients/ms_thread.$(OBJEXT)
+@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)
-clients_memslap_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-	clients/libgenexec.la $(am__DEPENDENCIES_3)
-am_clients_memstat_OBJECTS = clients/memstat.$(OBJEXT)
+@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)
-clients_memstat_DEPENDENCIES = $(am__DEPENDENCIES_3)
-am__example_memcached_light_SOURCES_DIST = example/interface_v0.c \
-	example/interface_v1.c example/memcached_light.c \
-	example/memcached_light.h example/storage.h \
-	example/storage_innodb.c example/storage.c
-@HAVE_LIBINNODB_TRUE@am__objects_7 = example/storage_innodb.$(OBJEXT)
-@HAVE_LIBINNODB_FALSE@am__objects_8 = example/storage.$(OBJEXT)
-am_example_memcached_light_OBJECTS = example/interface_v0.$(OBJEXT) \
-	example/interface_v1.$(OBJEXT) \
-	example/memcached_light.$(OBJEXT) $(am__objects_7) \
-	$(am__objects_8)
+@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)
-example_memcached_light_DEPENDENCIES =  \
-	libmemcached/libmemcachedprotocol.la $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__append_21)
-am_tests_atomsmasher_OBJECTS = tests/atomsmasher.$(OBJEXT)
+@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)
-am_tests_hashplus_OBJECTS = tests/tests_hashplus-hash_plus.$(OBJEXT)
-tests_hashplus_OBJECTS = $(am_tests_hashplus_OBJECTS)
-tests_hashplus_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+@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_hashplus_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(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_memplus_OBJECTS = tests/tests_memplus-mem_plus.$(OBJEXT)
-tests_memplus_OBJECTS = $(am_tests_memplus_OBJECTS)
-tests_memplus_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+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_memplus_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	$(tests_memstat_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
 	-o $@
-am_tests_startservers_OBJECTS = tests/start.$(OBJEXT)
-tests_startservers_OBJECTS = $(am_tests_startservers_OBJECTS)
-am_tests_testapp_OBJECTS =  \
-	tests/tests_testapp-mem_functions.$(OBJEXT)
-tests_testapp_OBJECTS = $(am_tests_testapp_OBJECTS)
-tests_testapp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tests_testapp_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_tests_testhashkit_OBJECTS = tests/hashkit_functions.$(OBJEXT)
+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)
-am_tests_testplus_OBJECTS = tests/tests_testplus-plus.$(OBJEXT)
+@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_OBJECTS = tests/tests_testudp-mem_udp.$(OBJEXT)
+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)
-tests_testudp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(tests_testudp_CFLAGS) \
-	$(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_unittests_unittests_OBJECTS = unittests/main.$(OBJEXT) \
-	unittests/strings.$(OBJEXT)
-unittests_unittests_OBJECTS = $(am_unittests_unittests_OBJECTS)
-unittests_unittests_DEPENDENCIES = tests/libserver.la \
-	libmemcached/libmemcachedinternal.la $(TESTS_LDADDS) \
-	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = 
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+@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) \
@@ -494,181 +2398,503 @@ 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_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo "  CC    " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
+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_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo "  CCLD  " $@;
+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_$(V))
-am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
-am__v_CXX_0 = @echo "  CXX   " $@;
+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_$(V))
-am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CXXLD_0 = @echo "  CXXLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo "  GEN   " $@;
-SOURCES = $(clients_libgenexec_la_SOURCES) \
-	$(clients_libutilities_la_SOURCES) \
+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_libbyteorder_la_SOURCES) \
 	$(libmemcached_libmemcached_la_SOURCES) \
-	$(libmemcached_libmemcachedcallbacks_la_SOURCES) \
-	$(libmemcached_libmemcachedinternal_la_SOURCES) \
 	$(libmemcached_libmemcachedprotocol_la_SOURCES) \
 	$(libmemcached_libmemcachedutil_la_SOURCES) \
-	$(tests_libserver_la_SOURCES) $(tests_libtest_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_memflush_SOURCES) \
-	$(clients_memrm_SOURCES) $(clients_memslap_SOURCES) \
-	$(clients_memstat_SOURCES) $(example_memcached_light_SOURCES) \
-	$(tests_atomsmasher_SOURCES) $(tests_hashplus_SOURCES) \
-	$(tests_memplus_SOURCES) $(tests_startservers_SOURCES) \
-	$(tests_testapp_SOURCES) $(tests_testhashkit_SOURCES) \
-	$(tests_testplus_SOURCES) $(tests_testudp_SOURCES) \
-	$(unittests_unittests_SOURCES)
-DIST_SOURCES = $(clients_libgenexec_la_SOURCES) \
-	$(clients_libutilities_la_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_libbyteorder_la_SOURCES_DIST) \
 	$(am__libmemcached_libmemcached_la_SOURCES_DIST) \
-	$(libmemcached_libmemcachedcallbacks_la_SOURCES) \
-	$(libmemcached_libmemcachedinternal_la_SOURCES) \
-	$(libmemcached_libmemcachedprotocol_la_SOURCES) \
-	$(libmemcached_libmemcachedutil_la_SOURCES) \
-	$(tests_libserver_la_SOURCES) $(tests_libtest_la_SOURCES) \
-	$(clients_memcapable_SOURCES) $(clients_memcat_SOURCES) \
-	$(clients_memcp_SOURCES) $(clients_memdump_SOURCES) \
-	$(clients_memerror_SOURCES) $(clients_memflush_SOURCES) \
-	$(clients_memrm_SOURCES) $(clients_memslap_SOURCES) \
-	$(clients_memstat_SOURCES) \
+	$(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) \
-	$(tests_atomsmasher_SOURCES) $(tests_hashplus_SOURCES) \
-	$(tests_memplus_SOURCES) $(tests_startservers_SOURCES) \
-	$(tests_testapp_SOURCES) $(tests_testhashkit_SOURCES) \
-	$(tests_testplus_SOURCES) $(tests_testudp_SOURCES) \
-	$(unittests_unittests_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-dvi-recursive install-exec-recursive \
-	install-html-recursive install-info-recursive \
-	install-pdf-recursive install-ps-recursive install-recursive \
-	installcheck-recursive installdirs-recursive pdf-recursive \
-	ps-recursive uninstall-recursive
-DATA = $(pkgconfig_DATA)
-am__nobase_include_HEADERS_DIST = libmemcached/allocators.h \
-	libmemcached/analyze.h libmemcached/auto.h \
-	libmemcached/behavior.h libmemcached/callback.h \
-	libmemcached/configure.h libmemcached/constants.h \
-	libmemcached/delete.h libmemcached/dump.h \
-	libmemcached/exception.hpp libmemcached/fetch.h \
-	libmemcached/flush.h libmemcached/flush_buffers.h \
-	libmemcached/get.h libmemcached/hash.h \
-	libmemcached/memcached.h libmemcached/memcached.hpp \
-	libmemcached/memcached/protocol_binary.h libmemcached/parse.h \
-	libmemcached/platform.h libmemcached/protocol/cache.h \
-	libmemcached/protocol/callback.h \
-	libmemcached/protocol_handler.h libmemcached/quit.h \
-	libmemcached/result.h libmemcached/sasl.h \
-	libmemcached/server.h libmemcached/server_list.h \
-	libmemcached/stats.h libmemcached/storage.h \
-	libmemcached/strerror.h libmemcached/string.h \
-	libmemcached/types.h libmemcached/verbosity.h \
-	libmemcached/version.h libmemcached/visibility.h \
-	libmemcached/watchpoint.h libmemcached/memcached_util.h \
-	libmemcached/util.h libmemcached/util/ping.h \
-	libmemcached/util/pool.h libmemcached/util/version.h \
-	libhashkit/algorithm.h libhashkit/behavior.h \
-	libhashkit/configure.h libhashkit/digest.h \
-	libhashkit/function.h libhashkit/hashkit.h \
-	libhashkit/strerror.h libhashkit/types.h \
-	libhashkit/visibility.h
+	$(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)
-RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
-  distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
-	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-	distdir dist dist-all distcheck
+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
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
-DIST_SUBDIRS = docs
+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 = \
-  { test ! -d "$(distdir)" \
-    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr "$(distdir)"; }; }
-am__relativize = \
-  dir0=`pwd`; \
-  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
-  sed_rest='s,^[^/]*/*,,'; \
-  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
-  sed_butlast='s,/*[^/]*$$,,'; \
-  while test -n "$$dir1"; do \
-    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
-    if test "$$first" != "."; then \
-      if test "$$first" = ".."; then \
-        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
-        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
-      else \
-        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
-        if test "$$first2" = "$$first"; then \
-          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
-        else \
-          dir2="../$$dir2"; \
-        fi; \
-        dir0="$$dir0"/"$$first"; \
-      fi; \
-    fi; \
-    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
-  done; \
-  reldir="$$dir2"
+  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_CFLAGS = @AM_CFLAGS@
-AM_CPPFLAGS = @AM_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_LDFLAGS = @AM_LDFLAGS@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
+AUTOHEADER_FILE = @AUTOHEADER_FILE@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BETTER_MALLOC_LIBS = @BETTER_MALLOC_LIBS@
-BOOSTSKIP_WARNINGS = @BOOSTSKIP_WARNINGS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CC_VERSION = @CC_VERSION@
+CC_VERSION_VENDOR = @CC_VERSION_VENDOR@
 CFLAGS = @CFLAGS@
 CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
@@ -677,13 +2903,13 @@ CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
-CXX_STANDARD = @CXX_STANDARD@
 CXX_VERSION = @CXX_VERSION@
+CXX_VERSION_VENDOR = @CXX_VERSION_VENDOR@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DEPRECATED = @DEPRECATED@
-DOXYGEN = @DOXYGEN@
+DLLTOOL = @DLLTOOL@
 DPKG_GENSYMBOLS = @DPKG_GENSYMBOLS@
 DSYMUTIL = @DSYMUTIL@
 DTRACE = @DTRACE@
@@ -695,64 +2921,58 @@ ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
-GCOV_LIBS = @GCOV_LIBS@
+GEARMAND_BINARY = @GEARMAND_BINARY@
 GREP = @GREP@
 HASHKIT_LIBRARY_VERSION = @HASHKIT_LIBRARY_VERSION@
-HAVE_LIBEVENT = @HAVE_LIBEVENT@
-HAVE_LIBGTEST = @HAVE_LIBGTEST@
-HAVE_LIBINNODB = @HAVE_LIBINNODB@
-HAVE_LIBSASL = @HAVE_LIBSASL@
-HAVE_LIBSASL2 = @HAVE_LIBSASL2@
 HAVE_VISIBILITY = @HAVE_VISIBILITY@
-INNOBASE_SKIP_WARNINGS = @INNOBASE_SKIP_WARNINGS@
+INC_AMINCLUDE = @INC_AMINCLUDE@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-ISAINFO = @ISAINFO@
+LCOV = @LCOV@
+LCOV_GENHTML = @LCOV_GENHTML@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
-LIBC_P = @LIBC_P@
-LIBEVENT = @LIBEVENT@
-LIBEVENT_PREFIX = @LIBEVENT_PREFIX@
-LIBGTEST = @LIBGTEST@
-LIBGTEST_PREFIX = @LIBGTEST_PREFIX@
-LIBINNODB = @LIBINNODB@
-LIBINNODB_PREFIX = @LIBINNODB_PREFIX@
+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 = @LIBSASL@
-LIBSASL2 = @LIBSASL2@
-LIBSASL2_PREFIX = @LIBSASL2_PREFIX@
-LIBSASL_PREFIX = @LIBSASL_PREFIX@
+LIBSASL_CPPFLAGS = @LIBSASL_CPPFLAGS@
+LIBSASL_LDFLAGS = @LIBSASL_LDFLAGS@
+LIBTEST_VERSION = @LIBTEST_VERSION@
 LIBTOOL = @LIBTOOL@
+LIBUUID_LIB = @LIBUUID_LIB@
 LIPO = @LIPO@
 LN_S = @LN_S@
-LTLIBEVENT = @LTLIBEVENT@
-LTLIBGTEST = @LTLIBGTEST@
-LTLIBINNODB = @LTLIBINNODB@
 LTLIBOBJS = @LTLIBOBJS@
-LTLIBSASL = @LTLIBSASL@
-LTLIBSASL2 = @LTLIBSASL2@
 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@
-MEMC_BINARY = @MEMC_BINARY@
 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@
-NO_CONVERSION = @NO_CONVERSION@
-NO_EFF_CXX = @NO_EFF_CXX@
-NO_OLD_STYLE_CAST = @NO_OLD_STYLE_CAST@
-NO_REDUNDANT_DECLS = @NO_REDUNDANT_DECLS@
-NO_SHADOW = @NO_SHADOW@
-NO_STRICT_ALIASING = @NO_STRICT_ALIASING@
-NO_UNREACHED = @NO_UNREACHED@
-NO_WERROR = @NO_WERROR@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OTOOL = @OTOOL@
@@ -764,39 +2984,41 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
-PANDORA_HEX_VERSION = @PANDORA_HEX_VERSION@
-PANDORA_OPTIMIZE_BITFIELD = @PANDORA_OPTIMIZE_BITFIELD@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
-POD2MAN = @POD2MAN@
-PODCHECKER = @PODCHECKER@
-PROTOSKIP_WARNINGS = @PROTOSKIP_WARNINGS@
 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@
-TARGET_FREEBSD = @TARGET_FREEBSD@
-TARGET_LINUX = @TARGET_LINUX@
-TARGET_OSX = @TARGET_OSX@
-TARGET_SOLARIS = @TARGET_SOLARIS@
+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@
-acx_pthread_config = @acx_pthread_config@
 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@
@@ -822,7 +3044,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localedir = @localedir@
 localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
+lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
@@ -834,285 +3056,654 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
-target = @target@
 target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I libtest/m4
+AM_YFLAGS = -d
 
 # includes append to these:
-SUFFIXES = .d
-PHONY = valgrind cachegrind callgrind helgrind helgrind-slap
-CLEANFILES = $(am__append_10) $(am__append_13) tests/cachegrind.out \
-	tests/callgrind.out helgrind.out.*
-
-# 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
-noinst_HEADERS = libmemcached/byteorder.h libmemcached/common.h \
-	libmemcached/do.h libmemcached/internal.h libmemcached/io.h \
-	libmemcached/libmemcached_probes.h \
-	libmemcached/protocol/ascii_handler.h \
-	libmemcached/protocol/binary_handler.h \
-	libmemcached/protocol/common.h libmemcached/response.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 \
-	libhashkit/common.h tests/hash_results.h \
-	tests/ketama_test_cases.h tests/ketama_test_cases_spy.h \
-	tests/libmemcached_world.h tests/server.h tests/test.h \
-	poll/poll.h win32/wrappers.h
-lib_LTLIBRARIES = libmemcached/libmemcachedprotocol.la \
-	libmemcached/libmemcached.la $(am__append_3) \
-	libhashkit/libhashkit.la
-
-# 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 = libmemcached/libmemcachedcallbacks.la \
-	libmemcached/libmemcachedinternal.la $(am__append_4) \
-	clients/libutilities.la clients/libgenexec.la \
-	libhashkit/libhashkitinc.la tests/libserver.la \
-	tests/libtest.la
+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 = libmemcached/allocators.h \
-	libmemcached/analyze.h libmemcached/auto.h \
-	libmemcached/behavior.h libmemcached/callback.h \
-	libmemcached/configure.h libmemcached/constants.h \
-	libmemcached/delete.h libmemcached/dump.h \
-	libmemcached/exception.hpp libmemcached/fetch.h \
-	libmemcached/flush.h libmemcached/flush_buffers.h \
-	libmemcached/get.h libmemcached/hash.h \
-	libmemcached/memcached.h libmemcached/memcached.hpp \
-	libmemcached/memcached/protocol_binary.h libmemcached/parse.h \
-	libmemcached/platform.h libmemcached/protocol/cache.h \
-	libmemcached/protocol/callback.h \
-	libmemcached/protocol_handler.h libmemcached/quit.h \
-	libmemcached/result.h libmemcached/sasl.h \
-	libmemcached/server.h libmemcached/server_list.h \
-	libmemcached/stats.h libmemcached/storage.h \
-	libmemcached/strerror.h libmemcached/string.h \
-	libmemcached/types.h libmemcached/verbosity.h \
-	libmemcached/version.h libmemcached/visibility.h \
-	libmemcached/watchpoint.h $(am__append_2) \
-	libhashkit/algorithm.h libhashkit/behavior.h \
-	libhashkit/configure.h libhashkit/digest.h \
-	libhashkit/function.h libhashkit/hashkit.h \
-	libhashkit/strerror.h libhashkit/types.h \
-	libhashkit/visibility.h
+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_9)
-EXTRA_DIST = ${srcdir}/m4/pandora_*.m4 .quickly README.FIRST \
-	config/autorun.sh config/pandora-plugin config/uncrustify.cfg \
-	m4/ac_cxx_header_stdcxx_98.m4 m4/acx_pthread.m4 m4/gettext.m4 \
-	m4/iconv.m4 m4/pkg.m4 m4/po.m4 m4/progtest.m4 \
-	libmemcached/configure.h.in libmemcached/libmemcached_probes.d \
-	libmemcached/memcached/README.txt libhashkit/configure.h.in \
-	support/libmemcached.spec support/libmemcached-fc.spec.in \
-	support/set_benchmark.sh
-TEST_DOCS = $(am__append_1)
-@BUILD_DOCS_TRUE@SUBDIRS = docs
-libmemcached_libmemcachedprotocol_la_SOURCES = \
-						libmemcached/protocol/ascii_handler.c \
-						libmemcached/protocol/binary_handler.c \
-						libmemcached/protocol/cache.c \
-						libmemcached/protocol/pedantic.c \
-						libmemcached/protocol/protocol_handler.c
-
-libmemcached_libmemcachedprotocol_la_CFLAGS = ${AM_CFLAGS} ${NO_CONVERSION} ${PTHREAD_CFLAGS}
-libmemcached_libmemcachedprotocol_la_LDFLAGS = ${AM_LDFLAGS} \
-	${PTHREAD_LIBS} -version-info \
-	${MEMCACHED_PROTOCAL_LIBRARY_VERSION} $(am__append_26)
-libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING}
-libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
-libmemcached_libmemcachedinternal_la_SOURCES = \
-					      libmemcached/string.c
-
-libmemcached_libmemcached_la_CFLAGS = ${AM_CFLAGS} ${NO_CONVERSION}
-libmemcached_libmemcached_la_SOURCES = libmemcached/allocators.c \
-	libmemcached/analyze.c libmemcached/auto.c \
-	libmemcached/behavior.c libmemcached/connect.c \
-	libmemcached/delete.c libmemcached/do.c libmemcached/dump.c \
-	libmemcached/fetch.c libmemcached/flush.c \
-	libmemcached/flush_buffers.c libmemcached/get.c \
-	libmemcached/hash.c libmemcached/hosts.c libmemcached/io.c \
-	libmemcached/key.c libmemcached/memcached.c \
-	libmemcached/parse.c libmemcached/purge.c libmemcached/quit.c \
-	libmemcached/response.c libmemcached/result.c \
-	libmemcached/server.c libmemcached/server_list.c \
-	libmemcached/stats.c libmemcached/storage.c \
-	libmemcached/strerror.c libmemcached/verbosity.c \
-	libmemcached/version.c $(am__append_8) $(am__append_11) \
-	$(am__append_24)
-libmemcached_libmemcached_la_DEPENDENCIES =  \
-	libmemcached/libmemcachedcallbacks.la \
-	libmemcached/libmemcachedinternal.la \
-	libhashkit/libhashkitinc.la $(am__append_6) $(am__append_12)
-libmemcached_libmemcached_la_LIBADD = $(LIBM) \
-	libmemcached/libmemcachedcallbacks.la \
-	libmemcached/libmemcachedinternal.la \
-	libhashkit/libhashkitinc.la $(am__append_5)
-libmemcached_libmemcached_la_LDFLAGS = ${AM_LDFLAGS} -version-info \
-	${MEMCACHED_LIBRARY_VERSION} $(am__append_7) $(am__append_25)
-libmemcached_libmemcachedutil_la_SOURCES = \
-					  libmemcached/util/ping.c \
-					  libmemcached/util/pool.c \
-					  libmemcached/util/version.c
-
-libmemcached_libmemcachedutil_la_CFLAGS = ${AM_CFLAGS} ${NO_CONVERSION} ${PTHREAD_CFLAGS}
-libmemcached_libmemcachedutil_la_LIBADD = libmemcached/libmemcached.la
-libmemcached_libmemcachedutil_la_LDFLAGS = ${AM_LDFLAGS} \
-	${PTHREAD_LIBS} -version-info \
-	${MEMCACHED_UTIL_LIBRARY_VERSION} $(am__append_27)
-libmemcached_libmemcachedutil_la_DEPENDENCIES = libmemcached/libmemcached.la
-@BUILD_BYTEORDER_TRUE@libmemcached_libbyteorder_la_SOURCES = libmemcached/byteorder.c
-@BUILD_BYTEORDER_TRUE@libmemcached_libmemcachedprotocol_la_LIBADD = libmemcached/libbyteorder.la
-@BUILD_BYTEORDER_TRUE@libmemcached_libmemcachedprotocol_la_DEPENDENCIES = libmemcached/libbyteorder.la
-CLIENTS_LDADDS = $(LIBM) clients/libutilities.la \
-	libmemcached/libmemcached.la $(am__append_14)
-clients_libutilities_la_SOURCES = clients/utilities.c
-clients_libgenexec_la_SOURCES = clients/generator.c clients/execute.c
-clients_memcat_SOURCES = clients/memcat.c
-clients_memcat_LDADD = $(CLIENTS_LDADDS)
-clients_memcp_SOURCES = clients/memcp.c
-clients_memcp_LDADD = $(CLIENTS_LDADDS)
-clients_memdump_SOURCES = clients/memdump.c
-clients_memdump_LDADD = $(CLIENTS_LDADDS)
-clients_memstat_SOURCES = clients/memstat.c
-clients_memstat_LDADD = $(CLIENTS_LDADDS)
-clients_memrm_SOURCES = clients/memrm.c
-clients_memrm_LDADD = $(CLIENTS_LDADDS)
-clients_memflush_SOURCES = clients/memflush.c
-clients_memflush_LDADD = $(CLIENTS_LDADDS)
-clients_memerror_SOURCES = clients/memerror.c
-clients_memerror_LDADD = $(CLIENTS_LDADDS)
-clients_memslap_SOURCES = \
-		clients/memslap.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_memslap_LDADD = $(LTLIBEVENT) clients/libgenexec.la $(CLIENTS_LDADDS)
-clients_memcapable_SOURCES = clients/memcapable.c
-clients_memcapable_LDADD = $(CLIENTS_LDADDS) $(am__append_16)
-libhashkit_libhashkit_la_SOURCES = libhashkit/algorithm.c \
-	libhashkit/behavior.c libhashkit/crc32.c libhashkit/fnv.c \
-	libhashkit/digest.c libhashkit/function.c libhashkit/hashkit.c \
-	libhashkit/jenkins.c libhashkit/ketama.c libhashkit/md5.c \
-	libhashkit/murmur.c libhashkit/one_at_a_time.c \
-	libhashkit/strerror.c $(am__append_17)
-libhashkit_libhashkit_la_CFLAGS = \
-				 ${AM_CFLAGS} \
-				 -DBUILDING_HASHKIT
-
-libhashkit_libhashkit_la_LDFLAGS = $(LIBM) -version-info \
-	$(HASHKIT_LIBRARY_VERSION) $(am__append_28)
-libhashkit_libhashkitinc_la_SOURCES = ${libhashkit_libhashkit_la_SOURCES}
-libhashkit_libhashkitinc_la_CFLAGS = ${libhashkit_libhashkit_la_CFLAGS}
-libhashkit_libhashkitinc_la_LDFLAGS = $(LIBM)
-unittests_unittests_SOURCES = \
-			     unittests/main.cc \
-			     unittests/strings.cc
-
-unittests_unittest_CXXFLAGS = ${AM_CXXFLAGS} ${NO_WERROR}
-unittests_unittests_LDADD = \
-			   tests/libserver.la \
-			   libmemcached/libmemcachedinternal.la \
-			   ${TESTS_LDADDS} ${LTLIBGTEST}
-
-TESTS_LDADDS = libmemcached/libmemcached.la $(am__append_19)
-VALGRIND_COMMAND = $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes
-DEBUG_COMMAND = $(LIBTOOL) --mode=execute gdb
-PAHOLE_COMMAND = $(LIBTOOL) --mode=execute pahole
-tests_libserver_la_SOURCES = tests/server.c
-tests_libtest_la_SOURCES = tests/test.c
-tests_testapp_CFLAGS = $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-tests_testapp_SOURCES = tests/mem_functions.c
-tests_testapp_DEPENDENCIES = \
-			    $(BUILT_SOURCES) \
-			    clients/libgenexec.la \
-			    tests/libserver.la \
-			    tests/libtest.la \
-			    libmemcached/libmemcachedinternal.la \
-			    $(TESTS_LDADDS)
-
-tests_testapp_LDADD = clients/libgenexec.la \
-		     tests/libserver.la \
-		     tests/libtest.la \
-		     libmemcached/libmemcachedinternal.la \
-		     $(TESTS_LDADDS) $(LIBSASL)
-
-tests_testplus_SOURCES = tests/plus.cpp
-tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_testplus_DEPENDENCIES = tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
-tests_testplus_LDADD = $(tests_testplus_DEPENDENCIES) $(LIBSASL)
-tests_atomsmasher_SOURCES = tests/atomsmasher.c
-tests_atomsmasher_DEPENDENCIES = \
-				clients/libgenexec.la \
-				tests/libserver.la \
-				tests/libtest.la \
-				$(TESTS_LDADDS)
-
-tests_atomsmasher_LDADD = $(tests_atomsmasher_DEPENDENCIES) $(LIBSASL)
-tests_testudp_CFLAGS = $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-tests_testudp_SOURCES = tests/mem_udp.c
-tests_testudp_DEPENDENCIES = \
-			    clients/libgenexec.la \
-			    tests/libserver.la \
-			    tests/libtest.la \
-			    $(TESTS_LDADDS)
-
-tests_testudp_LDADD = $(tests_testudp_DEPENDENCIES) $(LIBSASL)
-tests_startservers_SOURCES = tests/start.c
-tests_startservers_DEPENDENCIES = tests/libserver.la $(TESTS_LDADDS)
-tests_startservers_LDADD = $(tests_startservers_DEPENDENCIES) $(LIBSASL)
-tests_testhashkit_SOURCES = tests/hashkit_functions.c
-tests_testhashkit_DEPENDENCIES = tests/libtest.la libhashkit/libhashkit.la
-tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
-tests_hashplus_SOURCES = tests/hash_plus.cc
-tests_hashplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_hashplus_DEPENDENCIES = $(tests_testhashkit_DEPENDENCIES)
-tests_hashplus_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
-tests_memplus_SOURCES = tests/mem_plus.cc
-tests_memplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memplus_DEPENDENCIES = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
-tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
-MEMSLAP_COMMAND = clients/memslap $(COLLECTION) $(SUITE)
-MEM_COMMAND = tests/testapp $(COLLECTION) $(SUITE)
-TESTPLUS_COMMAND = tests/testplus $(COLLECTION) $(SUITE)
-MEMPLUS_COMMAND = tests/memplus $(COLLECTION) $(SUITE)
-HASHPLUS_COMMAND = tests/hashplus $(COLLECTION) $(SUITE)
-ATOM_COMMAND = tests/atomsmasher $(COLLECTION) $(SUITE)
-UDP_COMMAND = tests/testudp $(COLLECTION) $(SUITE)
-HASH_COMMAND = tests/testhashkit $(COLLECTION) $(SUITE)
-example_memcached_light_SOURCES = example/interface_v0.c \
-	example/interface_v1.c example/memcached_light.c \
-	example/memcached_light.h example/storage.h $(am__append_22) \
-	$(am__append_23)
-example_memcached_light_LDADD = libmemcached/libmemcachedprotocol.la \
-	$(LIBINNODB) $(LTLIBEVENT) $(am__append_21)
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = support/libmemcached.pc
-all: $(BUILT_SOURCES) config.h
-	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+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 .c .cc .cpp .lo .o .obj
-am--refresh:
+.SUFFIXES: .d .d .c .cc .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs
+am--refresh: Makefile
 	@:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/libmemcached/include.am $(srcdir)/clients/include.am $(srcdir)/libhashkit/include.am $(srcdir)/unittests/include.am $(srcdir)/tests/include.am $(srcdir)/example/include.am $(srcdir)/support/include.am $(srcdir)/poll/include.am $(srcdir)/win32/include.am $(am__configure_deps)
+$(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*) \
@@ -1135,6 +3726,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/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
@@ -1145,35 +3737,50 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
 $(am__aclocal_m4_deps):
 
-config.h: stamp-h1
-	@if test ! -f $@; then \
-	  rm -f stamp-h1; \
-	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
-	else :; fi
+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)/config.h.in $(top_builddir)/config.status
+stamp-h1: $(srcdir)/mem_config.in $(top_builddir)/config.status
 	@rm -f stamp-h1
-	cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
+	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 config.h stamp-h1
-libhashkit/configure.h: $(top_builddir)/config.status $(top_srcdir)/libhashkit/configure.h.in
+	-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 $@
-libmemcached/configure.h: $(top_builddir)/config.status $(top_srcdir)/libmemcached/configure.h.in
+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 $@
-support/libmemcached-fc.spec: $(top_builddir)/config.status $(top_srcdir)/support/libmemcached-fc.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)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
 	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
 	list2=; for p in $$list; do \
 	  if test -f $$p; then \
@@ -1181,6 +3788,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	  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)"; \
 	}
@@ -1196,43 +3805,45 @@ uninstall-libLTLIBRARIES:
 
 clean-libLTLIBRARIES:
 	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@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)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
+	@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/generator.lo: clients/$(am__dirstamp) \
-	clients/$(DEPDIR)/$(am__dirstamp)
-clients/execute.lo: clients/$(am__dirstamp) \
-	clients/$(DEPDIR)/$(am__dirstamp)
-clients/libgenexec.la: $(clients_libgenexec_la_OBJECTS) $(clients_libgenexec_la_DEPENDENCIES) clients/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK)  $(clients_libgenexec_la_OBJECTS) $(clients_libgenexec_la_LIBADD) $(LIBS)
 clients/utilities.lo: clients/$(am__dirstamp) \
 	clients/$(DEPDIR)/$(am__dirstamp)
-clients/libutilities.la: $(clients_libutilities_la_OBJECTS) $(clients_libutilities_la_DEPENDENCIES) clients/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK)  $(clients_libutilities_la_OBJECTS) $(clients_libutilities_la_LIBADD) $(LIBS)
+
+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)
@@ -1242,15 +3853,24 @@ libhashkit/libhashkit_libhashkit_la-behavior.lo:  \
 libhashkit/libhashkit_libhashkit_la-crc32.lo:  \
 	libhashkit/$(am__dirstamp) \
 	libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkit_la-fnv.lo:  \
+libhashkit/libhashkit_libhashkit_la-digest.lo:  \
 	libhashkit/$(am__dirstamp) \
 	libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkit_la-digest.lo:  \
+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)
@@ -1266,17 +3886,39 @@ libhashkit/libhashkit_libhashkit_la-md5.lo:  \
 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.la: $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_DEPENDENCIES) libhashkit/$(am__dirstamp)
-	$(AM_V_CCLD)$(libhashkit_libhashkit_la_LINK) -rpath $(libdir) $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_LIBADD) $(LIBS)
+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)
@@ -1286,15 +3928,24 @@ libhashkit/libhashkit_libhashkitinc_la-behavior.lo:  \
 libhashkit/libhashkit_libhashkitinc_la-crc32.lo:  \
 	libhashkit/$(am__dirstamp) \
 	libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkitinc_la-fnv.lo:  \
+libhashkit/libhashkit_libhashkitinc_la-digest.lo:  \
 	libhashkit/$(am__dirstamp) \
 	libhashkit/$(DEPDIR)/$(am__dirstamp)
-libhashkit/libhashkit_libhashkitinc_la-digest.lo:  \
+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)
@@ -1310,39 +3961,156 @@ libhashkit/libhashkit_libhashkitinc_la-md5.lo:  \
 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/libhashkitinc.la: $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_DEPENDENCIES) libhashkit/$(am__dirstamp)
-	$(AM_V_CCLD)$(libhashkit_libhashkitinc_la_LINK)  $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_LIBADD) $(LIBS)
+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/byteorder.lo: libmemcached/$(am__dirstamp) \
+libmemcached/libmemcached_libmemcached_la-instance.lo:  \
+	libmemcached/$(am__dirstamp) \
 	libmemcached/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libbyteorder.la: $(libmemcached_libbyteorder_la_OBJECTS) $(libmemcached_libbyteorder_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK) $(am_libmemcached_libbyteorder_la_rpath) $(libmemcached_libbyteorder_la_OBJECTS) $(libmemcached_libbyteorder_la_LIBADD) $(LIBS)
+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)
@@ -1355,9 +4123,18 @@ libmemcached/libmemcached_libmemcached_la-do.lo:  \
 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)
@@ -1373,6 +4150,9 @@ libmemcached/libmemcached_libmemcached_la-hash.lo:  \
 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)
@@ -1382,9 +4162,21 @@ libmemcached/libmemcached_libmemcached_la-key.lo:  \
 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)
@@ -1397,6 +4189,9 @@ libmemcached/libmemcached_libmemcached_la-response.lo:  \
 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)
@@ -1412,1273 +4207,4894 @@ libmemcached/libmemcached_libmemcached_la-storage.lo:  \
 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-sasl.lo:  \
+libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo:  \
 	libmemcached/$(am__dirstamp) \
 	libmemcached/$(DEPDIR)/$(am__dirstamp)
-poll/$(am__dirstamp):
-	@$(MKDIR_P) poll
-	@: > poll/$(am__dirstamp)
-poll/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) poll/$(DEPDIR)
-	@: > poll/$(DEPDIR)/$(am__dirstamp)
-poll/libmemcached_libmemcached_la-poll.lo: poll/$(am__dirstamp) \
-	poll/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libmemcached.la: $(libmemcached_libmemcached_la_OBJECTS) $(libmemcached_libmemcached_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(libmemcached_libmemcached_la_LINK) -rpath $(libdir) $(libmemcached_libmemcached_la_OBJECTS) $(libmemcached_libmemcached_la_LIBADD) $(LIBS)
-libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo:  \
-	libmemcached/$(am__dirstamp) \
-	libmemcached/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libmemcachedcallbacks.la: $(libmemcached_libmemcachedcallbacks_la_OBJECTS) $(libmemcached_libmemcachedcallbacks_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(libmemcached_libmemcachedcallbacks_la_LINK)  $(libmemcached_libmemcachedcallbacks_la_OBJECTS) $(libmemcached_libmemcachedcallbacks_la_LIBADD) $(LIBS)
-libmemcached/string.lo: libmemcached/$(am__dirstamp) \
-	libmemcached/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libmemcachedinternal.la: $(libmemcached_libmemcachedinternal_la_OBJECTS) $(libmemcached_libmemcachedinternal_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK)  $(libmemcached_libmemcachedinternal_la_OBJECTS) $(libmemcached_libmemcachedinternal_la_LIBADD) $(LIBS)
-libmemcached/protocol/$(am__dirstamp):
-	@$(MKDIR_P) libmemcached/protocol
-	@: > libmemcached/protocol/$(am__dirstamp)
-libmemcached/protocol/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) libmemcached/protocol/$(DEPDIR)
-	@: > libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo:  \
-	libmemcached/protocol/$(am__dirstamp) \
-	libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo:  \
-	libmemcached/protocol/$(am__dirstamp) \
-	libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo:  \
-	libmemcached/protocol/$(am__dirstamp) \
-	libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo:  \
-	libmemcached/protocol/$(am__dirstamp) \
-	libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo:  \
-	libmemcached/protocol/$(am__dirstamp) \
-	libmemcached/protocol/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libmemcachedprotocol.la: $(libmemcached_libmemcachedprotocol_la_OBJECTS) $(libmemcached_libmemcachedprotocol_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(libmemcached_libmemcachedprotocol_la_LINK) -rpath $(libdir) $(libmemcached_libmemcachedprotocol_la_OBJECTS) $(libmemcached_libmemcachedprotocol_la_LIBADD) $(LIBS)
-libmemcached/util/$(am__dirstamp):
-	@$(MKDIR_P) libmemcached/util
-	@: > libmemcached/util/$(am__dirstamp)
-libmemcached/util/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) libmemcached/util/$(DEPDIR)
-	@: > libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo:  \
-	libmemcached/util/$(am__dirstamp) \
-	libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo:  \
-	libmemcached/util/$(am__dirstamp) \
-	libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-libmemcached/util/libmemcached_libmemcachedutil_la-version.lo:  \
-	libmemcached/util/$(am__dirstamp) \
-	libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-libmemcached/libmemcachedutil.la: $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_DEPENDENCIES) libmemcached/$(am__dirstamp)
-	$(AM_V_CCLD)$(libmemcached_libmemcachedutil_la_LINK) $(am_libmemcached_libmemcachedutil_la_rpath) $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_LIBADD) $(LIBS)
-tests/$(am__dirstamp):
-	@$(MKDIR_P) tests
-	@: > tests/$(am__dirstamp)
-tests/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) tests/$(DEPDIR)
-	@: > tests/$(DEPDIR)/$(am__dirstamp)
-tests/server.lo: tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
-tests/libserver.la: $(tests_libserver_la_OBJECTS) $(tests_libserver_la_DEPENDENCIES) tests/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK)  $(tests_libserver_la_OBJECTS) $(tests_libserver_la_LIBADD) $(LIBS)
-tests/test.lo: tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
-tests/libtest.la: $(tests_libtest_la_OBJECTS) $(tests_libtest_la_DEPENDENCIES) tests/$(am__dirstamp)
-	$(AM_V_CCLD)$(LINK)  $(tests_libtest_la_OBJECTS) $(tests_libtest_la_LIBADD) $(LIBS)
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-	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/memcapable.$(OBJEXT): clients/$(am__dirstamp) \
-	clients/$(DEPDIR)/$(am__dirstamp)
-clients/memcapable$(EXEEXT): $(clients_memcapable_OBJECTS) $(clients_memcapable_DEPENDENCIES) clients/$(am__dirstamp)
-	@rm -f clients/memcapable$(EXEEXT)
-	$(AM_V_CCLD)$(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) clients/$(am__dirstamp)
-	@rm -f clients/memcat$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(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) clients/$(am__dirstamp)
-	@rm -f clients/memcp$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(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) clients/$(am__dirstamp)
-	@rm -f clients/memdump$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(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) clients/$(am__dirstamp)
-	@rm -f clients/memerror$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(clients_memerror_OBJECTS) $(clients_memerror_LDADD) $(LIBS)
-clients/memflush.$(OBJEXT): clients/$(am__dirstamp) \
-	clients/$(DEPDIR)/$(am__dirstamp)
-clients/memflush$(EXEEXT): $(clients_memflush_OBJECTS) $(clients_memflush_DEPENDENCIES) clients/$(am__dirstamp)
-	@rm -f clients/memflush$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(clients_memflush_OBJECTS) $(clients_memflush_LDADD) $(LIBS)
-clients/memrm.$(OBJEXT): clients/$(am__dirstamp) \
-	clients/$(DEPDIR)/$(am__dirstamp)
-clients/memrm$(EXEEXT): $(clients_memrm_OBJECTS) $(clients_memrm_DEPENDENCIES) clients/$(am__dirstamp)
-	@rm -f clients/memrm$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(clients_memrm_OBJECTS) $(clients_memrm_LDADD) $(LIBS)
-clients/memslap.$(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/memslap$(EXEEXT): $(clients_memslap_OBJECTS) $(clients_memslap_DEPENDENCIES) clients/$(am__dirstamp)
-	@rm -f clients/memslap$(EXEEXT)
-	$(AM_V_CCLD)$(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) clients/$(am__dirstamp)
-	@rm -f clients/memstat$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(clients_memstat_OBJECTS) $(clients_memstat_LDADD) $(LIBS)
-example/$(am__dirstamp):
-	@$(MKDIR_P) example
-	@: > example/$(am__dirstamp)
-example/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) example/$(DEPDIR)
-	@: > 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_innodb.$(OBJEXT): example/$(am__dirstamp) \
-	example/$(DEPDIR)/$(am__dirstamp)
-example/storage.$(OBJEXT): example/$(am__dirstamp) \
-	example/$(DEPDIR)/$(am__dirstamp)
-example/memcached_light$(EXEEXT): $(example_memcached_light_OBJECTS) $(example_memcached_light_DEPENDENCIES) example/$(am__dirstamp)
-	@rm -f example/memcached_light$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(example_memcached_light_OBJECTS) $(example_memcached_light_LDADD) $(LIBS)
-tests/atomsmasher.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/atomsmasher$(EXEEXT): $(tests_atomsmasher_OBJECTS) $(tests_atomsmasher_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/atomsmasher$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(tests_atomsmasher_OBJECTS) $(tests_atomsmasher_LDADD) $(LIBS)
-tests/tests_hashplus-hash_plus.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/hashplus$(EXEEXT): $(tests_hashplus_OBJECTS) $(tests_hashplus_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/hashplus$(EXEEXT)
-	$(AM_V_CXXLD)$(tests_hashplus_LINK) $(tests_hashplus_OBJECTS) $(tests_hashplus_LDADD) $(LIBS)
-tests/tests_memplus-mem_plus.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/memplus$(EXEEXT): $(tests_memplus_OBJECTS) $(tests_memplus_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/memplus$(EXEEXT)
-	$(AM_V_CXXLD)$(tests_memplus_LINK) $(tests_memplus_OBJECTS) $(tests_memplus_LDADD) $(LIBS)
-tests/start.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/startservers$(EXEEXT): $(tests_startservers_OBJECTS) $(tests_startservers_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/startservers$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(tests_startservers_OBJECTS) $(tests_startservers_LDADD) $(LIBS)
-tests/tests_testapp-mem_functions.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testapp$(EXEEXT): $(tests_testapp_OBJECTS) $(tests_testapp_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/testapp$(EXEEXT)
-	$(AM_V_CCLD)$(tests_testapp_LINK) $(tests_testapp_OBJECTS) $(tests_testapp_LDADD) $(LIBS)
-tests/hashkit_functions.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testhashkit$(EXEEXT): $(tests_testhashkit_OBJECTS) $(tests_testhashkit_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/testhashkit$(EXEEXT)
-	$(AM_V_CCLD)$(LINK) $(tests_testhashkit_OBJECTS) $(tests_testhashkit_LDADD) $(LIBS)
-tests/tests_testplus-plus.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testplus$(EXEEXT): $(tests_testplus_OBJECTS) $(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/tests_testudp-mem_udp.$(OBJEXT): tests/$(am__dirstamp) \
-	tests/$(DEPDIR)/$(am__dirstamp)
-tests/testudp$(EXEEXT): $(tests_testudp_OBJECTS) $(tests_testudp_DEPENDENCIES) tests/$(am__dirstamp)
-	@rm -f tests/testudp$(EXEEXT)
-	$(AM_V_CCLD)$(tests_testudp_LINK) $(tests_testudp_OBJECTS) $(tests_testudp_LDADD) $(LIBS)
-unittests/$(am__dirstamp):
-	@$(MKDIR_P) unittests
-	@: > unittests/$(am__dirstamp)
-unittests/$(DEPDIR)/$(am__dirstamp):
-	@$(MKDIR_P) unittests/$(DEPDIR)
-	@: > unittests/$(DEPDIR)/$(am__dirstamp)
-unittests/main.$(OBJEXT): unittests/$(am__dirstamp) \
-	unittests/$(DEPDIR)/$(am__dirstamp)
-unittests/strings.$(OBJEXT): unittests/$(am__dirstamp) \
-	unittests/$(DEPDIR)/$(am__dirstamp)
-unittests/unittests$(EXEEXT): $(unittests_unittests_OBJECTS) $(unittests_unittests_DEPENDENCIES) unittests/$(am__dirstamp)
-	@rm -f unittests/unittests$(EXEEXT)
-	$(AM_V_CXXLD)$(CXXLINK) $(unittests_unittests_OBJECTS) $(unittests_unittests_LDADD) $(LIBS)
 
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-	-rm -f clients/execute.$(OBJEXT)
-	-rm -f clients/execute.lo
-	-rm -f clients/generator.$(OBJEXT)
-	-rm -f clients/generator.lo
-	-rm -f clients/memcapable.$(OBJEXT)
-	-rm -f clients/memcat.$(OBJEXT)
-	-rm -f clients/memcp.$(OBJEXT)
-	-rm -f clients/memdump.$(OBJEXT)
-	-rm -f clients/memerror.$(OBJEXT)
-	-rm -f clients/memflush.$(OBJEXT)
-	-rm -f clients/memrm.$(OBJEXT)
-	-rm -f clients/memslap.$(OBJEXT)
-	-rm -f clients/memstat.$(OBJEXT)
-	-rm -f clients/ms_conn.$(OBJEXT)
-	-rm -f clients/ms_setting.$(OBJEXT)
-	-rm -f clients/ms_sigsegv.$(OBJEXT)
-	-rm -f clients/ms_stats.$(OBJEXT)
-	-rm -f clients/ms_task.$(OBJEXT)
-	-rm -f clients/ms_thread.$(OBJEXT)
-	-rm -f clients/utilities.$(OBJEXT)
-	-rm -f clients/utilities.lo
-	-rm -f example/interface_v0.$(OBJEXT)
-	-rm -f example/interface_v1.$(OBJEXT)
-	-rm -f example/memcached_light.$(OBJEXT)
-	-rm -f example/storage.$(OBJEXT)
-	-rm -f example/storage_innodb.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-algorithm.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-algorithm.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-behavior.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-behavior.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-crc32.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-crc32.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-digest.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-digest.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-fnv.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-fnv.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-function.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-function.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-hashkit.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-hashkit.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-hsieh.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-hsieh.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-jenkins.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-jenkins.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-ketama.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-ketama.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-md5.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-md5.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-murmur.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-murmur.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-one_at_a_time.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo
-	-rm -f libhashkit/libhashkit_libhashkit_la-strerror.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkit_la-strerror.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-algorithm.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-algorithm.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-behavior.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-behavior.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-crc32.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-crc32.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-digest.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-digest.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-fnv.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-fnv.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-function.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-function.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-hashkit.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-hashkit.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-hsieh.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-hsieh.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-jenkins.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-jenkins.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-ketama.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-ketama.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-md5.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-md5.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-murmur.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-murmur.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-strerror.$(OBJEXT)
-	-rm -f libhashkit/libhashkit_libhashkitinc_la-strerror.lo
-	-rm -f libmemcached/byteorder.$(OBJEXT)
-	-rm -f libmemcached/byteorder.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-allocators.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-allocators.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-analyze.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-analyze.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-auto.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-auto.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-behavior.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-behavior.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-connect.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-connect.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-delete.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-delete.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-do.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-do.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-dump.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-dump.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-fetch.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-fetch.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-flush.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-flush.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-flush_buffers.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-flush_buffers.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-get.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-get.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-hash.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-hash.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-hosts.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-hosts.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-io.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-io.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-key.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-key.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-memcached.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-memcached.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-parse.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-parse.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-purge.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-purge.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-quit.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-quit.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-response.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-response.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-result.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-result.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-sasl.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-sasl.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-server.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-server.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-server_list.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-server_list.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-stats.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-stats.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-storage.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-storage.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-strerror.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-strerror.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-verbosity.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-verbosity.lo
-	-rm -f libmemcached/libmemcached_libmemcached_la-version.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcached_la-version.lo
-	-rm -f libmemcached/libmemcached_libmemcachedcallbacks_la-callback.$(OBJEXT)
-	-rm -f libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.$(OBJEXT)
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.$(OBJEXT)
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.$(OBJEXT)
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.$(OBJEXT)
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.$(OBJEXT)
-	-rm -f libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo
-	-rm -f libmemcached/string.$(OBJEXT)
-	-rm -f libmemcached/string.lo
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-ping.$(OBJEXT)
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-pool.$(OBJEXT)
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-version.$(OBJEXT)
-	-rm -f libmemcached/util/libmemcached_libmemcachedutil_la-version.lo
-	-rm -f poll/libmemcached_libmemcached_la-poll.$(OBJEXT)
-	-rm -f poll/libmemcached_libmemcached_la-poll.lo
-	-rm -f tests/atomsmasher.$(OBJEXT)
-	-rm -f tests/hashkit_functions.$(OBJEXT)
-	-rm -f tests/server.$(OBJEXT)
-	-rm -f tests/server.lo
-	-rm -f tests/start.$(OBJEXT)
-	-rm -f tests/test.$(OBJEXT)
-	-rm -f tests/test.lo
-	-rm -f tests/tests_hashplus-hash_plus.$(OBJEXT)
-	-rm -f tests/tests_memplus-mem_plus.$(OBJEXT)
-	-rm -f tests/tests_testapp-mem_functions.$(OBJEXT)
-	-rm -f tests/tests_testplus-plus.$(OBJEXT)
-	-rm -f tests/tests_testudp-mem_udp.$(OBJEXT)
-	-rm -f unittests/main.$(OBJEXT)
-	-rm -f unittests/strings.$(OBJEXT)
+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
 
-distclean-compile:
-	-rm -f *.tab.c
+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`
 
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/execute.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/generator.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memcapable.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)/memflush.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memrm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memslap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memstat.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)/utilities.Plo@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@example/$(DEPDIR)/storage_innodb.Po@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-fnv.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-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-one_at_a_time.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_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-fnv.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-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-one_at_a_time.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/byteorder.Plo@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-auto.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-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-fetch.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-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-parse.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-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_libmemcachedcallbacks_la-callback.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/string.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-protocol_handler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@poll/$(DEPDIR)/libmemcached_libmemcached_la-poll.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/atomsmasher.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/hashkit_functions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/server.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/start.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/test.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_hashplus-hash_plus.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memplus-mem_plus.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_testapp-mem_functions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_testplus-plus.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_testudp-mem_udp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@unittests/$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@unittests/$(DEPDIR)/strings.Po@am__quote@
+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
 
-.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
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c -o $@ $<
+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`
 
-.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
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+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
 
-.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
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+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`
 
-libhashkit/libhashkit_libhashkit_la-algorithm.lo: libhashkit/algorithm.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/algorithm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/algorithm.c' object='libhashkit/libhashkit_libhashkit_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-algorithm.lo `test -f 'libhashkit/algorithm.c' || echo '$(srcdir)/'`libhashkit/algorithm.c
+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
 
-libhashkit/libhashkit_libhashkit_la-behavior.lo: libhashkit/behavior.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/behavior.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/behavior.c' object='libhashkit/libhashkit_libhashkit_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-behavior.lo `test -f 'libhashkit/behavior.c' || echo '$(srcdir)/'`libhashkit/behavior.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-crc32.lo: libhashkit/crc32.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/crc32.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/crc32.c' object='libhashkit/libhashkit_libhashkit_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-crc32.lo `test -f 'libhashkit/crc32.c' || echo '$(srcdir)/'`libhashkit/crc32.c
+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
 
-libhashkit/libhashkit_libhashkit_la-fnv.lo: libhashkit/fnv.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkit_la-fnv.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv.Tpo -c -o libhashkit/libhashkit_libhashkit_la-fnv.lo `test -f 'libhashkit/fnv.c' || echo '$(srcdir)/'`libhashkit/fnv.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/fnv.c' object='libhashkit/libhashkit_libhashkit_la-fnv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-fnv.lo `test -f 'libhashkit/fnv.c' || echo '$(srcdir)/'`libhashkit/fnv.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-digest.lo: libhashkit/digest.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/digest.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/digest.c' object='libhashkit/libhashkit_libhashkit_la-digest.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-digest.lo `test -f 'libhashkit/digest.c' || echo '$(srcdir)/'`libhashkit/digest.c
+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
 
-libhashkit/libhashkit_libhashkit_la-function.lo: libhashkit/function.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/function.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/function.c' object='libhashkit/libhashkit_libhashkit_la-function.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-function.lo `test -f 'libhashkit/function.c' || echo '$(srcdir)/'`libhashkit/function.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-hashkit.lo: libhashkit/hashkit.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/hashkit.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/hashkit.c' object='libhashkit/libhashkit_libhashkit_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-hashkit.lo `test -f 'libhashkit/hashkit.c' || echo '$(srcdir)/'`libhashkit/hashkit.c
+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
 
-libhashkit/libhashkit_libhashkit_la-jenkins.lo: libhashkit/jenkins.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/jenkins.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/jenkins.c' object='libhashkit/libhashkit_libhashkit_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-jenkins.lo `test -f 'libhashkit/jenkins.c' || echo '$(srcdir)/'`libhashkit/jenkins.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-ketama.lo: libhashkit/ketama.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/ketama.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/ketama.c' object='libhashkit/libhashkit_libhashkit_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-ketama.lo `test -f 'libhashkit/ketama.c' || echo '$(srcdir)/'`libhashkit/ketama.c
+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
 
-libhashkit/libhashkit_libhashkit_la-md5.lo: libhashkit/md5.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/md5.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/md5.c' object='libhashkit/libhashkit_libhashkit_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-md5.lo `test -f 'libhashkit/md5.c' || echo '$(srcdir)/'`libhashkit/md5.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-murmur.lo: libhashkit/murmur.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkit_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+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
 
-libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo: libhashkit/one_at_a_time.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
-@am__fastdepCC_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
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/one_at_a_time.c' object='libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
+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`
 
-libhashkit/libhashkit_libhashkit_la-strerror.lo: libhashkit/strerror.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/strerror.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/strerror.c' object='libhashkit/libhashkit_libhashkit_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-strerror.lo `test -f 'libhashkit/strerror.c' || echo '$(srcdir)/'`libhashkit/strerror.c
+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
 
-libhashkit/libhashkit_libhashkit_la-hsieh.lo: libhashkit/hsieh.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) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/hsieh.c' object='libhashkit/libhashkit_libhashkit_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-hsieh.lo `test -f 'libhashkit/hsieh.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-algorithm.lo: libhashkit/algorithm.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/algorithm.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/algorithm.c' object='libhashkit/libhashkit_libhashkitinc_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-algorithm.lo `test -f 'libhashkit/algorithm.c' || echo '$(srcdir)/'`libhashkit/algorithm.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-behavior.lo: libhashkit/behavior.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/behavior.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/behavior.c' object='libhashkit/libhashkit_libhashkitinc_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-behavior.lo `test -f 'libhashkit/behavior.c' || echo '$(srcdir)/'`libhashkit/behavior.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-crc32.lo: libhashkit/crc32.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/crc32.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/crc32.c' object='libhashkit/libhashkit_libhashkitinc_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-crc32.lo `test -f 'libhashkit/crc32.c' || echo '$(srcdir)/'`libhashkit/crc32.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-fnv.lo: libhashkit/fnv.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-fnv.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-fnv.lo `test -f 'libhashkit/fnv.c' || echo '$(srcdir)/'`libhashkit/fnv.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/fnv.c' object='libhashkit/libhashkit_libhashkitinc_la-fnv.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-fnv.lo `test -f 'libhashkit/fnv.c' || echo '$(srcdir)/'`libhashkit/fnv.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-digest.lo: libhashkit/digest.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/digest.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/digest.c' object='libhashkit/libhashkit_libhashkitinc_la-digest.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-digest.lo `test -f 'libhashkit/digest.c' || echo '$(srcdir)/'`libhashkit/digest.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-function.lo: libhashkit/function.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/function.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/function.c' object='libhashkit/libhashkit_libhashkitinc_la-function.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-function.lo `test -f 'libhashkit/function.c' || echo '$(srcdir)/'`libhashkit/function.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-hashkit.lo: libhashkit/hashkit.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/hashkit.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/hashkit.c' object='libhashkit/libhashkit_libhashkitinc_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-hashkit.lo `test -f 'libhashkit/hashkit.c' || echo '$(srcdir)/'`libhashkit/hashkit.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-jenkins.lo: libhashkit/jenkins.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/jenkins.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/jenkins.c' object='libhashkit/libhashkit_libhashkitinc_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-jenkins.lo `test -f 'libhashkit/jenkins.c' || echo '$(srcdir)/'`libhashkit/jenkins.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-ketama.lo: libhashkit/ketama.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/ketama.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/ketama.c' object='libhashkit/libhashkit_libhashkitinc_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-ketama.lo `test -f 'libhashkit/ketama.c' || echo '$(srcdir)/'`libhashkit/ketama.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-md5.lo: libhashkit/md5.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/md5.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/md5.c' object='libhashkit/libhashkit_libhashkitinc_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-md5.lo `test -f 'libhashkit/md5.c' || echo '$(srcdir)/'`libhashkit/md5.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-murmur.lo: libhashkit/murmur.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/murmur.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/murmur.c' object='libhashkit/libhashkit_libhashkitinc_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.c' || echo '$(srcdir)/'`libhashkit/murmur.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo: libhashkit/one_at_a_time.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
-@am__fastdepCC_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
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/one_at_a_time.c' object='libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.c' || echo '$(srcdir)/'`libhashkit/one_at_a_time.c
+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`
 
-libhashkit/libhashkit_libhashkitinc_la-strerror.lo: libhashkit/strerror.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/strerror.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/strerror.c' object='libhashkit/libhashkit_libhashkitinc_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-strerror.lo `test -f 'libhashkit/strerror.c' || echo '$(srcdir)/'`libhashkit/strerror.c
+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
 
-libhashkit/libhashkit_libhashkitinc_la-hsieh.lo: libhashkit/hsieh.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) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -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.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libhashkit/hsieh.c' object='libhashkit/libhashkit_libhashkitinc_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CFLAGS) $(CFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-hsieh.lo `test -f 'libhashkit/hsieh.c' || echo '$(srcdir)/'`libhashkit/hsieh.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-allocators.lo: libmemcached/allocators.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-allocators.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo -c -o libmemcached/libmemcached_libmemcached_la-allocators.lo `test -f 'libmemcached/allocators.c' || echo '$(srcdir)/'`libmemcached/allocators.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/allocators.c' object='libmemcached/libmemcached_libmemcached_la-allocators.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-allocators.lo `test -f 'libmemcached/allocators.c' || echo '$(srcdir)/'`libmemcached/allocators.c
+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
 
-libmemcached/libmemcached_libmemcached_la-analyze.lo: libmemcached/analyze.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-analyze.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Tpo -c -o libmemcached/libmemcached_libmemcached_la-analyze.lo `test -f 'libmemcached/analyze.c' || echo '$(srcdir)/'`libmemcached/analyze.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/analyze.c' object='libmemcached/libmemcached_libmemcached_la-analyze.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-analyze.lo `test -f 'libmemcached/analyze.c' || echo '$(srcdir)/'`libmemcached/analyze.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-auto.lo: libmemcached/auto.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-auto.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Tpo -c -o libmemcached/libmemcached_libmemcached_la-auto.lo `test -f 'libmemcached/auto.c' || echo '$(srcdir)/'`libmemcached/auto.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/auto.c' object='libmemcached/libmemcached_libmemcached_la-auto.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-auto.lo `test -f 'libmemcached/auto.c' || echo '$(srcdir)/'`libmemcached/auto.c
+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
 
-libmemcached/libmemcached_libmemcached_la-behavior.lo: libmemcached/behavior.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-behavior.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo -c -o libmemcached/libmemcached_libmemcached_la-behavior.lo `test -f 'libmemcached/behavior.c' || echo '$(srcdir)/'`libmemcached/behavior.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/behavior.c' object='libmemcached/libmemcached_libmemcached_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-behavior.lo `test -f 'libmemcached/behavior.c' || echo '$(srcdir)/'`libmemcached/behavior.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-connect.lo: libmemcached/connect.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-connect.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Tpo -c -o libmemcached/libmemcached_libmemcached_la-connect.lo `test -f 'libmemcached/connect.c' || echo '$(srcdir)/'`libmemcached/connect.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/connect.c' object='libmemcached/libmemcached_libmemcached_la-connect.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-connect.lo `test -f 'libmemcached/connect.c' || echo '$(srcdir)/'`libmemcached/connect.c
+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
 
-libmemcached/libmemcached_libmemcached_la-delete.lo: libmemcached/delete.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-delete.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Tpo -c -o libmemcached/libmemcached_libmemcached_la-delete.lo `test -f 'libmemcached/delete.c' || echo '$(srcdir)/'`libmemcached/delete.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/delete.c' object='libmemcached/libmemcached_libmemcached_la-delete.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-delete.lo `test -f 'libmemcached/delete.c' || echo '$(srcdir)/'`libmemcached/delete.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-do.lo: libmemcached/do.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-do.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Tpo -c -o libmemcached/libmemcached_libmemcached_la-do.lo `test -f 'libmemcached/do.c' || echo '$(srcdir)/'`libmemcached/do.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/do.c' object='libmemcached/libmemcached_libmemcached_la-do.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-do.lo `test -f 'libmemcached/do.c' || echo '$(srcdir)/'`libmemcached/do.c
+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
 
-libmemcached/libmemcached_libmemcached_la-dump.lo: libmemcached/dump.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-dump.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Tpo -c -o libmemcached/libmemcached_libmemcached_la-dump.lo `test -f 'libmemcached/dump.c' || echo '$(srcdir)/'`libmemcached/dump.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/dump.c' object='libmemcached/libmemcached_libmemcached_la-dump.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-dump.lo `test -f 'libmemcached/dump.c' || echo '$(srcdir)/'`libmemcached/dump.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-fetch.lo: libmemcached/fetch.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-fetch.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Tpo -c -o libmemcached/libmemcached_libmemcached_la-fetch.lo `test -f 'libmemcached/fetch.c' || echo '$(srcdir)/'`libmemcached/fetch.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/fetch.c' object='libmemcached/libmemcached_libmemcached_la-fetch.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-fetch.lo `test -f 'libmemcached/fetch.c' || echo '$(srcdir)/'`libmemcached/fetch.c
+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
 
-libmemcached/libmemcached_libmemcached_la-flush.lo: libmemcached/flush.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-flush.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Tpo -c -o libmemcached/libmemcached_libmemcached_la-flush.lo `test -f 'libmemcached/flush.c' || echo '$(srcdir)/'`libmemcached/flush.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/flush.c' object='libmemcached/libmemcached_libmemcached_la-flush.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-flush.lo `test -f 'libmemcached/flush.c' || echo '$(srcdir)/'`libmemcached/flush.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-flush_buffers.lo: libmemcached/flush_buffers.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-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.c' || echo '$(srcdir)/'`libmemcached/flush_buffers.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/flush_buffers.c' object='libmemcached/libmemcached_libmemcached_la-flush_buffers.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-flush_buffers.lo `test -f 'libmemcached/flush_buffers.c' || echo '$(srcdir)/'`libmemcached/flush_buffers.c
+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
 
-libmemcached/libmemcached_libmemcached_la-get.lo: libmemcached/get.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-get.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Tpo -c -o libmemcached/libmemcached_libmemcached_la-get.lo `test -f 'libmemcached/get.c' || echo '$(srcdir)/'`libmemcached/get.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/get.c' object='libmemcached/libmemcached_libmemcached_la-get.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-get.lo `test -f 'libmemcached/get.c' || echo '$(srcdir)/'`libmemcached/get.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-hash.lo: libmemcached/hash.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-hash.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Tpo -c -o libmemcached/libmemcached_libmemcached_la-hash.lo `test -f 'libmemcached/hash.c' || echo '$(srcdir)/'`libmemcached/hash.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/hash.c' object='libmemcached/libmemcached_libmemcached_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-hash.lo `test -f 'libmemcached/hash.c' || echo '$(srcdir)/'`libmemcached/hash.c
+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
 
-libmemcached/libmemcached_libmemcached_la-hosts.lo: libmemcached/hosts.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-hosts.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Tpo -c -o libmemcached/libmemcached_libmemcached_la-hosts.lo `test -f 'libmemcached/hosts.c' || echo '$(srcdir)/'`libmemcached/hosts.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/hosts.c' object='libmemcached/libmemcached_libmemcached_la-hosts.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-hosts.lo `test -f 'libmemcached/hosts.c' || echo '$(srcdir)/'`libmemcached/hosts.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-io.lo: libmemcached/io.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-io.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Tpo -c -o libmemcached/libmemcached_libmemcached_la-io.lo `test -f 'libmemcached/io.c' || echo '$(srcdir)/'`libmemcached/io.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/io.c' object='libmemcached/libmemcached_libmemcached_la-io.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-io.lo `test -f 'libmemcached/io.c' || echo '$(srcdir)/'`libmemcached/io.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-key.lo: libmemcached/key.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-key.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Tpo -c -o libmemcached/libmemcached_libmemcached_la-key.lo `test -f 'libmemcached/key.c' || echo '$(srcdir)/'`libmemcached/key.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/key.c' object='libmemcached/libmemcached_libmemcached_la-key.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-key.lo `test -f 'libmemcached/key.c' || echo '$(srcdir)/'`libmemcached/key.c
+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
 
-libmemcached/libmemcached_libmemcached_la-memcached.lo: libmemcached/memcached.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-memcached.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Tpo -c -o libmemcached/libmemcached_libmemcached_la-memcached.lo `test -f 'libmemcached/memcached.c' || echo '$(srcdir)/'`libmemcached/memcached.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/memcached.c' object='libmemcached/libmemcached_libmemcached_la-memcached.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-memcached.lo `test -f 'libmemcached/memcached.c' || echo '$(srcdir)/'`libmemcached/memcached.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-parse.lo: libmemcached/parse.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-parse.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Tpo -c -o libmemcached/libmemcached_libmemcached_la-parse.lo `test -f 'libmemcached/parse.c' || echo '$(srcdir)/'`libmemcached/parse.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/parse.c' object='libmemcached/libmemcached_libmemcached_la-parse.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-parse.lo `test -f 'libmemcached/parse.c' || echo '$(srcdir)/'`libmemcached/parse.c
+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
 
-libmemcached/libmemcached_libmemcached_la-purge.lo: libmemcached/purge.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-purge.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Tpo -c -o libmemcached/libmemcached_libmemcached_la-purge.lo `test -f 'libmemcached/purge.c' || echo '$(srcdir)/'`libmemcached/purge.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/purge.c' object='libmemcached/libmemcached_libmemcached_la-purge.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-purge.lo `test -f 'libmemcached/purge.c' || echo '$(srcdir)/'`libmemcached/purge.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-quit.lo: libmemcached/quit.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-quit.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Tpo -c -o libmemcached/libmemcached_libmemcached_la-quit.lo `test -f 'libmemcached/quit.c' || echo '$(srcdir)/'`libmemcached/quit.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/quit.c' object='libmemcached/libmemcached_libmemcached_la-quit.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-quit.lo `test -f 'libmemcached/quit.c' || echo '$(srcdir)/'`libmemcached/quit.c
+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
 
-libmemcached/libmemcached_libmemcached_la-response.lo: libmemcached/response.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-response.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Tpo -c -o libmemcached/libmemcached_libmemcached_la-response.lo `test -f 'libmemcached/response.c' || echo '$(srcdir)/'`libmemcached/response.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/response.c' object='libmemcached/libmemcached_libmemcached_la-response.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-response.lo `test -f 'libmemcached/response.c' || echo '$(srcdir)/'`libmemcached/response.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-result.lo: libmemcached/result.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-result.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Tpo -c -o libmemcached/libmemcached_libmemcached_la-result.lo `test -f 'libmemcached/result.c' || echo '$(srcdir)/'`libmemcached/result.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/result.c' object='libmemcached/libmemcached_libmemcached_la-result.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-result.lo `test -f 'libmemcached/result.c' || echo '$(srcdir)/'`libmemcached/result.c
+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
 
-libmemcached/libmemcached_libmemcached_la-server.lo: libmemcached/server.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-server.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Tpo -c -o libmemcached/libmemcached_libmemcached_la-server.lo `test -f 'libmemcached/server.c' || echo '$(srcdir)/'`libmemcached/server.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/server.c' object='libmemcached/libmemcached_libmemcached_la-server.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-server.lo `test -f 'libmemcached/server.c' || echo '$(srcdir)/'`libmemcached/server.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-server_list.lo: libmemcached/server_list.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-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.c' || echo '$(srcdir)/'`libmemcached/server_list.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/server_list.c' object='libmemcached/libmemcached_libmemcached_la-server_list.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-server_list.lo `test -f 'libmemcached/server_list.c' || echo '$(srcdir)/'`libmemcached/server_list.c
+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
 
-libmemcached/libmemcached_libmemcached_la-stats.lo: libmemcached/stats.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-stats.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Tpo -c -o libmemcached/libmemcached_libmemcached_la-stats.lo `test -f 'libmemcached/stats.c' || echo '$(srcdir)/'`libmemcached/stats.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/stats.c' object='libmemcached/libmemcached_libmemcached_la-stats.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-stats.lo `test -f 'libmemcached/stats.c' || echo '$(srcdir)/'`libmemcached/stats.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-storage.lo: libmemcached/storage.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-storage.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Tpo -c -o libmemcached/libmemcached_libmemcached_la-storage.lo `test -f 'libmemcached/storage.c' || echo '$(srcdir)/'`libmemcached/storage.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/storage.c' object='libmemcached/libmemcached_libmemcached_la-storage.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-storage.lo `test -f 'libmemcached/storage.c' || echo '$(srcdir)/'`libmemcached/storage.c
+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
 
-libmemcached/libmemcached_libmemcached_la-strerror.lo: libmemcached/strerror.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-strerror.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo -c -o libmemcached/libmemcached_libmemcached_la-strerror.lo `test -f 'libmemcached/strerror.c' || echo '$(srcdir)/'`libmemcached/strerror.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/strerror.c' object='libmemcached/libmemcached_libmemcached_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-strerror.lo `test -f 'libmemcached/strerror.c' || echo '$(srcdir)/'`libmemcached/strerror.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-verbosity.lo: libmemcached/verbosity.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-verbosity.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Tpo -c -o libmemcached/libmemcached_libmemcached_la-verbosity.lo `test -f 'libmemcached/verbosity.c' || echo '$(srcdir)/'`libmemcached/verbosity.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/verbosity.c' object='libmemcached/libmemcached_libmemcached_la-verbosity.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-verbosity.lo `test -f 'libmemcached/verbosity.c' || echo '$(srcdir)/'`libmemcached/verbosity.c
+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
 
-libmemcached/libmemcached_libmemcached_la-version.lo: libmemcached/version.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-version.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Tpo -c -o libmemcached/libmemcached_libmemcached_la-version.lo `test -f 'libmemcached/version.c' || echo '$(srcdir)/'`libmemcached/version.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/version.c' object='libmemcached/libmemcached_libmemcached_la-version.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-version.lo `test -f 'libmemcached/version.c' || echo '$(srcdir)/'`libmemcached/version.c
+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`
 
-libmemcached/libmemcached_libmemcached_la-sasl.lo: libmemcached/sasl.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-sasl.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Tpo -c -o libmemcached/libmemcached_libmemcached_la-sasl.lo `test -f 'libmemcached/sasl.c' || echo '$(srcdir)/'`libmemcached/sasl.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/sasl.c' object='libmemcached/libmemcached_libmemcached_la-sasl.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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-sasl.lo `test -f 'libmemcached/sasl.c' || echo '$(srcdir)/'`libmemcached/sasl.c
+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
 
-poll/libmemcached_libmemcached_la-poll.lo: poll/poll.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 poll/libmemcached_libmemcached_la-poll.lo -MD -MP -MF poll/$(DEPDIR)/libmemcached_libmemcached_la-poll.Tpo -c -o poll/libmemcached_libmemcached_la-poll.lo `test -f 'poll/poll.c' || echo '$(srcdir)/'`poll/poll.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) poll/$(DEPDIR)/libmemcached_libmemcached_la-poll.Tpo poll/$(DEPDIR)/libmemcached_libmemcached_la-poll.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='poll/poll.c' object='poll/libmemcached_libmemcached_la-poll.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 poll/libmemcached_libmemcached_la-poll.lo `test -f 'poll/poll.c' || echo '$(srcdir)/'`poll/poll.c
+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`
 
-libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo: libmemcached/callback.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_libmemcachedcallbacks_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcachedcallbacks_la-callback.Tpo -c -o libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo `test -f 'libmemcached/callback.c' || echo '$(srcdir)/'`libmemcached/callback.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcachedcallbacks_la-callback.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcachedcallbacks_la-callback.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/callback.c' object='libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedcallbacks_la_CFLAGS) $(CFLAGS) -c -o libmemcached/libmemcached_libmemcachedcallbacks_la-callback.lo `test -f 'libmemcached/callback.c' || echo '$(srcdir)/'`libmemcached/callback.c
+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
 
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo: libmemcached/protocol/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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo -MD -MP -MF libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Tpo -c -o libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo `test -f 'libmemcached/protocol/ascii_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/ascii_handler.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Tpo libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/protocol/ascii_handler.c' object='libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo `test -f 'libmemcached/protocol/ascii_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/ascii_handler.c
+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`
 
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo: libmemcached/protocol/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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo -MD -MP -MF libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Tpo -c -o libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo `test -f 'libmemcached/protocol/binary_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/binary_handler.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Tpo libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/protocol/binary_handler.c' object='libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo `test -f 'libmemcached/protocol/binary_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/binary_handler.c
+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
 
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo: libmemcached/protocol/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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo -MD -MP -MF libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Tpo -c -o libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo `test -f 'libmemcached/protocol/cache.c' || echo '$(srcdir)/'`libmemcached/protocol/cache.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Tpo libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/protocol/cache.c' object='libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-cache.lo `test -f 'libmemcached/protocol/cache.c' || echo '$(srcdir)/'`libmemcached/protocol/cache.c
+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`
 
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo: libmemcached/protocol/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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo -MD -MP -MF libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Tpo -c -o libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo `test -f 'libmemcached/protocol/pedantic.c' || echo '$(srcdir)/'`libmemcached/protocol/pedantic.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Tpo libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/protocol/pedantic.c' object='libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-pedantic.lo `test -f 'libmemcached/protocol/pedantic.c' || echo '$(srcdir)/'`libmemcached/protocol/pedantic.c
+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
 
-libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo: libmemcached/protocol/protocol_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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo -MD -MP -MF libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-protocol_handler.Tpo -c -o libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo `test -f 'libmemcached/protocol/protocol_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/protocol_handler.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-protocol_handler.Tpo libmemcached/protocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-protocol_handler.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/protocol/protocol_handler.c' object='libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(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 libmemcached/protocol/libmemcached_libmemcachedprotocol_la-protocol_handler.lo `test -f 'libmemcached/protocol/protocol_handler.c' || echo '$(srcdir)/'`libmemcached/protocol/protocol_handler.c
+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`
 
-libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo: libmemcached/util/ping.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_libmemcachedutil_la_CFLAGS) $(CFLAGS) -MT libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo -MD -MP -MF libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Tpo -c -o libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo `test -f 'libmemcached/util/ping.c' || echo '$(srcdir)/'`libmemcached/util/ping.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Tpo libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/util/ping.c' object='libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CFLAGS) $(CFLAGS) -c -o libmemcached/util/libmemcached_libmemcachedutil_la-ping.lo `test -f 'libmemcached/util/ping.c' || echo '$(srcdir)/'`libmemcached/util/ping.c
+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
 
-libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo: libmemcached/util/pool.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_libmemcachedutil_la_CFLAGS) $(CFLAGS) -MT libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo -MD -MP -MF libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Tpo -c -o libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo `test -f 'libmemcached/util/pool.c' || echo '$(srcdir)/'`libmemcached/util/pool.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Tpo libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/util/pool.c' object='libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CFLAGS) $(CFLAGS) -c -o libmemcached/util/libmemcached_libmemcachedutil_la-pool.lo `test -f 'libmemcached/util/pool.c' || echo '$(srcdir)/'`libmemcached/util/pool.c
+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`
 
-libmemcached/util/libmemcached_libmemcachedutil_la-version.lo: libmemcached/util/version.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_libmemcachedutil_la_CFLAGS) $(CFLAGS) -MT libmemcached/util/libmemcached_libmemcachedutil_la-version.lo -MD -MP -MF libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Tpo -c -o libmemcached/util/libmemcached_libmemcachedutil_la-version.lo `test -f 'libmemcached/util/version.c' || echo '$(srcdir)/'`libmemcached/util/version.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Tpo libmemcached/util/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Plo
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libmemcached/util/version.c' object='libmemcached/util/libmemcached_libmemcachedutil_la-version.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CFLAGS) $(CFLAGS) -c -o libmemcached/util/libmemcached_libmemcachedutil_la-version.lo `test -f 'libmemcached/util/version.c' || echo '$(srcdir)/'`libmemcached/util/version.c
+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
 
-tests/tests_testapp-mem_functions.o: tests/mem_functions.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testapp_CFLAGS) $(CFLAGS) -MT tests/tests_testapp-mem_functions.o -MD -MP -MF tests/$(DEPDIR)/tests_testapp-mem_functions.Tpo -c -o tests/tests_testapp-mem_functions.o `test -f 'tests/mem_functions.c' || echo '$(srcdir)/'`tests/mem_functions.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testapp-mem_functions.Tpo tests/$(DEPDIR)/tests_testapp-mem_functions.Po
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tests/mem_functions.c' object='tests/tests_testapp-mem_functions.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testapp_CFLAGS) $(CFLAGS) -c -o tests/tests_testapp-mem_functions.o `test -f 'tests/mem_functions.c' || echo '$(srcdir)/'`tests/mem_functions.c
+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`
 
-tests/tests_testapp-mem_functions.obj: tests/mem_functions.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testapp_CFLAGS) $(CFLAGS) -MT tests/tests_testapp-mem_functions.obj -MD -MP -MF tests/$(DEPDIR)/tests_testapp-mem_functions.Tpo -c -o tests/tests_testapp-mem_functions.obj `if test -f 'tests/mem_functions.c'; then $(CYGPATH_W) 'tests/mem_functions.c'; else $(CYGPATH_W) '$(srcdir)/tests/mem_functions.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testapp-mem_functions.Tpo tests/$(DEPDIR)/tests_testapp-mem_functions.Po
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tests/mem_functions.c' object='tests/tests_testapp-mem_functions.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testapp_CFLAGS) $(CFLAGS) -c -o tests/tests_testapp-mem_functions.obj `if test -f 'tests/mem_functions.c'; then $(CYGPATH_W) 'tests/mem_functions.c'; else $(CYGPATH_W) '$(srcdir)/tests/mem_functions.c'; 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
 
-tests/tests_testudp-mem_udp.o: tests/mem_udp.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testudp_CFLAGS) $(CFLAGS) -MT tests/tests_testudp-mem_udp.o -MD -MP -MF tests/$(DEPDIR)/tests_testudp-mem_udp.Tpo -c -o tests/tests_testudp-mem_udp.o `test -f 'tests/mem_udp.c' || echo '$(srcdir)/'`tests/mem_udp.c
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testudp-mem_udp.Tpo tests/$(DEPDIR)/tests_testudp-mem_udp.Po
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tests/mem_udp.c' object='tests/tests_testudp-mem_udp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testudp_CFLAGS) $(CFLAGS) -c -o tests/tests_testudp-mem_udp.o `test -f 'tests/mem_udp.c' || echo '$(srcdir)/'`tests/mem_udp.c
+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/tests_testudp-mem_udp.obj: tests/mem_udp.c
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testudp_CFLAGS) $(CFLAGS) -MT tests/tests_testudp-mem_udp.obj -MD -MP -MF tests/$(DEPDIR)/tests_testudp-mem_udp.Tpo -c -o tests/tests_testudp-mem_udp.obj `if test -f 'tests/mem_udp.c'; then $(CYGPATH_W) 'tests/mem_udp.c'; else $(CYGPATH_W) '$(srcdir)/tests/mem_udp.c'; fi`
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testudp-mem_udp.Tpo tests/$(DEPDIR)/tests_testudp-mem_udp.Po
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='tests/mem_udp.c' object='tests/tests_testudp-mem_udp.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testudp_CFLAGS) $(CFLAGS) -c -o tests/tests_testudp-mem_udp.obj `if test -f 'tests/mem_udp.c'; then $(CYGPATH_W) 'tests/mem_udp.c'; else $(CYGPATH_W) '$(srcdir)/tests/mem_udp.c'; 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
 
-.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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+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@	$(CXXCOMPILE) -c -o $@ $<
+@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`
 
-.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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+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@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@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
 
-.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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+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@	$(LTCXXCOMPILE) -c -o $@ $<
+@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/tests_hashplus-hash_plus.o: tests/hash_plus.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hashplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_hashplus-hash_plus.o -MD -MP -MF tests/$(DEPDIR)/tests_hashplus-hash_plus.Tpo -c -o tests/tests_hashplus-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_hashplus-hash_plus.Tpo tests/$(DEPDIR)/tests_hashplus-hash_plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/hash_plus.cc' object='tests/tests_hashplus-hash_plus.o' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hashplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_hashplus-hash_plus.o `test -f 'tests/hash_plus.cc' || echo '$(srcdir)/'`tests/hash_plus.cc
+@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/tests_hashplus-hash_plus.obj: tests/hash_plus.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hashplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_hashplus-hash_plus.obj -MD -MP -MF tests/$(DEPDIR)/tests_hashplus-hash_plus.Tpo -c -o tests/tests_hashplus-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_hashplus-hash_plus.Tpo tests/$(DEPDIR)/tests_hashplus-hash_plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/hash_plus.cc' object='tests/tests_hashplus-hash_plus.obj' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hashplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_hashplus-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_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/tests_memplus-mem_plus.o: tests/mem_plus.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memplus-mem_plus.o -MD -MP -MF tests/$(DEPDIR)/tests_memplus-mem_plus.Tpo -c -o tests/tests_memplus-mem_plus.o `test -f 'tests/mem_plus.cc' || echo '$(srcdir)/'`tests/mem_plus.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memplus-mem_plus.Tpo tests/$(DEPDIR)/tests_memplus-mem_plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/mem_plus.cc' object='tests/tests_memplus-mem_plus.o' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memplus-mem_plus.o `test -f 'tests/mem_plus.cc' || echo '$(srcdir)/'`tests/mem_plus.cc
+@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/tests_memplus-mem_plus.obj: tests/mem_plus.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memplus-mem_plus.obj -MD -MP -MF tests/$(DEPDIR)/tests_memplus-mem_plus.Tpo -c -o tests/tests_memplus-mem_plus.obj `if test -f 'tests/mem_plus.cc'; then $(CYGPATH_W) 'tests/mem_plus.cc'; else $(CYGPATH_W) '$(srcdir)/tests/mem_plus.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memplus-mem_plus.Tpo tests/$(DEPDIR)/tests_memplus-mem_plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/mem_plus.cc' object='tests/tests_memplus-mem_plus.obj' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memplus-mem_plus.obj `if test -f 'tests/mem_plus.cc'; then $(CYGPATH_W) 'tests/mem_plus.cc'; else $(CYGPATH_W) '$(srcdir)/tests/mem_plus.cc'; fi`
+@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/tests_testplus-plus.o: tests/plus.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_testplus-plus.o -MD -MP -MF tests/$(DEPDIR)/tests_testplus-plus.Tpo -c -o tests/tests_testplus-plus.o `test -f 'tests/plus.cpp' || echo '$(srcdir)/'`tests/plus.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testplus-plus.Tpo tests/$(DEPDIR)/tests_testplus-plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/plus.cpp' object='tests/tests_testplus-plus.o' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_testplus-plus.o `test -f 'tests/plus.cpp' || echo '$(srcdir)/'`tests/plus.cpp
+@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/tests_testplus-plus.obj: tests/plus.cpp
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_testplus-plus.obj -MD -MP -MF tests/$(DEPDIR)/tests_testplus-plus.Tpo -c -o tests/tests_testplus-plus.obj `if test -f 'tests/plus.cpp'; then $(CYGPATH_W) 'tests/plus.cpp'; else $(CYGPATH_W) '$(srcdir)/tests/plus.cpp'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_testplus-plus.Tpo tests/$(DEPDIR)/tests_testplus-plus.Po
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='tests/plus.cpp' object='tests/tests_testplus-plus.obj' libtool=no @AMDEPBACKSLASH@
+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@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_testplus-plus.obj `if test -f 'tests/plus.cpp'; then $(CYGPATH_W) 'tests/plus.cpp'; else $(CYGPATH_W) '$(srcdir)/tests/plus.cpp'; fi`
+@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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@	$(CXXCOMPILE) -c -o $@ $<
+@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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@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
-@am__fastdepCXX_FALSE@	$(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@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@	$(LTCXXCOMPILE) -c -o $@ $<
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -2689,18 +9105,132 @@ clean-libtool:
 	-rm -rf example/.libs example/_libs
 	-rm -rf libhashkit/.libs libhashkit/_libs
 	-rm -rf libmemcached/.libs libmemcached/_libs
-	-rm -rf libmemcached/protocol/.libs libmemcached/protocol/_libs
-	-rm -rf libmemcached/util/.libs libmemcached/util/_libs
-	-rm -rf poll/.libs poll/_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 unittests/.libs unittests/_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)
-	test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
 	@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"; \
@@ -2714,13 +9244,14 @@ uninstall-pkgconfigDATA:
 	@$(NORMAL_UNINSTALL)
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
 	@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"; \
@@ -2734,20 +9265,21 @@ uninstall-includeHEADERS:
 	@$(NORMAL_UNINSTALL)
 	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
 install-nobase_includeHEADERS: $(nobase_include_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
 	@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'"; \
+	      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 $$?; }; \
@@ -2757,113 +9289,17 @@ uninstall-nobase_includeHEADERS:
 	@$(NORMAL_UNINSTALL)
 	@list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
 	$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(includedir)" && rm -f $$files
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-$(RECURSIVE_CLEAN_TARGETS):
-	@fail= failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
+	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
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
 	set x; \
 	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	$(am__define_uniq_tagged_files); \
 	shift; \
 	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
@@ -2875,15 +9311,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	      $$unique; \
 	  fi; \
 	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+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
@@ -2892,101 +9324,481 @@ 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:
+	@:
 
-check-TESTS: $(TESTS)
-	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
-	srcdir=$(srcdir); export srcdir; \
-	list=' $(TESTS) '; \
-	$(am__tty_colors); \
-	if test -n "$$list"; then \
-	  for tst in $$list; do \
-	    if test -f ./$$tst; then dir=./; \
-	    elif test -f $$tst; then dir=; \
-	    else dir="$(srcdir)/"; fi; \
-	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-	      all=`expr $$all + 1`; \
-	      case " $(XFAIL_TESTS) " in \
-	      *[\ \	]$$tst[\ \	]*) \
-		xpass=`expr $$xpass + 1`; \
-		failed=`expr $$failed + 1`; \
-		col=$$red; res=XPASS; \
-	      ;; \
-	      *) \
-		col=$$grn; res=PASS; \
-	      ;; \
-	      esac; \
-	    elif test $$? -ne 77; then \
-	      all=`expr $$all + 1`; \
-	      case " $(XFAIL_TESTS) " in \
-	      *[\ \	]$$tst[\ \	]*) \
-		xfail=`expr $$xfail + 1`; \
-		col=$$lgn; res=XFAIL; \
-	      ;; \
-	      *) \
-		failed=`expr $$failed + 1`; \
-		col=$$red; res=FAIL; \
-	      ;; \
-	      esac; \
-	    else \
-	      skip=`expr $$skip + 1`; \
-	      col=$$blu; res=SKIP; \
-	    fi; \
-	    echo "$${col}$$res$${std}: $$tst"; \
-	  done; \
-	  if test "$$all" -eq 1; then \
-	    tests="test"; \
-	    All=""; \
-	  else \
-	    tests="tests"; \
-	    All="All "; \
+$(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; \
-	  if test "$$failed" -eq 0; then \
-	    if test "$$xfail" -eq 0; then \
-	      banner="$$All$$all $$tests passed"; \
-	    else \
-	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
-	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
-	    fi; \
-	  else \
-	    if test "$$xpass" -eq 0; then \
-	      banner="$$failed of $$all $$tests failed"; \
+	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 \
-	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
-	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+	      echo "$@: invalid 'result_count' usage" >&2; exit 4; \
 	    fi; \
-	  fi; \
-	  dashes="$$banner"; \
-	  skipped=""; \
-	  if test "$$skip" -ne 0; then \
-	    if test "$$skip" -eq 1; then \
-	      skipped="($$skip test was not run)"; \
+	    shift; \
+	    desc=$$1 count=$$2; \
+	    if test $$maybe_colorize = yes && test $$count -gt 0; then \
+	      color_start=$$3 color_end=$$std; \
 	    else \
-	      skipped="($$skip tests were not run)"; \
+	      color_start= color_end=; \
 	    fi; \
-	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-	      dashes="$$skipped"; \
-	  fi; \
-	  report=""; \
-	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-	    report="Please report to $(PACKAGE_BUGREPORT)"; \
-	    test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-	      dashes="$$report"; \
-	  fi; \
-	  dashes=`echo "$$dashes" | sed s/./=/g`; \
-	  if test "$$failed" -eq 0; then \
-	    echo "$$grn$$dashes"; \
-	  else \
-	    echo "$$red$$dashes"; \
-	  fi; \
-	  echo "$$banner"; \
-	  test -z "$$skipped" || echo "$$skipped"; \
-	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes$$std"; \
-	  test "$$failed" -eq 0; \
-	else :; 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)
@@ -3020,34 +9832,6 @@ distdir: $(DISTFILES)
 	    || exit 1; \
 	  fi; \
 	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(MKDIR_P) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	  fi; \
-	done
-	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
-	    $(am__relativize); \
-	    new_distdir=$$reldir; \
-	    dir1=$$subdir; dir2="$(top_distdir)"; \
-	    $(am__relativize); \
-	    new_top_distdir=$$reldir; \
-	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
-	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
-	    ($(am__cd) $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$new_top_distdir" \
-	        distdir="$$new_distdir" \
-		am__remove_distdir=: \
-		am__skip_length_check=: \
-		am__skip_mode_fix=: \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
 	-test -n "$(am__skip_mode_fix)" \
 	|| find "$(distdir)" -type d ! -perm -755 \
 		-exec chmod u+rwx,go+rx {} \; -o \
@@ -3057,36 +9841,36 @@ distdir: $(DISTFILES)
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
-	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-	$(am__remove_distdir)
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
 
-dist-lzma: distdir
-	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-	$(am__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 -c >$(distdir).tar.xz
-	$(am__remove_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__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-shar: distdir
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
 dist-zip: distdir
 	-rm -f $(distdir).zip
 	zip -rq $(distdir).zip $(distdir)
-	$(am__remove_distdir)
+	$(am__post_remove_distdir)
 
-dist dist-all: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-	$(am__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
@@ -3097,8 +9881,8 @@ distcheck: dist
 	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
-	*.tar.lzma*) \
-	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
 	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
@@ -3108,9 +9892,9 @@ distcheck: dist
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod a+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
+	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,^[^:\\/]:[\\/],/,'` \
@@ -3118,6 +9902,7 @@ distcheck: dist
 	  && 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 \
@@ -3141,13 +9926,21 @@ distcheck: dist
 	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
 	  && cd "$$am__cwd" \
 	  || exit 1
-	$(am__remove_distdir)
+	$(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:
-	@$(am__cd) '$(distuninstallcheck_dir)' \
-	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	@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)"; \
@@ -3164,35 +9957,42 @@ distcleancheck: distclean
 	       $(distcleancheck_listfiles) ; \
 	       exit 1; } >&2
 check-am: all-am
-	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
-	$(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local
+	$(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \
-		config.h
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \
+		mem_config.h
 install-binPROGRAMS: install-libLTLIBRARIES
 
-installdirs: installdirs-recursive
-installdirs-am:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
+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-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
+	$(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-recursive
+installcheck: installcheck-am
 install-strip:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+	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)
@@ -3206,416 +10006,637 @@ distclean-generic:
 	-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/protocol/$(DEPDIR)/$(am__dirstamp)
-	-rm -f libmemcached/protocol/$(am__dirstamp)
-	-rm -f libmemcached/util/$(DEPDIR)/$(am__dirstamp)
-	-rm -f libmemcached/util/$(am__dirstamp)
-	-rm -f poll/$(DEPDIR)/$(am__dirstamp)
-	-rm -f poll/$(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 unittests/$(DEPDIR)/$(am__dirstamp)
-	-rm -f unittests/$(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)
-clean: clean-recursive
+	-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-checkPROGRAMS clean-generic \
-	clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
-	clean-noinstPROGRAMS mostlyclean-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-recursive
+distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
+	-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-recursive
+dvi: dvi-am
 
 dvi-am:
 
-html: html-recursive
+html: html-am
 
-html-am:
+html-am: html-local
 
-info: info-recursive
+info: info-am
 
 info-am:
 
-install-data-am: install-includeHEADERS install-nobase_includeHEADERS \
+install-data-am: install-dist_aclocalDATA install-includeHEADERS \
+	install-man install-nobase_includeHEADERS \
 	install-pkgconfigDATA
 
-install-dvi: install-dvi-recursive
+install-dvi: install-dvi-am
 
 install-dvi-am:
 
 install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
 
-install-html: install-html-recursive
+install-html: install-html-am
 
-install-html-am:
+install-html-am: install-html-local
 
-install-info: install-info-recursive
+install-info: install-info-am
 
 install-info-am:
 
-install-man:
+install-man: install-man1 install-man3
 
-install-pdf: install-pdf-recursive
+install-pdf: install-pdf-am
 
 install-pdf-am:
 
-install-ps: install-ps-recursive
+install-ps: install-ps-am
 
 install-ps-am:
 
 installcheck-am:
 
-maintainer-clean: maintainer-clean-recursive
+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/$(DEPDIR) libmemcached/protocol/$(DEPDIR) libmemcached/util/$(DEPDIR) poll/$(DEPDIR) tests/$(DEPDIR) unittests/$(DEPDIR)
+	-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-am: distclean-am maintainer-clean-generic \
+	maintainer-clean-local
 
-mostlyclean: mostlyclean-recursive
+mostlyclean: mostlyclean-am
 
 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
 	mostlyclean-libtool
 
-pdf: pdf-recursive
+pdf: pdf-am
 
 pdf-am:
 
-ps: ps-recursive
+ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
-	uninstall-libLTLIBRARIES uninstall-nobase_includeHEADERS \
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_aclocalDATA \
+	uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-nobase_includeHEADERS \
 	uninstall-pkgconfigDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
-	check-am ctags-recursive install install-am install-strip \
-	tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-	all all-am am--refresh check check-TESTS check-am check-local \
-	clean clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
-	clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
-	clean-noinstPROGRAMS ctags ctags-recursive dist dist-all \
-	dist-bzip2 dist-gzip dist-lzma 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 info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-includeHEADERS install-info \
-	install-info-am install-libLTLIBRARIES install-man \
+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 installdirs-am \
-	maintainer-clean maintainer-clean-generic mostlyclean \
+	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 tags tags-recursive uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-includeHEADERS \
-	uninstall-libLTLIBRARIES uninstall-nobase_includeHEADERS \
-	uninstall-pkgconfigDATA
+	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 <target>' where <target> 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
 
-test-docs:
-	(cd docs && $(MAKE) test-docs)
-
-libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d
-	$(DTRACE) $(DTRACEFLAGS) -h -o libmemcached/dtrace_probes.h -s ${top_srcdir}/libmemcached/libmemcached_probes.d
-
-libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS} config.h
-
-.d.o:
-	$(DTRACE) $(DTRACEFLAGS) -o libmemcached/libmemcached_probes.o -G -s ${top_srcdir}/libmemcached/libmemcached_probes.d `grep '^pic_object' ${top_builddir}/libmemcached/*.lo | cut -f 2 -d\' | sed "s/^/${top_builddir}\/libmemcached\//"`
-
-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
-# Shorthand
-unit: check-TESTS
-
-test: check
-
-check-local: $(TEST_DOCS) test-mem test-hash memcapable
-	@echo "Tests completed"
-
-test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
-	@echo "Tests completed"
-
-memcapable: clients/memcapable
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memcat: clients/memcat clients/memcp
-	@echo "Testing memcat"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" `pwd`/clients/memcp
-	@clients/memcat --servers="localhost:12555" memcp > `pwd`/tests/scratch
-	@clients/memcat --servers="localhost:12555" --file=`pwd`/tests/scratch2 memcp
-#	@diff clients/memcp tests/scratch
-	@cat `pwd`/tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm `pwd`/tests/Xumemc.pid
-	@rm `pwd`/tests/scratch
-	@rm `pwd`/tests/scratch2
-
-valgrind-memcat: clients/memcat clients/memcp
-	@echo "Testing memcat"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcp
-	@$(VALGRIND_COMMAND) clients/memcat --servers="localhost:12555" memcp > tests/scratch
-#	@diff clients/memcp tests/scratch
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-	@rm tests/scratch
-
-test-memcp: clients/memcp
-	@echo "Testing memcp"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memcp: clients/memcat clients/memcp
-	@echo "Testing memcp"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memrm: clients/memrm clients/memcp
-	@echo "Testing memrm"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@clients/memrm --servers="localhost:12555" memcat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memrm: clients/memcat clients/memcp
-	@echo "Testing memrm"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@$(VALGRIND_COMMAND) clients/memrm --servers="localhost:12555" memcat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memflush: clients/memflush
-	@echo "Testing memflush"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memflush --servers="localhost:12555"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memflush: clients/memflush
-	@echo "Testing memflush"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memdump: clients/memdump clients/memcp
-	@echo "Testing memdump"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@clients/memdump --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memdump: clients/memcat clients/memcp
-	@echo "Testing memdump"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memstat: clients/memstat
-	@echo "Testing memstat"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memstat --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memstat: clients/memstat
-	@echo "Testing memstat"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memerror: clients/memerror
-	@echo "Testing memerror"
-	@clients/memerror 0 > /dev/null
-
-valgrind-memerror: clients/memerror
-	@echo "Testing memerror"
-	@$(VALGRIND_COMMAND) clients/memerror 0 > /dev/null
-
-test-mem: tests/testapp
-	$(MEM_COMMAND)
-
-test-udp: tests/testudp
-	$(UDP_COMMAND)
-
-test-atom: tests/atomsmasher
-	$(ATOM_COMMAND)
-
-test-plus: tests/testplus
-	$(TESTPLUS_COMMAND)
-
-test-hash: tests/testhashkit
-	$(HASH_COMMAND)
-
-test-hashplus: tests/hashplus
-	$(HASHPLUS_COMMAND)
-
-test-memplus: tests/memplus
-	$(MEMPLUS_COMMAND)
-
-pahole-mem: tests/testapp
-	$(PAHOLE_COMMAND)  $(MEM_COMMAND)
-
-gdb-mem: tests/testapp
-	$(DEBUG_COMMAND)  $(MEM_COMMAND)
-
-gdb-atom: tests/atomsmasher
-	$(DEBUG_COMMAND)  $(UDP_COMMAND)
-
-gdb-udp: tests/testudp
-	$(DEBUG_COMMAND)  $(ATOM_COMMAND)
-
-gdb-plus: tests/testplus
-	$(DEBUG_COMMAND)  $(TESTPLUS_COMMAND)
-
-gdb-hash: tests/testhashkit
-	$(DEBUG_COMMAND) $(HASH_COMMAND)
-
-gdb-hashplus: tests/hashplus
-	$(DEBUG_COMMAND) $(HASHPLUS_COMMAND)
-
-gdb-memplus: tests/memplus
-	$(DEBUG_COMMAND) $(MEMPLUS_COMMAND)
-
-gdb-memslap: clients/memslap
-	$(DEBUG_COMMAND)  $(MEMSLAP_COMMAND)
-
-valgrind-mem: tests/testapp
-	$(VALGRIND_COMMAND)  $(MEM_COMMAND)
-
-valgrind-atom: tests/atomsmasher
-	$(VALGRIND_COMMAND)  $(ATOM_COMMAND)
-
-valgrind-udp: tests/testudp
-	$(VALGRIND_COMMAND)  $(UDP_COMMAND)
-
-valgrind-plus: tests/testplus
-	$(VALGRIND_COMMAND)  $(TESTPLUS_COMMAND)
-
-valgrind-hash: tests/testhashkit
-	$(VALGRIND_COMMAND) $(HASH_COMMAND)
-
-valgrind-hashplus: tests/hashplus
-	$(VALGRIND_COMMAND) $(HASHPLUS_COMMAND)
-
-valgrind-memplus: tests/memplus
-	$(VALGRIND_COMMAND) $(MEMPLUS_COMMAND)
-
-valgrind-memslap: clients/memslap
-	$(VALGRIND_COMMAND) $(MEMSLAP_COMMAND)
-valgrind: tests/testapp tests/testhashkit valgrind-mem valgrind-hash valgrind-memcat valgrind-memcp valgrind-memrm valgrind-memerror valgrind-memdump valgrind-memflush valgrind-memstat
-cachegrind:
-	rm -f tests/cachegrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=cachegrind --cachegrind-out-file=tests/cachegrind.out.%p --branch-sim=yes tests/testapp
-	cg_annotate tests/cachegrind.out.* --auto=yes > tests/cachegrind.out
-callgrind:
-	rm -f tests/callgrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=callgrind --callgrind-out-file=tests/callgrind.out.%p  tests/testapp
-	callgrind_annotate tests/callgrind.out.* --auto=yes > tests/callgrind.out
-helgrind:
-	rm -f helgrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=helgrind  tests/testapp
-helgrind-slap:
-	$(LIBTOOL) --mode=execute valgrind --tool=helgrind  clients/memslap --server=localhost --concurrency=30
-
-test-no-outputdiff: test
-
-hudson-valgrind: tests/testapp
-	$(VALGRIND_COMMAND) --log-file=tests/valgrind.out $(MEM_COMMAND)
-
-fedora:
-	rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-	rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-	cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-	rpmbuild -ba support/libmemcached.spec
-	cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-	cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
-
-generic:
-	rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm
-	rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm
-	cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
-	rpmbuild -ba support/libmemcached.spec
-	cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm .
-	cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm .
-
-rpm: all dist generic fedora
-
-merge-clean:
-	find ./ | $(GREP) \.gcda | xargs rm -f
-	find ./ | $(GREP) \.gcno | xargs rm -f
-	find ./ | $(GREP) \.gz | xargs rm -f
-	find ./ | $(GREP) \.orig | xargs rm -f
-	find ./ | $(GREP) \.rej | xargs rm -f
-	find ./ | $(GREP) \.rpm | xargs rm -f
-	find ./ | $(GREP) \~$$ | xargs rm -f
-	bzr unknowns
-
-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
+@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.
@@ -10,8 +10,11 @@ memrm - Remove a key(s) from the server.
 memstat - Dump the stats of your servers to standard output
 memslap - Load generation utility (benchmark!)
 
-The utilities are beta quality at this point. The library is in production
-in many locations (upwards to 1000+ nodes).
+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
@@ -24,10 +27,17 @@ by someone in the community.
 
 If you are looking for answers to your questions please check out the
 mailing list at:
-http://lists.tangent.org/  
+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.
@@ -11,7 +11,7 @@ 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:
 
-./config/autorun.sh
+./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"
@@ -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
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  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.
@@ -11,15 +11,16 @@
 # 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.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+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'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 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,
@@ -31,10 +32,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
 # 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.11'
+[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.11.1], [],
+m4_if([$1], [1.13.4], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -50,22 +51,22 @@ m4_define([_AM_AUTOCONF_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.11.1])dnl
+[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, 2003, 2005  Free Software Foundation, Inc.
+# 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/../..'.
+# $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
@@ -84,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 #
 # 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
+# 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,
@@ -110,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# 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.
 
-# serial 9
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
 AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[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
@@ -144,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# 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.
 
-# serial 10
 
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# 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
@@ -163,7 +159,7 @@ fi])])
 # _AM_DEPENDENCIES(NAME)
 # ----------------------
 # See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# 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
@@ -176,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
 AC_REQUIRE([AM_DEP_TRACK])dnl
 
-ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
-       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
-       [$1], OBJC, [depcc="$OBJC" 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=])
+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],
@@ -189,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
   # 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'.
+  # 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.
@@ -229,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
     : > 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 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      # 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"
+    # 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
+    # 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
@@ -247,16 +245,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # 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
       ;;
-    msvisualcpp | msvcmsys)
-      # This compiler won't grok `-c -o', but also, the minuso test has
+    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}
@@ -304,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# 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
@@ -314,34 +312,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
 # AM_DEP_TRACK
 # ------------
 AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors])
+[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, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
 
-#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 [{
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # 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
@@ -354,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     # 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
+    # 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.
@@ -366,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`AS_DIRNAME(["$file"])`
@@ -398,7 +399,7 @@ AC_DEFUN([_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
+# 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],
@@ -408,15 +409,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# 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.
 
-# serial 16
-
 # 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.
 
@@ -432,7 +430,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # 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.62])dnl
+[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
@@ -461,31 +459,40 @@ AC_SUBST([CYGPATH_W])
 # Define the identity of the package.
 dnl Distinguish between old-style and new-style calls.
 m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[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], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+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
+[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)
+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([AM_PROG_MKDIR_P])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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+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
@@ -496,28 +503,32 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
 			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-		  [_AM_DEPENDENCIES(CC)],
-		  [define([AC_PROG_CC],
-			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_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)],
-		  [define([AC_PROG_CXX],
-			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_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)],
-		  [define([AC_PROG_OBJC],
-			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+		  [_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
 ])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+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 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],
@@ -545,7 +556,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+# 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,
@@ -564,16 +575,14 @@ if test x"${install_sh}" != xset; then
     install_sh="\${SHELL} $am_aux_dir/install-sh"
   esac
 fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+# 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.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
@@ -589,14 +598,12 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+# 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.
 
-# serial 4
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
@@ -614,7 +621,7 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -639,52 +646,14 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# 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.
-
-# serial 6
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
-          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
 
-# serial 6
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -692,11 +661,10 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# 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
@@ -709,63 +677,35 @@ if test x"${MISSING+set}" != xset; then
   esac
 fi
 # Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
-  am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 else
   am_missing_run=
-  AC_MSG_WARN([`missing' script is too old or missing])
+  AC_MSG_WARN(['missing' script is too old or missing])
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005, 2006  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_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
-  [[\\/$]]* | ?:[[\\/]]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+# 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.
 
-# serial 4
-
 # _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)])
+[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)])])
@@ -776,24 +716,35 @@ AC_DEFUN([_AM_SET_OPTIONS],
 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, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
 
-# serial 5
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
 [AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
 # Reject unsafe characters in $srcdir or the absolute working directory
 # name.  Accept space and tab only in the latter.
 am_lf='
@@ -804,32 +755,40 @@ case `pwd` in
 esac
 case $srcdir in
   *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
-    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
 esac
 
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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 (
-   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
-   rm -f conftest.file
-   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
-
+   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
@@ -839,36 +798,85 @@ else
    AC_MSG_ERROR([newly created file is older than distributed files!
 Check your system clock])
 fi
-AC_MSG_RESULT(yes)])
+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  Free Software Foundation, Inc.
+# 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.
 
-# serial 1
-
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
 # Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
+# ("yes" being less verbose, "no" or empty being verbose).
 AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[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, 2003, 2005  Free Software Foundation, Inc.
+# 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,
@@ -876,34 +884,32 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 
 # AM_PROG_INSTALL_STRIP
 # ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# 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
+# 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
+# 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'.
+# 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, 2008  Free Software Foundation, Inc.
+# 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.
 
-# serial 2
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -911,24 +917,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
 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, 2005  Free Software Foundation, Inc.
+# 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.
 
-# serial 2
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# 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
@@ -938,123 +942,170 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 # 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.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
-     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+[# 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'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-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
+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
 
-  # 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])
+    # 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 <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/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_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/ac_cxx_compile_stdcxx_0x.m4])
-m4_include([m4/ac_cxx_header_stdcxx_98.m4])
-m4_include([m4/acx_pthread.m4])
+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/eagain.m4])
-m4_include([m4/enable_utillib.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/lib-ld.m4])
-m4_include([m4/lib-link.m4])
-m4_include([m4/lib-prefix.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/memcached.m4])
-m4_include([m4/pandora_64bit.m4])
-m4_include([m4/pandora_canonical.m4])
-m4_include([m4/pandora_check_compiler_version.m4])
-m4_include([m4/pandora_check_cxx_standard.m4])
-m4_include([m4/pandora_clock_gettime.m4])
-m4_include([m4/pandora_cxx_demangle.m4])
+m4_include([m4/memaslap.m4])
+m4_include([m4/murmur.m4])
 m4_include([m4/pandora_enable_dtrace.m4])
-m4_include([m4/pandora_extensions.m4])
-m4_include([m4/pandora_have_better_malloc.m4])
-m4_include([m4/pandora_have_gcc_atomics.m4])
-m4_include([m4/pandora_have_libevent.m4])
-m4_include([m4/pandora_have_libgtest.m4])
-m4_include([m4/pandora_have_libinnodb.m4])
-m4_include([m4/pandora_header_assert.m4])
-m4_include([m4/pandora_libtool.m4])
-m4_include([m4/pandora_optimize.m4])
-m4_include([m4/pandora_platform.m4])
-m4_include([m4/pandora_print_callstack.m4])
-m4_include([m4/pandora_pthread.m4])
-m4_include([m4/pandora_sasl.m4])
-m4_include([m4/pandora_use_pipe.m4])
-m4_include([m4/pandora_vc_build.m4])
-m4_include([m4/pandora_version.m4])
-m4_include([m4/pandora_visibility.m4])
-m4_include([m4/pandora_warnings.m4])
-m4_include([m4/pandora_with_gettext.m4])
-m4_include([m4/pod2man.m4])
-m4_include([m4/podchecker.m4])
 m4_include([m4/protocol_binary.m4])
 m4_include([m4/setsockopt.m4])
+m4_include([m4/socket_send_flags.m4])
+m4_include([m4/visibility.m4])
@@ -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 <http://www.gnu.org/licenses/>.
+#
+# 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 <config-patches@gnu.org>."
+
+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 <features.h>
+	#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 <stdio.h>  /* 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 <sys/systemcfg.h>
+
+		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 <stdlib.h>
+		#include <unistd.h>
+
+		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 <unistd.h>
+	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' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/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 <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# 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 <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#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 <sys/param.h>
+  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 <sys/param.h>
+#  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 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> 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:
@@ -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 <http://www.gnu.org/licenses/>.
+#
+# 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 <config-patches@gnu.org>."
+
+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:
@@ -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 <http://www.gnu.org/licenses/>.
+
+# 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 <oliva@dcc.unicamp.br>.
+
+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 <bug-automake@gnu.org>.
+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:
@@ -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:
@@ -0,0 +1,9655 @@
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+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 <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name 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.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/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 <import library>.
+	            $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 >/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 <<EOF
+
+/* $cwrappersource - temporary wrapper executable 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 executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+*/
+EOF
+	    cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* 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 <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_path "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, argc + 1);
+
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
+
+	    cat <<"EOF"
+	  lt_dump_script (stdout);
+	  return 0;
+	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+		    "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+EOF
+	    cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+	    cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+		  tmp_pathspec);
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+		  actual_cwrapper_path);
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(main) libtool target name: %s\n",
+		  target_name);
+EOF
+
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+		  nonnull (lt_argv_zero));
+  for (i = 0; i < newargc; i++)
+    {
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+		      i, nonnull (newargz[i]));
+    }
+
+EOF
+
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      lt_debugprintf (__FILE__, __LINE__,
+		      "(main) failed to launch target \"%s\": %s\n",
+		      lt_argv_zero, nonnull (strerror (errno)));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 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 <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    func_append newdeplibs " $i"
+		    i=""
+		    ;;
+		  esac
+		fi
+		if test -n "$i" ; then
+		  libname=`eval "\\$ECHO \"$libname_spec\""`
+		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		  set dummy $deplib_matches; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    func_append newdeplibs " $i"
+		  else
+		    droppeddeps=yes
+		    echo
+		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		    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 I believe you do not have"
+		    echo "*** because a test_compile did reveal that the linker did not use it for"
+		    echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $RM conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      func_append newdeplibs " $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval "\\$ECHO \"$libname_spec\""`
+		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		    set dummy $deplib_matches; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      func_append newdeplibs " $i"
+		    else
+		      droppeddeps=yes
+		      echo
+		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		      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 a test_compile did reveal that the linker did not use this one"
+		      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  echo
+		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+		  echo "*** make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
+		fi
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_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\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/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
+
@@ -0,0 +1,216 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2014-12-17.19; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org>."
+    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"
+  exit 0 # Added for Memcached::libmemcached 1.001800 - ignore missing programs.
+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:
@@ -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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# 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 <<END
+Usage:
+  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+              [--expect-failure={yes|no}] [--color-tests={yes|no}]
+              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file=  # Where to save the output of the test script.
+trs_file=  # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+  case $1 in
+  --help) print_usage; exit $?;;
+  --version) echo "test-driver $scriptversion"; exit $?;;
+  --test-name) test_name=$2; shift;;
+  --log-file) log_file=$2; shift;;
+  --trs-file) trs_file=$2; shift;;
+  --color-tests) color_tests=$2; shift;;
+  --expect-failure) expect_failure=$2; shift;;
+  --enable-hard-errors) enable_hard_errors=$2; shift;;
+  --) shift; break;;
+  -*) usage_error "invalid option: '$1'";;
+  esac
+  shift
+done
+
+if test $color_tests = yes; then
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  red='' # Red.
+  grn='' # Green.
+  lgn='' # Light green.
+  blu='' # Blue.
+  mgn='' # Magenta.
+  std=''     # No color.
+else
+  red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$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:
@@ -9,12 +9,11 @@
  *
  */
 
-#ifndef __CLIENT_OPTIONS_H__
-#define __CLIENT_OPTIONS_H__
+#pragma once
 
 typedef struct memcached_help_text_st memcached_help_text_st;
 
-typedef enum {
+enum memcached_options {
   OPT_SERVERS= 's',
   OPT_VERSION= 'V',
   OPT_HELP= 'h',
@@ -36,10 +35,11 @@ typedef enum {
   OPT_HASH,
   OPT_BINARY,
   OPT_UDP,
+  OPT_BUFFER,
   OPT_USERNAME,
   OPT_PASSWD,
   OPT_STAT_ARGS,
+  OPT_SERVER_VERSION,
+  OPT_QUIET,
   OPT_FILE= 'f'
-} memcached_options;
-
-#endif /* CLIENT_OPTIONS */
+};
@@ -1,131 +0,0 @@
-/* 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:
- *
- */
-
-/*
-  Execute a memcached_set() a set of pairs.
-  Return the number of rows set.
-*/
-
-#include "config.h"
-#include "execute.h"
-
-unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of)
-{
-  memcached_return_t rc;
-  unsigned int x;
-  unsigned int pairs_sent;
-
-  for (x= 0, pairs_sent= 0; x < number_of; x++)
-  {
-    rc= memcached_set(memc, pairs[x].key, pairs[x].key_length,
-                      pairs[x].value, pairs[x].value_length,
-                      0, 0);
-    if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
-      fprintf(stderr, "Failured on insert of %.*s\n",
-              (unsigned int)pairs[x].key_length, pairs[x].key);
-    else
-      pairs_sent++;
-  }
-
-  return pairs_sent;
-}
-
-/*
-  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)
-{
-  memcached_return_t rc;
-  unsigned int x;
-  unsigned int retrieved;
-
-
-  for (retrieved= 0,x= 0; x < number_of; x++)
-  {
-    char *value;
-    size_t value_length;
-    uint32_t flags;
-    unsigned int fetch_key;
-
-    fetch_key= (unsigned int)((unsigned int)random() % number_of);
-
-    value= memcached_get(memc, pairs[fetch_key].key, pairs[fetch_key].key_length,
-                         &value_length, &flags, &rc);
-
-    if (rc != MEMCACHED_SUCCESS)
-      fprintf(stderr, "Failured on read of %.*s\n",
-              (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[1]= { [0]= &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, "Failed to execute mget: %s\n",
-              memcached_strerror(memc, rc));
-      memcached_quit(memc);
-      return 0;
-    }
-  }
-  else
-  {
-    fprintf(stderr, "Failed to execute mget: %s\n",
-            memcached_strerror(memc, rc));
-    memcached_quit(memc);
-    return 0;
-  }
-
-  return retrieved;
-}
@@ -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 <mem_config.h>
+#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;
+}
@@ -9,17 +9,22 @@
  *
  */
 
-#ifndef CLIENTS_EXECUTE_H
-#define CLIENTS_EXECUTE_H
+#pragma once 
 
 #include <stdio.h>
 
-#include "libmemcached/memcached.h"
-#include "generator.h"
+#include <libmemcached-1.0/memcached.h>
+#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);
-#endif
 
+#ifdef __cplusplus
+} // extern "C"
+#endif
@@ -1,96 +0,0 @@
-/* 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:
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-
-#include "generator.h"
-
-/* 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;
-}
-
-static 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)
-{
-  uint32_t x;
-
-  if (! pairs)
-    return;
-
-  /* We free until we hit the null pair we stores during creation */
-  for (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)
-{
-  unsigned int x;
-  pairs_st *pairs;
-
-  pairs= (pairs_st*)calloc((size_t)number_of + 1, sizeof(pairs_st));
-
-  if (!pairs)
-    goto error;
-
-  for (x= 0; x < number_of; x++)
-  {
-    pairs[x].key= (char *)calloc(100, sizeof(char));
-    if (!pairs[x].key)
-      goto error;
-    get_random_string(pairs[x].key, 100);
-    pairs[x].key_length= 100;
-
-    if (value_length)
-    {
-      pairs[x].value= (char *)calloc(value_length, sizeof(char));
-      if (!pairs[x].value)
-        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:
-    fprintf(stderr, "Memory Allocation failure in pairs_generate.\n");
-    exit(0);
-}
@@ -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 <mem_config.h>
+
+#include <stdint.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <unistd.h>
+
+#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);
+}
@@ -13,8 +13,7 @@
   Code to generate data to be pushed into memcached
 */
 
-#ifndef __GENERATOR_H__
-#define __GENERATOR_H__
+#pragma once
 
 typedef struct pairs_st pairs_st;
 
@@ -25,7 +24,13 @@ struct pairs_st {
   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
@@ -2,87 +2,107 @@
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-CLIENTS_LDADDS = \
-	$(LIBM) \
-	clients/libutilities.la \
-	libmemcached/libmemcached.la
-
-if HAVE_SASL
-CLIENTS_LDADDS+= $(LIBSASL)
-endif
-
-bin_PROGRAMS+= \
-	clients/memcapable \
-	clients/memcat \
-	clients/memcp \
-	clients/memdump \
-	clients/memerror \
-	clients/memflush \
-	clients/memrm \
-	clients/memstat
-
+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/memslap
+  bin_PROGRAMS+= clients/memaslap
+endif
 endif
 endif
 
-noinst_HEADERS+= \
-		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
+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.c
-
-noinst_LTLIBRARIES+= clients/libgenexec.la
-clients_libgenexec_la_SOURCES= clients/generator.c clients/execute.c
+clients_libutilities_la_SOURCES= clients/utilities.cc
 
-clients_memcat_SOURCES= clients/memcat.c
+clients_memcat_SOURCES= clients/memcat.cc
 clients_memcat_LDADD= $(CLIENTS_LDADDS)
 
-clients_memcp_SOURCES= clients/memcp.c
+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.c
+clients_memdump_SOURCES= clients/memdump.cc
 clients_memdump_LDADD= $(CLIENTS_LDADDS)
 
-clients_memstat_SOURCES= clients/memstat.c
+clients_memstat_SOURCES= clients/memstat.cc
 clients_memstat_LDADD= $(CLIENTS_LDADDS)
 
-clients_memrm_SOURCES= clients/memrm.c
+clients_memrm_SOURCES= clients/memrm.cc
 clients_memrm_LDADD= $(CLIENTS_LDADDS)
 
-clients_memflush_SOURCES= clients/memflush.c
+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_memerror_SOURCES= clients/memerror.c
+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.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_memslap_LDADD= $(LTLIBEVENT) clients/libgenexec.la $(CLIENTS_LDADDS)
-
-clients_memcapable_SOURCES= clients/memcapable.c
+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)
-if BUILD_BYTEORDER
-clients_memcapable_LDADD+= libmemcached/libbyteorder.la
-endif
+clients_memcapable_LDADD+= @PTHREAD_LIBS@
 
 test-start-server:
 	clients/memflush --servers=localhost
@@ -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 <mingqiangzhuang@hengtiansoft.com>
+ *
+ */
+#include "mem_config.h"
+
+#include <stdlib.h>
+#include <getopt.h>
+#include <limits.h>
+
+#if defined(HAVE_SYS_TIME_H)
+# include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
+# include <time.h>
+#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 */
@@ -1,1996 +0,0 @@
-/* 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:
- *
- */
-
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#undef NDEBUG
-#include "config.h"
-#include <pthread.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <assert.h>
-#include <string.h>
-#include <inttypes.h>
-#include <stdbool.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include <libmemcached/memcached.h>
-#include <libmemcached/memcached/protocol_binary.h>
-#include <libmemcached/byteorder.h>
-#include "utilities.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
-#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= {.ai_family=AF_UNSPEC,
-    .ai_protocol=IPPROTO_TCP,
-    .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)
-{
-#ifdef 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");
-    closesocket(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");
-      closesocket(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= {
-      .events= direction,
-      .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(stderr, "\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= 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=
-          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=
-          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= htonll(delta);
-  cmd->incr.message.body.initial= 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 0 */
-  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= 0xdeadbeefdeadcafe;
-  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=
-          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=
-          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= 0xdeadbeefdeadcafe;
-  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= 0xdeadbeefdeadcafe;
-  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=
-          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=
-          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(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(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(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 0 */
-  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];
-  sprintf(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];
-  sprintf(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_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;
-
-  unsigned long val= strtoul(ptr, &end, 10); /* flags */
-  verify(ptr != end);
-  verify(val == 0);
-  verify(end != NULL);
-  val= strtoul(end, &end, 10); /* size */
-  verify(ptr != end);
-  verify(val == datasize);
-  verify(end != NULL);
-  while (*end != '\n' && isspace(*end))
-    ++end;
-  verify(*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));
-  sprintf(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;
-
-  unsigned long val= strtoul(ptr, &end, 10); /* flags */
-  verify(ptr != end);
-  verify(val == 0);
-  verify(end != NULL);
-  val= strtoul(end, &end, 10); /* size */
-  verify(ptr != end);
-  verify(val == datasize);
-  verify(end != NULL);
-  *cas= strtoul(end, &end, 10); /* cas */
-  verify(ptr != end);
-  verify(val == datasize);
-  verify(end != NULL);
-
-  while (*end != '\n' && isspace(*end))
-    ++end;
-  verify(*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));
-  sprintf(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);
-  sprintf(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];
-  sprintf(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));
-
-  sprintf(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];
-  sprintf(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)
-{
-  execute(ascii_set_item("test_ascii_mget1", "value"));
-  execute(ascii_set_item("test_ascii_mget2", "value"));
-  execute(ascii_set_item("test_ascii_mget3", "value"));
-  execute(ascii_set_item("test_ascii_mget4", "value"));
-  execute(ascii_set_item("test_ascii_mget5", "value"));
-
-  execute(send_string("get test_ascii_mget1 test_ascii_mget2 test_ascii_mget3 "
-                      "test_ascii_mget4 test_ascii_mget5 "
-                      "test_ascii_mget6\r\n"));
-  execute(ascii_get_value("test_ascii_mget1", "value"));
-  execute(ascii_get_value("test_ascii_mget2", "value"));
-  execute(ascii_get_value("test_ascii_mget3", "value"));
-  execute(ascii_get_value("test_ascii_mget4", "value"));
-  execute(ascii_get_value("test_ascii_mget5", "value"));
-
-  char buffer[5];
-  execute(retry_read(buffer, 5));
-  verify(memcmp(buffer, "END\r\n", 5) == 0);
- return TEST_PASS;
-}
-
-static enum test_return test_ascii_incr_impl(const char* key, bool noreply)
-{
-  char cmd[300];
-  sprintf(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];
-  sprintf(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];
-  sprintf(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));
-
-  sprintf(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}
-};
-
-int main(int argc, char **argv)
-{
-  static const char * const status_msg[]= {"[skip]", "[pass]", "[pass]", "[FAIL]"};
-  int total= 0;
-  int failed= 0;
-  const char *hostname= "localhost";
-  const char *port= "11211";
-  int cmd;
-  bool prompt= false;
-  const char *testname= NULL;
-
-  while ((cmd= getopt(argc, argv, "t:vch:p:PT:?")) != EOF)
-  {
-    switch (cmd) {
-    case 't':
-      timeout= atoi(optarg);
-      if (timeout == 0)
-      {
-        fprintf(stderr, "Invalid timeout. Please specify a number for -t\n");
-        return 1;
-      }
-      break;
-    case 'v': verbose= true;
-      break;
-    case 'c': do_core= true;
-      break;
-    case 'h': hostname= optarg;
-      break;
-    case 'p': port= optarg;
-      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",
-              argv[0]);
-      return 1;
-    }
-  }
-
-  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 1;
-  }
-
-  for (int ii= 0; testcases[ii].description != NULL; ++ii)
-  {
-    if (testname != NULL && strcmp(testcases[ii].description, testname) != 0)
-       continue;
-
-    ++total;
-    fprintf(stdout, "%-40s", testcases[ii].description);
-    fflush(stdout);
-
-    if (prompt)
-    {
-      fprintf(stdout, "\nPress <return> 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(0);
-      }
-
-      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;
-
-    fprintf(stderr, "%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 1;
-      }
-    }
-  }
-
-  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) ? 0 : 1;
-}
@@ -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 <mem_config.h>
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include "poll/poll.h"
+#endif
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctype.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <pthread.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include "libmemcached/socket.hpp"
+#include "libmemcached/memcached/protocol_binary.h"
+#include "libmemcached/byteorder.h"
+#include "clients/utilities.h"
+
+#include <vector>
+
+#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<const char *>(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<char*>(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<char *> 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 <return> 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;
+}
@@ -1,242 +0,0 @@
-/* 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:
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <libmemcached/memcached.h>
-
-#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[])
-{
-  memcached_st *memc;
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  memcached_return_t rc;
-  memcached_server_st *servers;
-
-  int return_code= 0;
-
-  options_parse(argc, argv);
-  initialize_sockets();
-
-  if (!opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-      opt_servers= strdup(temp);
-    else
-    {
-      fprintf(stderr, "No Servers provided\n");
-      exit(1);
-    }
-  }
-
-  memc= memcached_create(NULL);
-  process_hash_option(memc, opt_hash);
-
-  servers= memcached_servers_parse(opt_servers);
-
-  memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
-                         (uint64_t)opt_binary);
-
-  if (!initialize_sasl(memc, opt_username, opt_passwd))
-  {
-    memcached_free(memc);
-    return 1;
-  }
-
-  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)
-          printf("key: %s\nflags: ", argv[optind]);
-        printf("%x\n", flags);
-      }
-      else
-      {
-        if (opt_verbose)
-        {
-          printf("key: %s\nflags: %x\nlength: %zu\nvalue: ",
-                 argv[optind], flags, string_length);
-        }
-
-        if (opt_file)
-        {
-          FILE *fp;
-          size_t written;
-
-          fp= fopen(opt_file, "w");
-          if (!fp)
-          {
-            perror("fopen");
-            return_code= -1;
-            break;
-          }
-
-          written= fwrite(string, 1, string_length, fp);
-          if (written != string_length) 
-          {
-            fprintf(stderr, "error writing file (written %zu, should be %zu)\n", written, string_length);
-            return_code= -1;
-            break;
-          }
-
-          if (fclose(fp))
-          {
-            fprintf(stderr, "error closing file\n");
-            return_code= -1;
-            break;
-          }
-        }
-        else
-        {
-            printf("%.*s\n", (int)string_length, string);
-        }
-        free(string);
-      }
-    }
-    else if (rc != MEMCACHED_NOTFOUND)
-    {
-      fprintf(stderr, "memcat: %s: memcache error %s",
-              argv[optind], memcached_strerror(memc, rc));
-      if (memc->cached_errno)
-      {
-	fprintf(stderr, " system error %s", strerror(memc->cached_errno));
-      }
-      fprintf(stderr, "\n");
-
-      return_code= -1;
-      break;
-    }
-    else // Unknown Issue
-    {
-      fprintf(stderr, "memcat: %s not found\n", argv[optind]);
-      return_code= -1;
-    }
-    optind++;
-  }
-
-  memcached_free(memc);
-
-  if (opt_servers)
-    free(opt_servers);
-  if (opt_hash)
-    free(opt_hash);
-
-  shutdown_sasl();
-
-  return return_code;
-}
-
-
-void options_parse(int argc, char *argv[])
-{
-  int option_index= 0;
-  int option_rv;
-
-  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)"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)
-  {
-    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 '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <mem_config.h>
+
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+#include <libmemcached-1.0/memcached.h>
+
+#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();
+    }
+  }
+}
@@ -1,317 +0,0 @@
-/* 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:
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <strings.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <limits.h>
-
-
-#include <libmemcached/memcached.h>
-
-#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 int opt_binary=0;
-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 && (val == LONG_MAX || val == LONG_MIN))
-      || (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[])
-{
-  memcached_st *memc;
-  memcached_return_t rc;
-  memcached_server_st *servers;
-
-  int return_code= 0;
-
-  options_parse(argc, argv);
-  initialize_sockets();
-
-  memc= memcached_create(NULL);
-  process_hash_option(memc, opt_hash);
-
-  if (!opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-    {
-      opt_servers= strdup(temp);
-    }
-    else
-    {
-      fprintf(stderr, "No Servers provided\n");
-      exit(1);
-    }
-  }
-
-  if (opt_servers)
-    servers= memcached_servers_parse(opt_servers);
-  else
-    servers= memcached_servers_parse(argv[--argc]);
-
-  memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
-                         (uint64_t)opt_binary);
-  if (!initialize_sasl(memc, opt_username, opt_passwd))
-  {
-    memcached_free(memc);
-    return 1;
-  }
-
-  while (optind < argc)
-  {
-    struct stat sbuf;
-    int fd;
-    char *ptr;
-    ssize_t read_length;
-    char *file_buffer_ptr;
-
-    fd= open(argv[optind], O_RDONLY);
-    if (fd < 0)
-    {
-      fprintf(stderr, "memcp: %s: %s\n", argv[optind], strerror(errno));
-      optind++;
-      continue;
-    }
-
-    (void)fstat(fd, &sbuf);
-
-    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: %zu\n"
-	     "key: %s\nflags: %x\nexpires: %llu\n",
-	     opstr[opt_method - OPT_SET], argv[optind], (size_t)sbuf.st_size,
-	     ptr, opt_flags, (unsigned long long)opt_expires);
-    }
-
-    if ((file_buffer_ptr= (char *)malloc(sizeof(char) * (size_t)sbuf.st_size)) == NULL)
-    {
-      fprintf(stderr, "malloc: %s\n", strerror(errno));
-      exit(1);
-    }
-
-    if ((read_length= read(fd, file_buffer_ptr, (size_t)sbuf.st_size)) == -1)
-    {
-      fprintf(stderr, "read: %s\n", strerror(errno));
-      exit(1);
-    }
-
-    if (read_length != sbuf.st_size)
-    {
-      fprintf(stderr, "Failure reading from file\n");
-      exit(1);
-    }
-
-    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 (rc != MEMCACHED_SUCCESS)
-    {
-      fprintf(stderr, "memcp: %s: memcache error %s",
-	      ptr, memcached_strerror(memc, rc));
-      if (memc->cached_errno)
-	fprintf(stderr, " system error %s", strerror(memc->cached_errno));
-      fprintf(stderr, "\n");
-
-      return_code= -1;
-    }
-
-    free(file_buffer_ptr);
-    close(fd);
-    optind++;
-  }
-
-  memcached_free(memc);
-
-  if (opt_servers)
-    free(opt_servers);
-  if (opt_hash)
-    free(opt_hash);
-  shutdown_sasl();
-
-  return return_code;
-}
-
-static void options_parse(int argc, char *argv[])
-{
-  int option_index= 0;
-  int option_rv;
-
-  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)"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},
-    };
-
-  while (1)
-  {
-    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_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, 16, &strtol_error);
-        if (strtol_error == true)
-        {
-          fprintf(stderr, "Bad value passed via --flag\n");
-          exit(1);
-        }
-      }
-    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 '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <cerrno>
+#include <climits>
+#include <cstdio>
+#include <cstdlib>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
+#include <getopt.h>
+#include <iostream>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/types.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+
+#include <libmemcached-1.0/memcached.h>
+
+#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);
+  }
+}
@@ -1,182 +0,0 @@
-/* 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:
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <strings.h>
-#include <string.h>
-
-#include <libmemcached/memcached.h>
-
-#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 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;
-
-/* Print the keys and counter how many were found */
-static memcached_return_t key_printer(const memcached_st *ptr __attribute__((unused)),
-                                      const char *key, size_t key_length,
-                                      void *context __attribute__((unused)))
-{
-  printf("%.*s\n", (uint32_t)key_length, key);
-
-  return MEMCACHED_SUCCESS;
-}
-
-int main(int argc, char *argv[])
-{
-  memcached_st *memc;
-  memcached_return_t rc;
-  memcached_server_st *servers;
-  memcached_dump_fn callbacks[1];
-
-  callbacks[0]= &key_printer;
-
-  options_parse(argc, argv);
-
-  memc= memcached_create(NULL);
-  process_hash_option(memc, opt_hash);
-
-  if (!opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-      opt_servers= strdup(temp);
-    else
-    {
-      fprintf(stderr, "No Servers provided\n");
-      exit(1);
-    }
-  }
-
-  if (opt_servers)
-    servers= memcached_servers_parse(opt_servers);
-  else
-    servers= memcached_servers_parse(argv[--argc]);
-
-  memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
-                         (uint64_t)opt_binary);
-  if (!initialize_sasl(memc, opt_username, opt_passwd))
-  {
-    memcached_free(memc);
-    return 1;
-  }
-
-  rc= memcached_dump(memc, callbacks, NULL, 1);
-
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    fprintf(stderr, "memdump: memcache error %s", memcached_strerror(memc, rc));
-    if (memc->cached_errno)
-      fprintf(stderr, " system error %s", strerror(memc->cached_errno));
-    fprintf(stderr, "\n");
-  }
-
-  memcached_free(memc);
-
-  if (opt_servers)
-    free(opt_servers);
-  if (opt_hash)
-    free(opt_hash);
-
-  shutdown_sasl();
-
-  return 0;
-}
-
-static void options_parse(int argc, char *argv[])
-{
-  int option_index= 0;
-  int option_rv;
-
-  static struct option long_options[]=
-    {
-      {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION},
-      {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP},
-      {(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}
-    };
-
-  while (1)
-  {
-    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, NULL);
-      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 '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
+#include <getopt.h>
+#include <inttypes.h>
+#include <iostream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#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);
+  }
+}
@@ -1,102 +0,0 @@
-/* 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:
- *
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <inttypes.h>
-#include <string.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <stdlib.h>
-#include <libmemcached/memcached.h>
-
-#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[]);
-
-static int opt_verbose= 0;
-
-int main(int argc, char *argv[])
-{
-  unsigned long value;
-  options_parse(argc, argv);
-
-  if (argc != 2)
-    return 1;
-
-  value= strtoul(argv[1], (char **) NULL, 10);
-
-  if (value < MEMCACHED_MAXIMUM_RETURN)
-  {
-    printf("%s\n", memcached_strerror(NULL, (memcached_return_t)value));
-  }
-  else
-  {
-    fprintf(stderr, "Unknown Error Code\n");
-    return 1;
-  }
-
-  return 0;
-}
-
-
-void options_parse(int argc, char *argv[])
-{
-  int option_index= 0;
-  int option_rv;
-
-  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)"verbose", no_argument, &opt_verbose, OPT_VERBOSE},
-      {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG},
-      {0, 0, 0, 0},
-    };
-
-  while (1) 
-  {
-    option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index);
-    if (option_rv == -1) break;
-    switch (option_rv)
-    {
-    case 0:
-      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 '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <climits>
+
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#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);
+  }
+}
@@ -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 <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+#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);
+  }
+}
@@ -1,154 +0,0 @@
-/* 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:
- *
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <getopt.h>
-#include <libmemcached/memcached.h>
-#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[])
-{
-  memcached_st *memc;
-  memcached_return_t rc;
-  memcached_server_st *servers;
-
-  options_parse(argc, argv);
-
-  if (!opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-      opt_servers= strdup(temp);
-    else
-    {
-      fprintf(stderr, "No Servers provided\n");
-      exit(1);
-    }
-  }
-
-  memc= memcached_create(NULL);
-
-  servers= memcached_servers_parse(opt_servers);
-  memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
-                         (uint64_t) opt_binary);
-
-  if (!initialize_sasl(memc, opt_username, opt_passwd))
-  {
-    memcached_free(memc);
-    return 1;
-  }
-
-  rc = memcached_flush(memc, opt_expire);
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    fprintf(stderr, "memflush: memcache error %s",
-	    memcached_strerror(memc, rc));
-    if (memc->cached_errno)
-      fprintf(stderr, " system error %s", strerror(memc->cached_errno));
-    fprintf(stderr, "\n");
-  }
-
-  memcached_free(memc);
-
-  free(opt_servers);
-
-  shutdown_sasl();
-
-  return 0;
-}
-
-
-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)"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},
-  };
-  int option_index= 0;
-  int option_rv;
-
-  while (1)
-  {
-    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_EXPIRE: /* --expire */
-      opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10);
-      break;
-    case OPT_USERNAME:
-      opt_username= optarg;
-      break;
-    case OPT_PASSWD:
-      opt_passwd= optarg;
-      break;
-    case '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+#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 == 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);
+  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);
+  }
+}
@@ -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 <mem_config.h>
+
+#include <cstdio>
+#include <cstring>
+#include <iostream>
+
+#include <libmemcached-1.0/memcached.h>
+
+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;
+}
@@ -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 <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+#include "client_options.h"
+#include "utilities.h"
+
+#include <iostream>
+
+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);
+  }
+}
@@ -1,176 +0,0 @@
-/* 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:
- *
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <libmemcached/memcached.h>
-#include <string.h>
-#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[])
-{
-  memcached_st *memc;
-  memcached_return_t rc;
-  memcached_server_st *servers;
-
-  int return_code= 0;
-
-  options_parse(argc, argv);
-  initialize_sockets();
-
-  if (!opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-      opt_servers= strdup(temp);
-    else
-    {
-      fprintf(stderr, "No Servers provided\n");
-      exit(1);
-    }
-  }
-
-  memc= memcached_create(NULL);
-  process_hash_option(memc, opt_hash);
-
-  servers= memcached_servers_parse(opt_servers);
-  memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL,
-                         (uint64_t) opt_binary);
-
-  if (!initialize_sasl(memc, opt_username, opt_passwd))
-  {
-    memcached_free(memc);
-    return 1;
-  }
-
-  while (optind < argc)
-  {
-    if (opt_verbose)
-      printf("key: %s\nexpires: %llu\n", argv[optind], (unsigned long long)opt_expire);
-    rc = memcached_delete(memc, argv[optind], strlen(argv[optind]), opt_expire);
-
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      fprintf(stderr, "memrm: %s: memcache error %s",
-	      argv[optind], memcached_strerror(memc, rc));
-      if (memc->cached_errno)
-	fprintf(stderr, " system error %s", strerror(memc->cached_errno));
-      fprintf(stderr, "\n");
-
-      return_code= -1;
-    }
-
-    optind++;
-  }
-
-  memcached_free(memc);
-
-  if (opt_servers)
-    free(opt_servers);
-  if (opt_hash)
-    free(opt_hash);
-
-  shutdown_sasl();
-
-  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)"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},
-  };
-  int option_index= 0;
-  int option_rv;
-
-  while (1)
-  {
-    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_EXPIRE: /* --expire */
-      opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10);
-      break;
-    case OPT_HASH:
-      opt_hash= strdup(optarg);
-      break;
-    case OPT_USERNAME:
-      opt_username= optarg;
-      break;
-    case OPT_PASSWD:
-      opt_passwd= optarg;
-      break;
-    case '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+#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);
+  }
+}
@@ -1,883 +0,0 @@
-/*
- *  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 <mingqiangzhuang@hengtiansoft.com>
- *
- */
-#include "config.h"
-
-#include <stdlib.h>
-#include <getopt.h>
-#include <limits.h>
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#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);
-void ms_help_command(const char *command_name, const char *description);
-
-
-/* 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 */
-
-
-/**
- * output the help information
- *
- * @param command_name, the string of this process
- * @param description, description of this process
- * @param long_options, global options array
- */
-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 */
-
-
-/* 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';
-  ret= strtoll(optarg, (char **)NULL, 10);
-
-  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 */
-      ms_setting.nconns= (uint32_t)strtoul(optarg, (char **) NULL, 10);
-      if (ms_setting.nconns <= 0)
-      {
-        fprintf(stderr, "Concurrency must be greater than 0.:-)\n");
-        exit(1);
-      }
-      break;
-
-    case OPT_EXECUTE_NUMBER:        /* --execute_number or -x */
-      ms_setting.exec_num= (int)strtol(optarg, (char **) NULL, 10);
-      if (ms_setting.exec_num <= 0)
-      {
-        fprintf(stderr, "Execute number must be greater than 0.:-)\n");
-        exit(1);
-      }
-      break;
-
-    case OPT_THREAD_NUMBER:     /* --threads or -T */
-      ms_setting.nthreads= (uint32_t)strtoul(optarg, (char **) NULL, 10);
-      if (ms_setting.nthreads <= 0)
-      {
-        fprintf(stderr, "Threads number must be greater than 0.:-)\n");
-        exit(1);
-      }
-      break;
-
-    case OPT_FIXED_LTH:         /* --fixed_size or -X */
-      ms_setting.fixed_value_size= (size_t)strtoull(optarg, (char **) NULL, 10);
-      if ((ms_setting.fixed_value_size <= 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 */
-      ms_setting.mult_key_num= (int)strtol(optarg, (char **) NULL, 10);
-      if (ms_setting.mult_key_num <= 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 */
-      ms_setting.sock_per_conn= (uint32_t)strtoul(optarg, (char **) NULL, 10);
-      if (ms_setting.sock_per_conn <= 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 */
-      ms_setting.rep_write_srv= (uint32_t)strtoul(optarg, (char **) NULL, 10);
-      if (ms_setting.rep_write_srv <= 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 0;
-} /* 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+= sprintf(pos, "cmd_get: %zu\n",
-                ms_stats.cmd_get);
-  pos+= sprintf(pos, "cmd_set: %zu\n",
-                ms_stats.cmd_set);
-  pos+= sprintf(pos, "get_misses: %zu\n",
-                ms_stats.get_misses);
-
-  if (ms_setting.verify_percent > 0)
-  {
-    pos+= sprintf(pos, "verify_misses: %zu\n",
-                  ms_stats.vef_miss);
-    pos+= sprintf(pos, "verify_failed: %zu\n",
-                  ms_stats.vef_failed);
-  }
-
-  if (ms_setting.exp_ver_per > 0)
-  {
-    pos+= sprintf(pos, "expired_get: %zu\n",
-                  ms_stats.exp_get);
-    pos+= sprintf(pos, "unexpired_unget: %zu\n",
-                  ms_stats.unexp_unget);
-  }
-
-  pos+= sprintf(pos,
-                "written_bytes: %zu\n",
-                ms_stats.bytes_written);
-  pos+= sprintf(pos, "read_bytes: %zu\n",
-                ms_stats.bytes_read);
-  pos+= sprintf(pos, "object_bytes: %zu\n",
-                ms_stats.obj_bytes);
-
-  if (ms_setting.udp || ms_setting.facebook_test)
-  {
-    pos+= sprintf(pos, "packet_disorder: %zu\n",
-                  ms_stats.pkt_disorder);
-    pos+= sprintf(pos, "packet_drop: %zu\n",
-                  ms_stats.pkt_drop);
-    pos+= sprintf(pos, "udp_timeout: %zu\n",
-                  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+= sprintf(
-    pos,
-    "\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));
-
-  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()
-{
-  int second= 0;
-  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)
-  {
-    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 0;
-} /* main */
@@ -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 <mem_config.h>
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
+#include <getopt.h>
+#include <memory>
+#include <pthread.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <iostream>
+
+#include <libmemcached-1.0/memcached.h>
+
+#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<char **>(calloc(actual_loaded, sizeof(char*)));
+  size_t *key_lengths= static_cast<size_t *>(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;
+}
@@ -1,351 +0,0 @@
-/* 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:
- *
- * Authors: 
- *          Brian Aker
- *          Toru Maesaka
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <string.h>
-#include <getopt.h>
-#include <sys/time.h>
-
-#include <libmemcached/memcached.h>
-
-#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 int opt_verbose= 0;
-static int opt_displayflag= 0;
-static int opt_analyze= 0;
-static char *opt_servers= NULL;
-static char *stat_args= NULL;
-static char *analyze_mode= NULL;
-
-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)"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)"analyze", optional_argument, NULL, OPT_ANALYZE},
-  {0, 0, 0, 0},
-};
-
-
-static memcached_return_t stat_printer(memcached_server_instance_st instance,
-                                       const char *key, size_t key_length,
-                                       const char *value, size_t value_length,
-                                       void *context)
-{
-  static memcached_server_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;
-}
-
-int main(int argc, char *argv[])
-{
-  memcached_return_t rc;
-  memcached_st *memc;
-  memcached_server_st *servers;
-
-  options_parse(argc, argv);
-  initialize_sockets();
-
-  if (! opt_servers)
-  {
-    char *temp;
-
-    if ((temp= getenv("MEMCACHED_SERVERS")))
-      opt_servers= strdup(temp);
-    else
-    {
-      fprintf(stderr, "No Servers provided\n\n");
-      help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, 0);
-      exit(1);
-    }
-  }
-
-  memc= memcached_create(NULL);
-
-  servers= memcached_servers_parse(opt_servers);
-  rc= memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-
-  if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_SOME_ERRORS)
-  {
-    printf("Failure to communicate with servers (%s)\n",
-           memcached_strerror(memc, rc));
-    exit(1);
-  }
-
-  if (opt_analyze)
-  {
-    memcached_stat_st *memc_stat;
-
-    memc_stat= memcached_stat(memc, NULL, &rc);
-
-    if (! memc_stat)
-      exit(-1);
-
-    run_analyzer(memc, memc_stat);
-
-    memcached_stat_free(memc, memc_stat);
-  }
-  else
-  {
-    rc= memcached_stat_execute(memc, stat_args, stat_printer, NULL);
-  }
-
-  free(opt_servers);
-
-  memcached_free(memc);
-
-  return rc == MEMCACHED_SUCCESS ? 0: -1;
-}
-
-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)
-  {
-    memcached_st **servers;
-    uint32_t flags, server_count= memcached_server_count(memc);
-    uint32_t num_of_tests= 32;
-    const char *test_key= "libmemcached_test_key";
-
-    servers= malloc(sizeof(memcached_st*) * server_count);
-    if (!servers)
-    {
-      fprintf(stderr, "Failed to allocate memory\n");
-      return;
-    }
-
-    for (uint32_t x= 0; x < server_count; x++)
-    {
-      memcached_server_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++)
-    {
-      memcached_server_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 && 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)
-    {
-      memcached_server_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);
-  memcached_server_instance_st most_consumed_server= memcached_server_instance_by_position(memc, report->most_consumed_server);
-  memcached_server_instance_st least_free_server= memcached_server_instance_by_position(memc, report->least_free_server);
-  memcached_server_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;
-  int option_rv;
-
-  while (1) 
-  {
-    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 = 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_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 '?':
-      /* getopt_long already printed an error message. */
-      exit(1);
-    default:
-      abort();
-    }
-  }
-}
@@ -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 <mem_config.h>
+
+#include <cstdio>
+#include <cstring>
+#include <ctime>
+#include <iostream>
+#include <fcntl.h>
+#include <getopt.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/types.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#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<memcached_st**>(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);
+  }
+}
@@ -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 <mem_config.h>
+
+#include <cerrno>
+#include <cstdio>
+#include <cstring>
+#include <getopt.h>
+#include <iostream>
+#include <unistd.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#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);
+  }
+}
@@ -27,7 +27,7 @@
 #  define  atomic_dec_size_nv(X, Y) atomic_add_32((X), (Y))
 # endif
 # undef _KERNEL
-#else
+#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))
@@ -45,6 +45,25 @@
 # 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 */
@@ -9,7 +9,7 @@
  *
  */
 
-#include "config.h"
+#include "mem_config.h"
 
 #include <stdio.h>
 #include <inttypes.h>
@@ -18,17 +18,17 @@
 #include <event.h>
 #include <fcntl.h>
 #include <netinet/tcp.h>
+#include <netinet/in.h>
 #include <arpa/inet.h>
-#if TIME_WITH_SYS_TIME
+
+#if defined(HAVE_SYS_TIME_H)
 # include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
 # include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+
 #include "ms_setting.h"
 #include "ms_thread.h"
 #include "ms_atomic.h"
@@ -223,7 +223,7 @@ static void ms_task_init(ms_conn_t *c)
  * @param c, pointer of the concurrency
  * @param is_udp, whether it's udp
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_conn_udp_init(ms_conn_t *c, const bool is_udp)
 {
@@ -259,7 +259,7 @@ static int ms_conn_udp_init(ms_conn_t *c, const bool is_udp)
     memset(c->udppkt, 0, MAX_UDP_PACKET * sizeof(ms_udppkt_t));
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_conn_udp_init */
 
 
@@ -271,7 +271,7 @@ static int ms_conn_udp_init(ms_conn_t *c, const bool is_udp)
  * @param read_buffer_size
  * @param is_udp, whether it's udp
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_conn_init(ms_conn_t *c,
                         const int init_state,
@@ -357,7 +357,7 @@ static int ms_conn_init(ms_conn_t *c,
   c->mlget_task.mlget_num= 0;
   c->mlget_task.value_index= -1;         /* default invalid value */
 
-  if (ms_setting.binary_prot)
+  if (ms_setting.binary_prot_)
   {
     c->protocol= binary_prot;
   }
@@ -380,7 +380,7 @@ static int ms_conn_init(ms_conn_t *c,
     atomic_add_32(&ms_stats.active_conns, 1);
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_conn_init */
 
 
@@ -413,7 +413,7 @@ static void ms_warmup_num_init(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_item_win_init(ms_conn_t *c)
 {
@@ -457,7 +457,7 @@ static int ms_item_win_init(ms_conn_t *c)
 
   ms_warmup_num_init(c);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_item_win_init */
 
 
@@ -468,7 +468,7 @@ static int ms_item_win_init(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_conn_sock_init(ms_conn_t *c)
 {
@@ -552,7 +552,7 @@ static int ms_conn_sock_init(ms_conn_t *c)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_conn_sock_init */
 
 
@@ -562,7 +562,7 @@ static int ms_conn_sock_init(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_conn_event_init(ms_conn_t *c)
 {
@@ -578,7 +578,7 @@ static int ms_conn_event_init(ms_conn_t *c)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_conn_event_init */
 
 
@@ -588,7 +588,7 @@ static int ms_conn_event_init(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_setup_conn(ms_conn_t *c)
 {
@@ -612,7 +612,7 @@ int ms_setup_conn(ms_conn_t *c)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_setup_conn */
 
 
@@ -706,7 +706,7 @@ static void ms_conn_close(ms_conn_t *c)
  *
  * @param ai, server address information
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_new_socket(struct addrinfo *ai)
 {
@@ -758,6 +758,7 @@ static void ms_maximize_sndbuf(const int sfd)
       max= avg - 1;
     }
   }
+  (void)last_good;
 } /* ms_maximize_sndbuf */
 
 
@@ -770,7 +771,7 @@ static void ms_maximize_sndbuf(const int sfd)
  * @param is_udp, whether it's udp
  * @param ret_sfd, the connected socket file descriptor
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_network_connect(ms_conn_t *c,
                               char *srv_host_name,
@@ -893,7 +894,7 @@ static int ms_network_connect(ms_conn_t *c,
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_reconn(ms_conn_t *c)
 {
@@ -983,7 +984,7 @@ static int ms_reconn(ms_conn_t *c)
     c->alive_sfds--;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_reconn */
 
 
@@ -995,7 +996,7 @@ static int ms_reconn(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_reconn_socks(ms_conn_t *c)
 {
@@ -1009,7 +1010,7 @@ int ms_reconn_socks(ms_conn_t *c)
 
   if ((c->total_sfds == 1) || (c->total_sfds == c->alive_sfds))
   {
-    return 0;
+    return EXIT_SUCCESS;
   }
 
   for (uint32_t i= 0; i < c->total_sfds; i++)
@@ -1064,7 +1065,7 @@ int ms_reconn_socks(ms_conn_t *c)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_reconn_socks */
 
 
@@ -1136,7 +1137,7 @@ static int ms_tokenize_command(char *command,
  * @param c, pointer of the concurrency
  * @param command, the string responded by server
  *
- * @return int, if the command completed return 0, else return
+ * @return int, if the command completed return EXIT_SUCCESS, else return
  *         -1
  */
 static int ms_ascii_process_line(ms_conn_t *c, char *command)
@@ -1159,7 +1160,12 @@ static int ms_ascii_process_line(ms_conn_t *c, char *command)
     {
       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;
 
       /*
@@ -1311,7 +1317,7 @@ void ms_reset_conn(ms_conn_t *c, bool timeout)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_try_read_line(ms_conn_t *c)
 {
@@ -1321,7 +1327,7 @@ static int ms_try_read_line(ms_conn_t *c)
     if ((uint64_t)c->rbytes < sizeof(c->binary_header))
     {
       /* need more data! */
-      return 0;
+      return EXIT_SUCCESS;
     }
     else
     {
@@ -1351,7 +1357,7 @@ static int ms_try_read_line(ms_conn_t *c)
         fprintf(stderr, "Invalid magic:  %x\n",
                 c->binary_header.response.magic);
         ms_conn_set_state(c, conn_closing);
-        return 0;
+        return EXIT_SUCCESS;
       }
 
       /* process this complete response */
@@ -1376,11 +1382,11 @@ static int ms_try_read_line(ms_conn_t *c)
     assert(c->rcurr <= (c->rbuf + c->rsize));
 
     if (c->rbytes == 0)
-      return 0;
+      return EXIT_SUCCESS;
 
     el= memchr(c->rcurr, '\n', (size_t)c->rbytes);
     if (! el)
-      return 0;
+      return EXIT_SUCCESS;
 
     cont= el + 1;
     if (((el - c->rcurr) > 1) && (*(el - 1) == '\r'))
@@ -1543,6 +1549,7 @@ static int ms_sort_udp_packet(ms_conn_t *c, char *buf, int rbytes)
       break;
     }
   }
+  (void)packets;
 
   return wbytes == 0 ? -1 : wbytes;
 } /* ms_sort_udp_packet */
@@ -1634,7 +1641,7 @@ static int ms_udp_read(ms_conn_t *c, char *buf, int len)
  * close.
  * before reading, move the remaining incomplete fragment of a command
  * (if any) to the beginning of the buffer.
- * return 0 if there's nothing to read on the first read.
+ * return EXIT_SUCCESS if there's nothing to read on the first read.
  */
 
 /**
@@ -1645,8 +1652,8 @@ static int ms_udp_read(ms_conn_t *c, char *buf, int len)
  * @param c, pointer of the concurrency
  *
  * @return int,
- *         return 0 if there's nothing to read on the first read.
- *         return 1 if get data
+ *         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)
@@ -2012,7 +2019,7 @@ static void ms_complete_nread(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_add_msghdr(ms_conn_t *c)
 {
@@ -2056,7 +2063,7 @@ static int ms_add_msghdr(ms_conn_t *c)
     return ms_add_iov(c, NULL, UDP_HEADER_SIZE);
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_add_msghdr */
 
 
@@ -2066,7 +2073,7 @@ static int ms_add_msghdr(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_ensure_iov_space(ms_conn_t *c)
 {
@@ -2093,7 +2100,7 @@ static int ms_ensure_iov_space(ms_conn_t *c)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_ensure_iov_space */
 
 
@@ -2105,7 +2112,7 @@ static int ms_ensure_iov_space(ms_conn_t *c)
  * @param buf, the buffer includes data to send
  * @param len, the data length in the buffer
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_add_iov(ms_conn_t *c, const void *buf, int len)
 {
@@ -2124,6 +2131,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len)
      */
     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)))
@@ -2131,6 +2139,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len)
       ms_add_msghdr(c);
       m= &c->msglist[c->msgused - 1];
     }
+#endif
 
     if (ms_ensure_iov_space(c) != 0)
       return -1;
@@ -2159,7 +2168,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len)
   }
   while (leftover > 0);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_add_iov */
 
 
@@ -2168,7 +2177,7 @@ static int ms_add_iov(ms_conn_t *c, const void *buf, int len)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_build_udp_headers(ms_conn_t *c)
 {
@@ -2219,7 +2228,7 @@ static int ms_build_udp_headers(ms_conn_t *c)
             + UDP_HEADER_SIZE));
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_udp_headers */
 
 
@@ -2464,9 +2473,7 @@ static bool ms_need_yield(ms_conn_t *c)
   {
     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));
+    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)
@@ -2724,7 +2731,7 @@ void ms_event_handler(const int fd, const short which, void *arg)
  * @param c, pointer of the concurrency
  * @param cmd, command(get or set )
  *
- * @return int, if success, return the index, else return 0
+ * @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)
 {
@@ -2733,7 +2740,7 @@ static uint32_t ms_get_rep_sock_index(ms_conn_t *c, int cmd)
 
   if (c->total_sfds == 1)
   {
-    return 0;
+    return EXIT_SUCCESS;
   }
 
   if (ms_setting.rep_write_srv == 0)
@@ -2802,7 +2809,7 @@ static uint32_t ms_get_next_sock_index(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_update_conn_sock_event(ms_conn_t *c)
 {
@@ -2866,7 +2873,7 @@ static int ms_update_conn_sock_event(ms_conn_t *c)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_update_conn_sock_event */
 
 
@@ -2878,7 +2885,7 @@ static int ms_update_conn_sock_event(ms_conn_t *c)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @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)
 {
@@ -2886,13 +2893,14 @@ static int ms_build_ascii_write_buf_set(ms_conn_t *c, ms_task_item_t *item)
   int write_len;
   char *buffer= c->wbuf;
 
-  write_len= sprintf(buffer,
-                     " %u %d %d\r\n",
-                     0,
-                     item->exp_time,
-                     item->value_size);
+  write_len= snprintf(buffer,
+                      c->wsize,
+                      " %u %d %d\r\n",
+                      0,
+                      item->exp_time,
+                      item->value_size);
 
-  if (write_len > c->wsize)
+  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");
@@ -2922,7 +2930,7 @@ static int ms_build_ascii_write_buf_set(ms_conn_t *c, ms_task_item_t *item)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_ascii_write_buf_set */
 
 
@@ -2933,7 +2941,7 @@ static int ms_build_ascii_write_buf_set(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item)
 {
@@ -2977,7 +2985,7 @@ int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item)
                   item->key_size + item->value_size);
   atomic_add_size(&ms_stats.cmd_set, 1);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_mcd_set */
 
 
@@ -2989,7 +2997,7 @@ int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @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)
 {
@@ -3004,7 +3012,7 @@ static int ms_build_ascii_write_buf_get(ms_conn_t *c, ms_task_item_t *item)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_ascii_write_buf_get */
 
 
@@ -3015,7 +3023,7 @@ static int ms_build_ascii_write_buf_get(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item)
 {
@@ -3057,7 +3065,7 @@ int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item)
 
   atomic_add_size(&ms_stats.cmd_get, 1);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_mcd_get */
 
 
@@ -3067,7 +3075,7 @@ int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_build_ascii_write_buf_mlget(ms_conn_t *c)
 {
@@ -3098,7 +3106,7 @@ static int ms_build_ascii_write_buf_mlget(ms_conn_t *c)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_ascii_write_buf_mlget */
 
 
@@ -3107,7 +3115,7 @@ static int ms_build_ascii_write_buf_mlget(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_mcd_mlget(ms_conn_t *c)
 {
@@ -3157,7 +3165,9 @@ int ms_mcd_mlget(ms_conn_t *c)
     atomic_add_size(&ms_stats.cmd_get, 1);
   }
 
-  return 0;
+  (void)item;
+
+  return EXIT_SUCCESS;
 } /* ms_mcd_mlget */
 
 
@@ -3170,7 +3180,7 @@ int ms_mcd_mlget(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_bin_process_response(ms_conn_t *c)
 {
@@ -3186,7 +3196,7 @@ static int ms_bin_process_response(ms_conn_t *c)
   {
     c->rvbytes= (int32_t)bodylen;
     c->readval= true;
-    return 1;
+    return EXIT_FAILURE;
   }
   else
   {
@@ -3253,7 +3263,7 @@ static int ms_bin_process_response(ms_conn_t *c)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_bin_process_response */
 
 
@@ -3286,7 +3296,7 @@ static void ms_add_bin_header(ms_conn_t *c,
 
   header->request.extlen= (uint8_t)hdr_len;
   header->request.datatype= (uint8_t)PROTOCOL_BINARY_RAW_BYTES;
-  header->request.reserved= 0;
+  header->request.vbucket= 0;
 
   header->request.bodylen= htonl(body_len);
   header->request.opaque= 0;
@@ -3319,7 +3329,7 @@ static void ms_add_key_to_iov(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @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)
 {
@@ -3351,7 +3361,7 @@ static int ms_build_bin_write_buf_set(ms_conn_t *c, ms_task_item_t *item)
   }
   ms_add_iov(c, &ms_setting.char_block[value_offset], item->value_size);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_bin_write_buf_set */
 
 
@@ -3363,7 +3373,7 @@ static int ms_build_bin_write_buf_set(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @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)
 {
@@ -3373,7 +3383,7 @@ static int ms_build_bin_write_buf_get(ms_conn_t *c, ms_task_item_t *item)
                     (uint32_t)item->key_size);
   ms_add_key_to_iov(c, item);
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_bin_write_buf_get */
 
 
@@ -3385,7 +3395,7 @@ static int ms_build_bin_write_buf_get(ms_conn_t *c, ms_task_item_t *item)
  * @param item, pointer of task item which includes the object
  *            information
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_build_bin_write_buf_mlget(ms_conn_t *c)
 {
@@ -3409,5 +3419,5 @@ static int ms_build_bin_write_buf_mlget(ms_conn_t *c)
 
   c->wcurr= c->wbuf;
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_build_bin_write_buf_mlget */
@@ -60,7 +60,7 @@ enum conn_states
 {
   conn_read,         /* reading in a command line */
   conn_write,        /* writing out a simple response */
-  conn_closing,      /* closing this connection */
+  conn_closing      /* closing this connection */
 };
 
 /* returned states of memcached command */
@@ -78,7 +78,7 @@ enum mcd_ret
   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 */
+  MCD_STAT                         /* response of stats command */
 };
 
 /* used to store the current or previous running command state */
@@ -103,7 +103,7 @@ typedef struct udppkt
 enum protocol
 {
   ascii_prot = 3,           /* ASCII protocol */
-  binary_prot,              /* binary protocol */
+  binary_prot              /* binary protocol */
 };
 
 /**
@@ -55,7 +55,7 @@ typedef enum
   OPT_BINARY_PROTOCOL= 'B',
   OPT_OVERWRITE= 'o',
   OPT_TPS= 'P',
-  OPT_REP_WRITE_SRV= 'p',
+  OPT_REP_WRITE_SRV= 'p'
 } ms_options_t;
 
 /* global statistic of response time */
@@ -9,7 +9,7 @@
  *
  */
 
-#include "config.h"
+#include "mem_config.h"
 
 #include <libmemcached/memcached.h>
 
@@ -195,7 +195,7 @@ static void ms_get_serverlist(char *str)
 /**
  * used to get the CPU count of the current system
  *
- * @return return the cpu count if get, else return 1
+ * @return return the cpu count if get, else return EXIT_FAILURE
  */
 static uint32_t ms_get_cpu_count()
 {
@@ -223,7 +223,7 @@ static uint32_t ms_get_cpu_count()
 #endif
 
   /* the system with one cpu at least */
-  return 1;
+  return EXIT_FAILURE;
 } /* ms_get_cpu_count */
 
 
@@ -262,7 +262,7 @@ ms_conf_type_t ms_get_conf_type(char *line)
  *
  * @param line, string of one line
  *
- * @return if success, return 1, else return 0
+ * @return if success, return EXIT_FAILURE, else return EXIT_SUCCESS
  */
 static int ms_is_line_data(char *line)
 {
@@ -275,9 +275,9 @@ static int ms_is_line_data(char *line)
     begin_ptr++;
   }
   if ((begin_ptr[0] == '\0') || (begin_ptr[0] == '#'))
-    return 0;
+    return EXIT_SUCCESS;
 
-  return 1;
+  return EXIT_FAILURE;
 } /* ms_is_line_data */
 
 
@@ -287,14 +287,14 @@ static int ms_is_line_data(char *line)
  * @param line, string of one line
  * @param nread, length of the line
  *
- * @return if it's EOF or not line data, return 0, else return 1
+ * @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 0;
+    return EXIT_SUCCESS;
 
-  return 1;
+  return EXIT_FAILURE;
 } /* ms_read_is_data */
 
 
@@ -575,7 +575,7 @@ static void ms_calc_avg_size()
  * @param distr, pointer of distribution structure array
  * @param length, length of the array
  *
- * @return always return 0
+ * @return always return EXIT_SUCCESS
  */
 static int ms_shuffle_distr(ms_distr_t *distr, int length)
 {
@@ -614,7 +614,7 @@ static int ms_shuffle_distr(ms_distr_t *distr, int length)
     } /* switch */
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_shuffle_distr */
 
 
@@ -683,7 +683,7 @@ static void ms_build_distr()
         exit(1);
       }
 
-      if (! ms_setting.binary_prot
+      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");
@@ -880,7 +880,7 @@ static void ms_setting_slapmode_init_pre()
   ms_setting.reconnect= false;
   ms_setting.verbose= false;
   ms_setting.facebook_test= false;
-  ms_setting.binary_prot= false;
+  ms_setting.binary_prot_= false;
   ms_setting.stat_freq= 0;
   ms_setting.srv_str= NULL;
   ms_setting.cfg_file= NULL;
@@ -47,7 +47,7 @@ typedef struct token_s
 #define MAX_TOKENS    10
 
 /* server information */
-typedef struct mcd_sever
+typedef struct mcd_server
 {
   char srv_host_name[MCD_HOST_LENGTH];              /* host name of server */
   int srv_port;                                     /* server port */
@@ -88,7 +88,7 @@ typedef enum cmd_type
 {
   CMD_SET,
   CMD_GET,
-  CMD_NULL,
+  CMD_NULL
 } ms_cmd_type_t;
 
 /* types in the configuration file */
@@ -97,7 +97,7 @@ typedef enum conf_type
   CONF_KEY,
   CONF_VALUE,
   CONF_CMD,
-  CONF_NULL,
+  CONF_NULL
 } ms_conf_type_t;
 
 /* information of command distribution */
@@ -153,7 +153,7 @@ typedef struct setting
   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 */
+  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;
@@ -12,7 +12,7 @@
  *  Author Trond Norbye
  */
 
-#include "config.h"
+#include "mem_config.h"
 
 #include <memory.h>
 #include <stdlib.h>
@@ -38,7 +38,9 @@ static void ms_signal_segv(int signum, siginfo_t *info, void *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();
@@ -61,7 +63,7 @@ static void ms_signal_int(int signum, siginfo_t *info, void *ptr)
 /**
  * redirect signal seg
  *
- * @return if success, return 0, else return -1
+ * @return if success, return EXIT_SUCCESS, else return -1
  */
 int ms_setup_sigsegv(void)
 {
@@ -73,7 +75,7 @@ int ms_setup_sigsegv(void)
   if (sigaction(SIGSEGV, &action, NULL) < 0)
   {
     perror("sigaction");
-    return 0;
+    return EXIT_SUCCESS;
   }
 
   return -1;
@@ -83,7 +85,7 @@ int ms_setup_sigsegv(void)
 /**
  * redirect signal pipe
  *
- * @return if success, return 0, else return -1
+ * @return if success, return EXIT_SUCCESS, else return -1
  */
 int ms_setup_sigpipe(void)
 {
@@ -97,7 +99,7 @@ int ms_setup_sigpipe(void)
 /**
  * redirect signal int
  *
- * @return if success, return 0, else return -1
+ * @return if success, return EXIT_SUCCESS, else return -1
  */
 int ms_setup_sigint(void)
 {
@@ -109,7 +111,7 @@ int ms_setup_sigint(void)
   if (sigaction(SIGINT, &action_3, NULL) < 0)
   {
     perror("sigaction");
-    return 0;
+    return EXIT_SUCCESS;
   }
 
   return -1;
@@ -9,7 +9,7 @@
  *
  */
 
-#include "config.h"
+#include "mem_config.h"
 
 #include <inttypes.h>
 #include "ms_stats.h"
@@ -219,10 +219,6 @@ void ms_dump_format_stats(ms_stat_t *stat,
   double global_std= 0;
   double global_log= 0;
 
-  uint64_t diff_time= 0;
-  uint64_t diff_events= 0;
-  double diff_squares= 0;
-  double diff_log_product= 0;
   double period_average= 0;
   uint64_t period_tps= 0;
   double period_rate= 0;
@@ -241,17 +237,17 @@ void ms_dump_format_stats(ms_stat_t *stat,
                     * global_average) / (double)(events - 1));
   global_log= exp(stat->log_product / (double)events);
 
-  diff_time= stat->total_time - stat->pre_total_time;
-  diff_events= events - stat->pre_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;
-    diff_squares= (double)stat->squares - (double)stat->pre_squares;
+    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));
-    diff_log_product= stat->log_product - stat->pre_log_product;
+    double diff_log_product= stat->log_product - stat->pre_log_product;
     period_log= exp(diff_log_product / (double)diff_events);
   }
 
@@ -9,18 +9,14 @@
  *
  */
 
-#include "config.h"
+#include "mem_config.h"
 
-#include <inttypes.h>
-#if TIME_WITH_SYS_TIME
+#if defined(HAVE_SYS_TIME_H)
 # include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
 # include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #include "ms_thread.h"
@@ -1053,7 +1049,7 @@ static void ms_update_task_result(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_run_getset_task(ms_conn_t *c)
 {
@@ -1085,7 +1081,7 @@ static int ms_run_getset_task(ms_conn_t *c)
     return -1;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_run_getset_task */
 
 
@@ -1094,7 +1090,7 @@ static int ms_run_getset_task(ms_conn_t *c)
  *
  * @param c, pointer of the concurrency
  *
- * @return int, if success, return 0, else return -1
+ * @return int, if success, return EXIT_SUCCESS, else return -1
  */
 int ms_exec_task(struct conn *c)
 {
@@ -1110,5 +1106,5 @@ int ms_exec_task(struct conn *c)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_exec_task */
@@ -9,18 +9,16 @@
  *
  */
 
-#include "config.h"
+#include "mem_config.h"
 
-#if TIME_WITH_SYS_TIME
+#if defined(HAVE_SYS_TIME_H)
 # include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
 # include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
+
 #include "ms_thread.h"
 #include "ms_setting.h"
 #include "ms_atomic.h"
@@ -146,7 +144,7 @@ static void ms_clock_handler(const int fd, const short which, void *arg)
  *
  * @param cpu, cpu index
  *
- * @return if success, return 0, else return -1
+ * @return if success, return EXIT_SUCCESS, else return -1
  */
 static uint32_t ms_set_thread_cpu_affinity(uint32_t cpu)
 {
@@ -175,7 +173,7 @@ static uint32_t ms_set_thread_cpu_affinity(uint32_t cpu)
  *
  * @param thread_ctx, pointer of the thread context structure
  *
- * @return if success, return 0, else return -1
+ * @return if success, return EXIT_SUCCESS, else return -1
  */
 static int ms_setup_thread(ms_thread_ctx_t *thread_ctx)
 {
@@ -231,7 +229,7 @@ static int ms_setup_thread(ms_thread_ctx_t *thread_ctx)
     }
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 } /* ms_setup_thread */
 
 
@@ -1,231 +0,0 @@
-/* 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:
- *
- */
-#include "config.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include "utilities.h"
-
-
-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(0);
-}
-
-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_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_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";
-  default: WATCHPOINT_ASSERT(0);
-  };
-
-  WATCHPOINT_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 __attribute__((unused)))
-{
-  unsigned int x;
-
-  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(long_options[x].val)))
-      printf("\t\t%s\n", help_message);
-  }
-
-  printf("\n");
-  exit(0);
-}
-
-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(1);
-  }
-
-  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(1);
-  }
-}
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-static char *username;
-static char *passwd;
-
-static int get_username(void *context, int id, const char **result,
-                        unsigned int *len)
-{
-  (void)context;
-  if (!result || (id != SASL_CB_USER && id != SASL_CB_AUTHNAME))
-    return SASL_BADPARAM;
-
-  *result= username;
-  if (len)
-     *len= (username == NULL) ? 0 : (unsigned int)strlen(username);
-
-  return SASL_OK;
-}
-
-static int get_password(sasl_conn_t *conn, void *context, int id,
-                        sasl_secret_t **psecret)
-{
-  (void)context;
-  static sasl_secret_t* x;
-
-  if (!conn || ! psecret || id != SASL_CB_PASS)
-    return SASL_BADPARAM;
-
-  if (passwd == NULL)
-  {
-     *psecret= NULL;
-     return SASL_OK;
-  }
-
-  size_t len= strlen(passwd);
-  x = realloc(x, sizeof(sasl_secret_t) + len);
-  if (!x)
-    return SASL_NOMEM;
-
-  x->len = len;
-  strcpy((void *)x->data, passwd);
-
-  *psecret = x;
-  return SASL_OK;
-}
-
-/* callbacks we support */
-static sasl_callback_t sasl_callbacks[] = {
-  {
-    SASL_CB_USER, &get_username, NULL
-  }, {
-    SASL_CB_AUTHNAME, &get_username, NULL
-  }, {
-    SASL_CB_PASS, &get_password, NULL
-  }, {
-    SASL_CB_LIST_END, NULL, NULL
-  }
-};
-#endif
-
-bool initialize_sasl(memcached_st *memc, char *user, char *password)
-{
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  if (user != NULL && password != NULL)
-  {
-    username= user;
-    passwd= password;
-
-    if (sasl_client_init(NULL) != SASL_OK)
-    {
-      fprintf(stderr, "Failed to initialize sasl library!\n");
-      return false;
-    }
-    memcached_set_sasl_callbacks(memc, sasl_callbacks);
-  }
-#else
-  (void)memc;
-  (void)user;
-  (void)password;
-#endif
-
-  return true;
-}
-
-void shutdown_sasl(void)
-{
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  if (username != NULL || passwd != NULL)
-    sasl_done();
-#endif
-}
-
-void initialize_sockets(void)
-{
-  /* Define the function for all platforms to avoid #ifdefs in each program */
-#ifdef WIN32
-  WSADATA wsaData;
-  if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0)
-  {
-    fprintf(stderr, "Socket Initialization Error. Program aborted\n");
-    exit(EXIT_FAILURE);
-  }
-#endif
-}
@@ -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 <clients/utilities.h>
+
+#include <cstdio>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+#include <ctype.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+
+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)
+}
@@ -9,22 +9,21 @@
  *
  */
 
+#pragma once
+
 #include <getopt.h>
-#include <libmemcached/memcached.h>
-#include "libmemcached/watchpoint.h"
-#include "client_options.h"
+#include <libmemcached-1.0/memcached.h>
+#include "clients/client_options.h"
 
-#if TIME_WITH_SYS_TIME
+#if defined(HAVE_SYS_TIME_H)
 # include <sys/time.h>
+#endif
+
+#if defined(HAVE_TIME_H)
 # include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
+
 #ifdef __sun
   /* For some odd reason the option struct on solaris defines the argument
    * as char* and not const char*
@@ -41,14 +40,23 @@ 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);
+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);
+                  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
@@ -1,126 +0,0 @@
-#!/bin/sh
-#
-#  Copyright (c) 2006 Jan Kneschke
-#  Copyright (c) 2009 Sun Microsystems
-#  All rights reserved.
-# 
-#  Redistribution and use in source and binary forms, with or without
-#  modification, are permitted provided that the following conditions are met:
-# 
-#  1. Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#  2. Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#  3. The name of the author may not be used to endorse or promote products
-#     derived from this software without specific prior written permission.
-# 
-#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-#  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-#  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-#  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-#  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Run this to generate all the initial makefiles, etc.
-
-die() { echo "$@"; exit 1; }
-
-# --force means overwrite ltmain.sh script if it already exists 
-LIBTOOLIZE_FLAGS=" --automake --copy --force"
-# --add-missing instructs automake to install missing auxiliary files
-# and --force to overwrite them if they already exist
-AUTOMAKE_FLAGS="--add-missing --copy --force --foreign"
-ACLOCAL_FLAGS="-I m4"
-
-ARGV0=$0
-ARGS="$@"
-
-run() {
-	echo "$ARGV0: running \`$@' $ARGS"
-	$@ $ARGS
-}
-
-# Try to locate a program by using which, and verify that the file is an
-# executable
-locate_binary() {
-  for f in $@
-  do
-    file=`which $f 2>/dev/null | grep -v '^no '`
-    if test -n "$file" -a -x "$file"; then
-      echo $file
-      return 0
-    fi
-  done
-
-  echo "" 
-  return 1
-}
-
-
-if test -f config/pre_hook.sh
-then
-  . config/pre_hook.sh
-fi
-
-# Try to detect the supported binaries if the user didn't
-# override that by pushing the environment variable
-if test x$LIBTOOLIZE = x; then
-  LIBTOOLIZE=`locate_binary glibtoolize libtoolize-1.5 libtoolize`
-  if test x$LIBTOOLIZE = x; then
-    die "Did not find a supported libtoolize"
-  fi
-fi
-
-if test x$ACLOCAL = x; then
-  ACLOCAL=`locate_binary aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal19 aclocal`
-  if test x$ACLOCAL = x; then
-    die "Did not find a supported aclocal"
-  fi
-fi
-
-if test x$AUTOMAKE = x; then
-  AUTOMAKE=`locate_binary automake-1.11 automake-1.10 automake-1.9 automake19 automake`
-  if test x$AUTOMAKE = x; then
-    die "Did not find a supported automake"
-  fi
-fi
-
-if test x$AUTOCONF = x; then
-  AUTOCONF=`locate_binary autoconf-2.59 autoconf259 autoconf`
-  if test x$AUTOCONF = x; then
-    die "Did not find a supported autoconf"
-  fi
-fi
-
-if test x$AUTOHEADER = x; then
-  AUTOHEADER=`locate_binary autoheader-2.59 autoheader259 autoheader`
-  if test x$AUTOHEADER = x; then
-    die "Did not find a supported autoheader"
-  fi
-fi
-
-run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute libtoolize"
-run $ACLOCAL $ACLOCAL_FLAGS || die "Can't execute aclocal"
-run $AUTOHEADER || die "Can't execute autoheader"
-run $AUTOMAKE $AUTOMAKE_FLAGS  || die "Can't execute automake"
-run $AUTOCONF || die "Can't execute autoconf"
-
-if test -f config/post_hook.sh
-then
-  . config/post_hook.sh
-fi
-
-echo "---"
-echo "Configured with the following tools:"
-echo "  * `$LIBTOOLIZE --version | head -1`"
-echo "  * `$ACLOCAL --version | head -1`"
-echo "  * `$AUTOHEADER --version | head -1`"
-echo "  * `$AUTOMAKE --version | head -1`"
-echo "  * `$AUTOCONF --version | head -1`"
-echo "---"
@@ -1,143 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-10-06.20; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# 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 <http://www.gnu.org/licenses/>.
-
-# 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 <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
-  '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-	# configure might choose to run compile as `compile cc -o foo foo.c'.
-	# So we strip `-o arg' only if arg is an object.
-	eat=1
-	case $2 in
-	  *.o | *.obj)
-	    ofile=$2
-	    ;;
-	  *)
-	    set x "$@" -o "$2"
-	    shift
-	    ;;
-	esac
-	;;
-      *.c)
-	cfile=$1
-	set x "$@" "$1"
-	shift
-	;;
-      *)
-	set x "$@" "$1"
-	shift
-	;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# 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:
@@ -1,1501 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
-
-timestamp='2009-11-20'
-
-# 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 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, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# 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 Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# 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
-
-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 <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 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
-
-# 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 tupples: *-*-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 ;;
-    *: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'`
-	exit ;;
-    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 <stdio.h>  /* 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 <sys/systemcfg.h>
-
-		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:*:[456])
-	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 <stdlib.h>
-              #include <unistd.h>
-
-              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 <unistd.h>
-	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:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	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-gnu`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/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	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="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${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-gnu
-	else
-	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
-	fi
-	exit ;;
-    avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	LIBC=gnu
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	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-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	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-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    xtensa*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	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' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/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 <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# 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 ;;
-    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
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		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
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	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 ;;
-    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 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#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 <sys/param.h>
-  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 <sys/param.h>
-#  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 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> 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:
@@ -1,666 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-#   Copyright 1996-2007 Free Software Foundation, Inc.
-#   Taken from GNU libtool, 2001
-#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-#   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.
-#
-# The first argument passed to this file is the canonical host specification,
-#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-#   than 256 bytes, otherwise the compiler driver will dump core. The only
-#   known workaround is to choose shorter directory names for the build
-#   directory and/or the installation directory.
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
-  wl='-Wl,'
-else
-  case "$host_os" in
-    aix*)
-      wl='-Wl,'
-      ;;
-    darwin*)
-      case $cc_basename in
-        xlc*)
-          wl='-Wl,'
-          ;;
-      esac
-      ;;
-    mingw* | cygwin* | pw32* | os2*)
-      ;;
-    hpux9* | hpux10* | hpux11*)
-      wl='-Wl,'
-      ;;
-    irix5* | irix6* | nonstopux*)
-      wl='-Wl,'
-      ;;
-    newsos6)
-      ;;
-    linux* | k*bsd*-gnu)
-      case $cc_basename in
-        icc* | ecc*)
-          wl='-Wl,'
-          ;;
-        pgcc | pgf77 | pgf90)
-          wl='-Wl,'
-          ;;
-        ccc*)
-          wl='-Wl,'
-          ;;
-        como)
-          wl='-lopt='
-          ;;
-        *)
-          case `$CC -V 2>&1 | sed 5q` in
-            *Sun\ C*)
-              wl='-Wl,'
-              ;;
-          esac
-          ;;
-      esac
-      ;;
-    osf3* | osf4* | osf5*)
-      wl='-Wl,'
-      ;;
-    rdos*)
-      ;;
-    solaris*)
-      wl='-Wl,'
-      ;;
-    sunos4*)
-      wl='-Qoption ld '
-      ;;
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      wl='-Wl,'
-      ;;
-    sysv4*MP*)
-      ;;
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      wl='-Wl,'
-      ;;
-    unicos*)
-      wl='-Wl,'
-      ;;
-    uts4*)
-      ;;
-  esac
-fi
-
-# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
-  cygwin* | mingw* | pw32*)
-    # 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
-if test "$with_gnu_ld" = yes; then
-  # 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.
-  # Unlike libtool, we use -rpath here, not --rpath, since the documented
-  # option of GNU ld is called -rpath, not --rpath.
-  hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-  case "$host_os" in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-        ld_shlibs=no
-      fi
-      ;;
-    amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we cannot use
-      # them.
-      ld_shlibs=no
-      ;;
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    cygwin* | mingw* | pw32*)
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      ;;
-    gnu* | linux* | k*bsd*-gnu)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-    netbsd*)
-      ;;
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-        ld_shlibs=no
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      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
-          ;;
-        *)
-          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-            hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-          else
-            ld_shlibs=no
-          fi
-          ;;
-      esac
-      ;;
-    sunos4*)
-      hardcode_direct=yes
-      ;;
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-        :
-      else
-        ld_shlibs=no
-      fi
-      ;;
-  esac
-  if test "$ld_shlibs" = no; then
-    hardcode_libdir_flag_spec=
-  fi
-else
-  case "$host_os" in
-    aix3*)
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes; then
-        # Neither direct hardcoding nor static linking is supported with a
-        # broken collect2.
-        hardcode_direct=unsupported
-      fi
-      ;;
-    aix4* | aix5*)
-      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
-      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].*|aix5*)
-          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
-      fi
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      if test "$GCC" = yes; then
-        case $host_os in aix4.[012]|aix4.[012].*)
-          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
-            hardcode_minus_L=yes
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_libdir_separator=
-          fi
-          ;;
-        esac
-      fi
-      # Begin _LT_AC_SYS_LIBPATH_AIX.
-      echo 'int main () { return 0; }' > conftest.c
-      ${CC} ${LDFLAGS} conftest.c -o conftest
-      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      if test -z "$aix_libpath"; then
-        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-      fi
-      if test -z "$aix_libpath"; then
-        aix_libpath="/usr/lib:/lib"
-      fi
-      rm -f conftest.c conftest
-      # End _LT_AC_SYS_LIBPATH_AIX.
-      if test "$aix_use_runtimelinking" = yes; then
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-      else
-        if test "$host_cpu" = ia64; then
-          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-        else
-          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        fi
-      fi
-      ;;
-    amigaos*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
-    bsdi[45]*)
-      ;;
-    cygwin* | mingw* | pw32*)
-      # 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.
-      hardcode_libdir_flag_spec=' '
-      libext=lib
-      ;;
-    darwin* | rhapsody*)
-      hardcode_direct=no
-      if test "$GCC" = yes ; then
-        :
-      else
-        case $cc_basename in
-          xlc*)
-            ;;
-          *)
-            ld_shlibs=no
-            ;;
-        esac
-      fi
-      ;;
-    dgux*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-    freebsd2.2*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    freebsd2*)
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    freebsd* | dragonfly*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    hpux9*)
-      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
-      ;;
-    hpux10*)
-      if test "$with_gnu_ld" = no; then
-        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
-      fi
-      ;;
-    hpux11*)
-      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_direct=yes
-            # 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*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    netbsd*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      ;;
-    newsos6)
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-        hardcode_direct=yes
-        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-        else
-          case "$host_os" in
-            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-              hardcode_libdir_flag_spec='-R$libdir'
-              ;;
-            *)
-              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
-      ;;
-    osf3*)
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-    osf4* | osf5*)
-      if test "$GCC" = yes; then
-        hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-        # Both cc and cxx compiler support -rpath directly
-        hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
-    solaris*)
-      hardcode_libdir_flag_spec='-R$libdir'
-      ;;
-    sunos4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      ;;
-    sysv4)
-      case $host_vendor in
-        sni)
-          hardcode_direct=yes # is this really true???
-          ;;
-        siemens)
-          hardcode_direct=no
-          ;;
-        motorola)
-          hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-          ;;
-      esac
-      ;;
-    sysv4.3*)
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-        ld_shlibs=yes
-      fi
-      ;;
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      ;;
-    sysv5* | sco3.2v5* | sco5v6*)
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      ;;
-    uts4*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      ;;
-    *)
-      ld_shlibs=no
-      ;;
-  esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec=      # the last element of library_names_spec in libtool.m4
-libname_spec='lib$name'
-case "$host_os" in
-  aix3*)
-    library_names_spec='$libname.a'
-    ;;
-  aix4* | aix5*)
-    library_names_spec='$libname$shrext'
-    ;;
-  amigaos*)
-    library_names_spec='$libname.a'
-    ;;
-  beos*)
-    library_names_spec='$libname$shrext'
-    ;;
-  bsdi[45]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  cygwin* | mingw* | pw32*)
-    shrext=.dll
-    library_names_spec='$libname.dll.a $libname.lib'
-    ;;
-  darwin* | rhapsody*)
-    shrext=.dylib
-    library_names_spec='$libname$shrext'
-    ;;
-  dgux*)
-    library_names_spec='$libname$shrext'
-    ;;
-  freebsd1*)
-    ;;
-  freebsd* | dragonfly*)
-    case "$host_os" in
-      freebsd[123]*)
-        library_names_spec='$libname$shrext$versuffix' ;;
-      *)
-        library_names_spec='$libname$shrext' ;;
-    esac
-    ;;
-  gnu*)
-    library_names_spec='$libname$shrext'
-    ;;
-  hpux9* | hpux10* | hpux11*)
-    case $host_cpu in
-      ia64*)
-        shrext=.so
-        ;;
-      hppa*64*)
-        shrext=.sl
-        ;;
-      *)
-        shrext=.sl
-        ;;
-    esac
-    library_names_spec='$libname$shrext'
-    ;;
-  interix[3-9]*)
-    library_names_spec='$libname$shrext'
-    ;;
-  irix5* | irix6* | nonstopux*)
-    library_names_spec='$libname$shrext'
-    case "$host_os" in
-      irix5* | nonstopux*)
-        libsuff= shlibsuff=
-        ;;
-      *)
-        case $LD in
-          *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
-          *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
-          *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
-          *) libsuff= shlibsuff= ;;
-        esac
-        ;;
-    esac
-    ;;
-  linux*oldld* | linux*aout* | linux*coff*)
-    ;;
-  linux* | k*bsd*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  knetbsd*-gnu)
-    library_names_spec='$libname$shrext'
-    ;;
-  netbsd*)
-    library_names_spec='$libname$shrext'
-    ;;
-  newsos6)
-    library_names_spec='$libname$shrext'
-    ;;
-  nto-qnx*)
-    library_names_spec='$libname$shrext'
-    ;;
-  openbsd*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  os2*)
-    libname_spec='$name'
-    shrext=.dll
-    library_names_spec='$libname.a'
-    ;;
-  osf3* | osf4* | osf5*)
-    library_names_spec='$libname$shrext'
-    ;;
-  rdos*)
-    ;;
-  solaris*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sunos4*)
-    library_names_spec='$libname$shrext$versuffix'
-    ;;
-  sysv4 | sysv4.3*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv4*MP*)
-    library_names_spec='$libname$shrext'
-    ;;
-  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-    library_names_spec='$libname$shrext'
-    ;;
-  uts4*)
-    library_names_spec='$libname$shrext'
-    ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
@@ -1,1705 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-#   Free Software Foundation, Inc.
-
-timestamp='2009-11-20'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# 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 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, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# 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.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
-#
-# 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 <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 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-dietlibc | linux-newlib* | 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/'`
-    ;;
-  *)
-    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*)
-		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 \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fido | fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| lm32 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | 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 \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| moxie \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| 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 | strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| ubicom32 \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k | z80)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-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-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| 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-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| lm32-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
-	| 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-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| 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-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
-	| tron-* \
-	| ubicom32-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| 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
-		;;
-	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)
-		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'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	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
-		;;
-	mingw32)
-		basic_machine=i386-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-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	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
-		;;
-	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)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	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-*) 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)
-		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
-		;;
-	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
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tile*)
-		basic_machine=tile-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
-		;;
-	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* \
-	      | -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* \
-	      | -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* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -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
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-dicos*)
-		os=-dicos
-		;;
-	-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
-		;;
-	# 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
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-        mep-*)
-		os=-elf
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		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:
@@ -1,630 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 <http://www.gnu.org/licenses/>.
-
-# 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 <oliva@dcc.unicamp.br>.
-
-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 outputing dependencies.
-  libtool     Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "depcomp $scriptversion"
-    exit $?
-    ;;
-esac
-
-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"
-
-# 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
-
-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 -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  mv "$tmpdepfile" "$depfile"
-  ;;
-
-gcc)
-## 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).
-## - 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 -eq 0; then :
-  else
-    rm -f "$tmpdepfile"
-    exit $stat
-  fi
-  rm -f "$depfile"
-  echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## 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.
-  tr ' ' '
-' < "$tmpdepfile" |
-## 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.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then :
-  else
-    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 ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
-    echo >> "$depfile"
-
-    # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-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.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-  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 -eq 0; then :
-  else
-    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
-    exit $stat
-  fi
-
-  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
-  do
-    test -f "$tmpdepfile" && break
-  done
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
-  rm -f "$tmpdepfile"
-  ;;
-
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
-  #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
-  #    foo.o: sub/foo.c ... \
-  #     sub/foo.h ... \
-  #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
-    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.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-  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 -eq 0; then :
-  else
-     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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
-    sed -ne '2,${
-	       s/^ *//
-	       s/ \\*$//
-	       s/$/:/
-	       p
-	     }' "$tmpdepfile" >> "$depfile"
-  else
-    echo "#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.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # 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.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
-
-#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:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
-  rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    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"
-  cat < "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    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::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$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:
@@ -1,520 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2009-04-28.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
-	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
-  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
-  trap '(exit $?); exit' 1 2 13 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 starting with `-'.
-  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
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst;;
-    esac
-
-    # 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 -z "$d" && 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:
@@ -1,8406 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6b
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 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
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long 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.
-# 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.2.6b
-#       automake:		$automake_version
-#       autoconf:		$autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=2.2.6b
-TIMESTAMP=""
-package_revision=1.3017
-
-# 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
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-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
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${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_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 "X${1}" | $Xsed -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 "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# 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"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
-  -*) progname=./$progname ;;
-esac
-
-# 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=:
-     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'
-
-# 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${mode+: }$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_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
-    $opt_warning && $ECHO "$progname${mode+: }$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 "X$my_directory_path" | $Xsed -e "$dirname"`
-      done
-      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e '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 "X$my_tmpdir" | $Xsed
-}
-
-
-# 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 "X$1" | $Xsed -e "$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 "X$1" | $Xsed \
-	    -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_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $SED -n '/^# '$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 ()
-{
-    $SED -n '/^# Usage:/,/# -h/ {
-        s/^# //
-	s/^# *$//
-	s/\$progname/'$progname'/
-	p
-    }' < "$progpath"
-    $ECHO
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-        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 --version) 2>/dev/null |$SED 1q`"'/
-	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
-	p
-     }' < "$progpath"
-    exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
-    func_error "missing argument for $1"
-    exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell, and then maybe $ECHO will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# 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_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
-}
-
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
-  # 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
-
-  # Parse non-mode specific arguments:
-  while test "$#" -gt 0; do
-    opt="$1"
-    shift
-
-    case $opt in
-      --config)		func_config					;;
-
-      --debug)		preserve_args="$preserve_args $opt"
-			func_echo "enabling shell trace mode"
-			opt_debug='set -x'
-			$opt_debug
-			;;
-
-      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			execute_dlfiles="$execute_dlfiles $1"
-			shift
-			;;
-
-      --dry-run | -n)	opt_dry_run=:					;;
-      --features)       func_features					;;
-      --finish)		mode="finish"					;;
-
-      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			case $1 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
-
-			mode="$1"
-			shift
-			;;
-
-      --preserve-dup-deps)
-			opt_duplicate_deps=:				;;
-
-      --quiet|--silent)	preserve_args="$preserve_args $opt"
-			opt_silent=:
-			;;
-
-      --verbose| -v)	preserve_args="$preserve_args $opt"
-			opt_silent=false
-			;;
-
-      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			preserve_args="$preserve_args $opt $1"
-			func_enable_tag "$1"	# tagname is set here
-			shift
-			;;
-
-      # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-			func_opt_split "$opt"
-			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
-			shift
-			;;
-
-      -\?|-h)		func_usage					;;
-      --help)		opt_help=:					;;
-      --version)	func_version					;;
-
-      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
-
-      *)		nonopt="$opt"
-			break
-			;;
-    esac
-  done
-
-
-  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_duplicate_deps
-      ;;
-  esac
-
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
-
-# 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
-}
-
-
-## ----------- ##
-##    Main.    ##
-## ----------- ##
-
-$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
-
-  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
-
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$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=$mode' for more information."
-}
-
-
-# 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_ltwrapper_scriptname_result=""
-    if func_ltwrapper_executable_p "$1"; then
-	func_dirname_and_basename "$1" "" "."
-	func_stripname '' '.exe' "$func_basename_result"
-	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-    fi
-}
-
-# 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_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_quote_for_eval "$arg"
-	CC_quoted="$CC_quoted $func_quote_for_eval_result"
-      done
-      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 "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
-      # 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_quote_for_eval "$arg"
-	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
-	    done
-	    case "$@ " in
-	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
-	      # 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 <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
-      $MV "${write_libobj}T" "${write_libobj}"
-    }
-}
-
-# 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)
-          pie_flag="$pie_flag $arg"
-	  continue
-	  ;;
-
-	-shared | -static | -prefer-pic | -prefer-non-pic)
-	  later="$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_quote_for_eval "$arg"
-	    lastarg="$lastarg $func_quote_for_eval_result"
-	  done
-	  IFS="$save_ifs"
-	  func_stripname ' ' '' "$lastarg"
-	  lastarg=$func_stripname_result
-
-	  # Add the arguments to base_compile.
-	  base_compile="$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_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
-    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 | *.obj | *.sx)
-      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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e '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
-      removelist="$removelist $output_obj"
-      $ECHO "$srcfile" > "$lockfile"
-    fi
-
-    $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
-    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-    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
-	command="$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
-	command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$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 "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
-    # We need to display help for each of the modes.
-    case $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 building PIC objects only
-  -prefer-non-pic   try to building 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
-
-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 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
-  -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
-
-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 \`$mode'"
-        ;;
-    esac
-
-    $ECHO
-    $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
-}
-
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
-
-
-# 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 $execute_dlfiles; do
-      test -f "$file" \
-	|| func_fatal_help "\`$file' is not a file"
-
-      dir=
-      case $file in
-      *.la)
-	# 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
-	  dir="$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
-      -*) ;;
-      *)
-	# 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_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
-    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 "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
-    $opt_debug
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
-
-      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" || admincmds="$admincmds
-       $cmds"
-	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    $opt_silent && exit $EXIT_SUCCESS
-
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
-    $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 "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-}
-
-test "$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.
-       $ECHO "X$nonopt" | $GREP shtool >/dev/null; 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"
-    install_prog="$install_prog$func_quote_for_eval_result"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest=$arg
-	continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f)
-	case " $install_prog " in
-	*[\\\ /]cp\ *) ;;
-	*) prev=$arg ;;
-	esac
-	;;
-      -g | -m | -o)
-	prev=$arg
-	;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*)
-	;;
-      *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest=$arg
-	  continue
-	fi
-	;;
-      esac
-
-      # Aesthetically quote the argument.
-      func_quote_for_eval "$arg"
-      install_prog="$install_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 -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.
-	staticlibs="$staticlibs $file"
-	;;
-
-      *.la)
-	# 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 "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
-	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
-	  esac
-	fi
-
-	func_dirname "$file" "/" ""
-	dir="$func_dirname_result"
-	dir="$dir$objdir"
-
-	if test -n "$relink_command"; then
-	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -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 "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-	  else
-	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "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_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" && staticlibs="$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 "X$lib" | $Xsed -e '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 "X$relink_command" | $Xsed -e '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 "X$file$stripped_ext" | $Xsed -e "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_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-	func_show_eval "$old_striplib $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 "$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
-
-/* 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 "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	  for progfile in $progfiles; do
-	    func_verbose "extracting global C symbols from \`$progfile'"
-	    $opt_dry_run || eval "$NM $progfile | $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"
-	  $opt_dry_run || {
-	    eval '$ECHO ": $name " >> "$nlist"'
-	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-	  }
-	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 >/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;
-"
-	  case $host in
-	  *cygwin* | *mingw* | *cegcc* )
-	    $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs.  */"
-	    lt_dlsym_const= ;;
-	  *osf5*)
-	    echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
-	    lt_dlsym_const= ;;
-	  *)
-	    lt_dlsym_const=const ;;
-	  esac
-
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
-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) ;;
-	  *) symtab_cflags="$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 "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-	  else
-	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	  fi
-	  ;;
-	*)
-	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "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.
-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
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 |
-	$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_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
-    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 | $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 | $NL2SP`
-    done
-
-    func_extract_archives_result="$my_oldobjs"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
-	func_emit_wrapper_part1_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part1_arg1=$1
-	fi
-
-	$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.
-Xsed='${SED} -e 1s/^X//'
-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
-    ECHO=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$ECHO works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$ECHO will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$ECHO "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
-	func_emit_wrapper_part2_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part2_arg1=$1
-	fi
-
-	$ECHO "\
-
-  # Usually 'no', except on cygwin/mingw when embedded into
-  # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_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 \"X\$thisdir\" | \$Xsed -e '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"
-
-	# 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-	fi
-
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
-	$ECHO "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2* | *-cegcc*)
-	  $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 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\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# 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=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_arg1=$1
-	fi
-
-	# split this up so that func_emit_cwrapperexe_src
-	# can call each part independently.
-	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
-	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin.  Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
-  func_to_host_path_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        case $build in
-          *mingw* ) # actually, msys
-            # awkward: cmd appends spaces to result
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_tmp1=`cygpath -w "$1"`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check the contents of
-            # stdout. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127 and print
-            # *an error message* to stdout. So we must check for both
-            # error code of zero AND non-empty stdout, which explains
-            # the odd construction:
-            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
-            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
-              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-                $SED -e "$lt_sed_naive_backslashify"`
-            else
-              # Allow warning below.
-              func_to_host_path_result=""
-            fi
-            ;;
-        esac
-        if test -z "$func_to_host_path_result" ; then
-          func_error "Could not determine host path corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback:
-          func_to_host_path_result="$1"
-        fi
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-#
-# 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.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
-  func_to_host_pathlist_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        # 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_to_host_pathlist_tmp2="$1"
-        # Once set for this call, this variable should not be
-        # reassigned. It is used in tha fallback case.
-        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
-          $SED -e 's|^:*||' -e 's|:*$||'`
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # unfortunately, winepath doesn't convert pathlists
-            func_to_host_pathlist_result=""
-            func_to_host_pathlist_oldIFS=$IFS
-            IFS=:
-            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
-              IFS=$func_to_host_pathlist_oldIFS
-              if test -n "$func_to_host_pathlist_f" ; then
-                func_to_host_path "$func_to_host_pathlist_f"
-                if test -n "$func_to_host_path_result" ; then
-                  if test -z "$func_to_host_pathlist_result" ; then
-                    func_to_host_pathlist_result="$func_to_host_path_result"
-                  else
-                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
-                  fi
-                fi
-              fi
-              IFS=:
-            done
-            IFS=$func_to_host_pathlist_oldIFS
-            ;;
-        esac
-        if test -z "$func_to_host_pathlist_result" ; then
-          func_error "Could not determine the host path(s) corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback. This may break if $1 contains DOS-style drive
-          # specifications. The fix is not to complicate the expression
-          # below, but for the user to provide a working wine installation
-          # with winepath so that path translation in the cross-to-mingw
-          # case works properly.
-          lt_replace_pathsep_nix_to_dos="s|:|;|g"
-          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
-            $SED -e "$lt_replace_pathsep_nix_to_dos"`
-        fi
-        # Now, add the leading and trailing path separators back
-        case "$1" in
-          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
-            ;;
-        esac
-        case "$1" in
-          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
-            ;;
-        esac
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_pathlist
-
-# 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 <<EOF
-
-/* $cwrappersource - temporary wrapper executable 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 executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "$SHELL $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-	    cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-#  include <io.h>
-#  define HAVE_SETENV
-#  ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-#  endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#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
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#endif
-
-#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 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#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)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    (void) vfprintf (stderr, fmt, args);
-    va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#endif
-
-const char *program_name = NULL;
-
-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_fatal (const char *message, ...);
-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_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
-	    func_emit_wrapper_part1 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
-	    cat <<EOF
-
-static const char *script_text_part2 =
-EOF
-	    func_emit_wrapper_part2 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
-
-	    cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
-	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_pathlist "$temp_rpath"
-	      cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
-EOF
-	    else
-	      cat <<"EOF"
-const char * LIB_PATH_VALUE   = "";
-EOF
-	    fi
-
-	    if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
-	      cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
-EOF
-	    else
-	      cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE   = "";
-EOF
-	    fi
-
-	    if test "$fast_install" = yes; then
-	      cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
-	    else
-	      cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
-	    fi
-
-
-	    cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX         "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
-
-static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int  newargc;
-  char *tmp_pathspec;
-  char *actual_cwrapper_path;
-  char *actual_cwrapper_name;
-  char *target_name;
-  char *lt_argv_zero;
-  intptr_t rval = 127;
-
-  int i;
-
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
-  /* very simple arg parsing; don't want to rely on getopt */
-  for (i = 1; i < argc; i++)
-    {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
-	{
-EOF
-	    case "$host" in
-	      *mingw* | *cygwin* )
-		# make stdout use "unix" line endings
-		echo "          setmode(1,_O_BINARY);"
-		;;
-	      esac
-
-	    cat <<"EOF"
-	  printf ("%s", script_text_part1);
-	  printf ("%s", script_text_part2);
-	  return 0;
-	}
-    }
-
-  newargz = XMALLOC (char *, argc + 1);
-  tmp_pathspec = find_executable (argv[0]);
-  if (tmp_pathspec == NULL)
-    lt_fatal ("Couldn't find %s", argv[0]);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
-			  tmp_pathspec));
-
-  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
-			  actual_cwrapper_path));
-  XFREE (tmp_pathspec);
-
-  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
-  strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
-  /* wrapper name transforms */
-  strendzap (actual_cwrapper_name, ".exe");
-  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
-  XFREE (actual_cwrapper_name);
-  actual_cwrapper_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  /* target_name transforms -- use actual target program name; might have lt- prefix */
-  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
-  strendzap (target_name, ".exe");
-  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
-  XFREE (target_name);
-  target_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
-			  target_name));
-EOF
-
-	    cat <<EOF
-  newargz[0] =
-    XMALLOC (char, (strlen (actual_cwrapper_path) +
-		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
-  strcpy (newargz[0], actual_cwrapper_path);
-  strcat (newargz[0], "$objdir");
-  strcat (newargz[0], "/");
-EOF
-
-	    cat <<"EOF"
-  /* stop here, and copy so we don't have to do this twice */
-  tmp_pathspec = xstrdup (newargz[0]);
-
-  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
-  strcat (newargz[0], actual_cwrapper_name);
-
-  /* DO want the lt- prefix here if it exists, so use target_name */
-  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
-  XFREE (tmp_pathspec);
-  tmp_pathspec = NULL;
-EOF
-
-	    case $host_os in
-	      mingw*)
-	    cat <<"EOF"
-  {
-    char* p;
-    while ((p = strchr (newargz[0], '\\')) != NULL)
-      {
-	*p = '/';
-      }
-    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
-      {
-	*p = '/';
-      }
-  }
-EOF
-	    ;;
-	    esac
-
-	    cat <<"EOF"
-  XFREE (target_name);
-  XFREE (actual_cwrapper_path);
-  XFREE (actual_cwrapper_name);
-
-  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
-  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
-  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
-      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal ("Unrecognized option in %s namespace: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
-  for (i = 0; i < newargc; i++)
-    {
-      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
-    }
-
-EOF
-
-	    case $host_os in
-	      mingw*)
-		cat <<"EOF"
-  /* execv doesn't actually work on mingw as expected on unix */
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
-  if (rval == -1)
-    {
-      /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
-      return 127;
-    }
-  return rval;
-EOF
-		;;
-	      *)
-		cat <<"EOF"
-  execv (lt_argv_zero, newargz);
-  return rval; /* =127, but avoids unused variable warning */
-EOF
-		;;
-	    esac
-
-	    cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
-  void *p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
-
-  return p;
-}
-
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
-			  string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
-
-int
-check_executable (const char *path)
-{
-  struct stat st;
-
-  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
-  if ((!path) || (!*path))
-    return 0;
-
-  if ((stat (path, &st) >= 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;
-
-  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
-  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;
-
-  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
-			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
-
-  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 ("getcwd failed");
-		  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 ("getcwd failed");
-  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)
-    {
-      LTWRAPPER_DEBUGPRINTF (("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
-	{
-	  char *errstr = strerror (errno);
-	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
-	}
-    }
-  XFREE (tmp_pathspec);
-
-  if (!has_symlinks)
-    {
-      return xstrdup (pathspec);
-    }
-
-  tmp_pathspec = realpath (pathspec, buf);
-  if (tmp_pathspec == 0)
-    {
-      lt_fatal ("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;
-}
-
-static void
-lt_error_core (int exit_status, const char *mode,
-	       const char *message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-  {
-#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;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
-    }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-
-  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)
-{
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
-
-  if (name && *name && value && *value)
-    {
-      char *new_value = lt_extend_str (getenv (name), value, 0);
-      lt_setenv (name, new_value);
-      XFREE (new_value);
-    }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# 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
-    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
-	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
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$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 "*) ;;
-		*) deplibs="$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
-#	      moreargs="$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
-		      dlfiles="$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.
-		    dlprefiles="$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 "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	shrext)
-	  shrext_cmds="$arg"
-	  prev=
-	  continue
-	  ;;
-	weak)
-	  weak_libs="$weak_libs $arg"
-	  prev=
-	  continue
-	  ;;
-	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  func_append compile_command " $qarg"
-	  func_append finalize_command " $qarg"
-	  continue
-	  ;;
-	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  func_append compile_command " $qarg"
-	  func_append finalize_command " $qarg"
-	  continue
-	  ;;
-	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$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
-	;;
-
-      -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"
-	dir=$func_stripname_result
-	if test -z "$dir"; 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
-	# 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 "*) ;;
-	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
-	  ;;
-	esac
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-	  case :$dllsearchpath: in
-	  *":$dir:"*) ;;
-	  ::) dllsearchpath=$dir;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$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*)
-	    # 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
-	    deplibs="$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
-	deplibs="$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)
-	compiler_flags="$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)
-	compiler_flags="$compiler_flags $arg"
-	func_append compile_command " $arg"
-	func_append finalize_command " $arg"
-	case "$new_inherited_linker_flags " in
-	    *" $arg "*) ;;
-	    * ) new_inherited_linker_flags="$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_fatal_error "only absolute run-paths are allowed"
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$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"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$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"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
-	  linker_flags="$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"
-	;;
-
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-        func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
-        func_append compile_command " $arg"
-        func_append finalize_command " $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
-        ;;
-
-      # Some other compiler flag.
-      -* | +*)
-        func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
-	;;
-
-      *.$objext)
-	# A standard object.
-	objs="$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
-		dlfiles="$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.
-	      dlprefiles="$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.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
-	continue
-	;;
-
-      *.la)
-	# A libtool-controlled library.
-
-	if test "$prev" = dlfiles; then
-	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
-	  prev=
-	elif test "$prev" = dlprefiles; then
-	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
-	  prev=
-	else
-	  deplibs="$deplibs $arg"
-	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 \"X\${$shlibpath_var}\" \| \$Xsed -e \'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"
-    # 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_duplicate_deps ; then
-	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	esac
-      fi
-      libs="$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 "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-	  esac
-	  pre_post_deps="$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=
-	  case $lib in
-	  *.la)	func_source "$lib" ;;
-	  esac
-
-	  # Collect preopened libtool deplibs, except any this library
-	  # has declared as weak libs
-	  for deplib in $dependency_libs; do
-            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
-	    case " $weak_libs " in
-	    *" $deplib_base "*) ;;
-	    *) deplibs="$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)
-	  if test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$deplib $compile_deplibs"
-	    finalize_deplibs="$deplib $finalize_deplibs"
-	  else
-	    compiler_flags="$compiler_flags $deplib"
-	    if test "$linkmode" = lib ; then
-		case "$new_inherited_linker_flags " in
-		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$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 "*) ;;
-		    * ) new_inherited_linker_flags="$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"
-	    newlib_search_path="$newlib_search_path $func_stripname_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"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
-	    ;;
-	  *)
-	    func_warning "\`-L' is ignored for archives/objects"
-	    ;;
-	  esac # linkmode
-	  continue
-	  ;; # -L
-	-R*)
-	  if test "$pass" = link; then
-	    func_stripname '-R' '' "$deplib"
-	    dir=$func_stripname_result
-	    # Make sure the xrpath contains only unique directories.
-	    case "$xrpath " in
-	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
-	    esac
-	  fi
-	  deplibs="$deplib $deplibs"
-	  continue
-	  ;;
-	*.la) lib="$deplib" ;;
-	*.$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 \"X$deplib\"" 2>/dev/null | $Xsed -e 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.
-	      newdlprefiles="$newdlprefiles $deplib"
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      newdlfiles="$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 "X$inherited_linker_flags" | $Xsed -e '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 "*) ;;
-	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
-	    esac
-	  done
-	fi
-	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e '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" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$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.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$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_duplicate_deps ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
-	  continue
-	fi # $pass = conv
-
-
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-	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.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
-	  else
-	    newdlfiles="$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 "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    func_warning "library \`$lib' was moved."
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
-	  else
-	    dir="$libdir"
-	    absdir="$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
-	    notinst_path="$notinst_path $abs_ladir"
-	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
-	    # Remove this search path later
-	    notinst_path="$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
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$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" && \
-		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
-	  fi
-	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
-	  newlib_search_path="$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"
-	         newlib_search_path="$newlib_search_path $func_stripname_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_duplicate_deps ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$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:"*) ;;
-	      *) temp_rpath="$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 "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$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
-	      notinst_deplibs="$notinst_deplibs $lib"
-	      need_relink=no
-	    ;;
-	  *)
-	    if test "$installed" = no; then
-	      notinst_deplibs="$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 "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$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 "$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$dir"
-		# Try looking first in the location we're being installed to.
-		if test -n "$inst_prefix_dir"; then
-		  case $libdir in
-		    [\\/]*)
-		      add_dir="$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:"*) ;;
-	      *) compile_shlibpath="$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:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-		esac
-	      fi
-	    fi
-	  fi
-
-	  if test "$linkmode" = prog || test "$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:"*) ;;
-	      *) finalize_shlibpath="$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
-		  [\\/]*)
-		    add_dir="$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 "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
-		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
-	      esac
-	    done
-	    dependency_libs="$temp_deplibs"
-	  fi
-
-	  newlib_search_path="$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"
-	    if $opt_duplicate_deps ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
-
-	  if test "$link_all_deplibs" != no; then
-	    # Add the search paths of all dependency libraries
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      -L*) path="$deplib" ;;
-	      *.la)
-	        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
-		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-		      linker_flags="$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 "X $new_inherited_linker_flags" | $Xsed -e '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 "*) ;;
-	    *) lib_search_path="$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 "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
-	      esac
-	      ;;
-	    *) tmp_libs="$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
-	  tmp_libs="$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"
-      objs="$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!"
-	  libobjs="$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
-	  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|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)
-	  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.
-	  verstring="$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"
-      libobjs="$libobjs $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
-
-      if test "$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
-	       removelist="$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
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-      #for path in $notinst_path; do
-      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
-      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
-      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "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
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$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 "*) ;;
-	*) dlfiles="$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 "*) ;;
-	*) dlprefiles="$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*)
-	    # these systems don't actually have a c library (as such)!
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$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
-	      deplibs="$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 <<EOF
-	  int main() { return 0; }
-EOF
-	  $opt_dry_run || $RM conftest
-	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      case $i in
-	      -l*)
-		func_stripname -l '' "$i"
-		name=$func_stripname_result
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		  case " $predeps $postdeps " in
-		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
-		    i=""
-		    ;;
-		  esac
-		fi
-		if test -n "$i" ; then
-		  libname=`eval "\\$ECHO \"$libname_spec\""`
-		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-		  set dummy $deplib_matches; shift
-		  deplib_match=$1
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    $ECHO
-		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		    $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 I believe you do not have"
-		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
-		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
-		  fi
-		fi
-		;;
-	      *)
-		newdeplibs="$newdeplibs $i"
-		;;
-	      esac
-	    done
-	  else
-	    # Error occurred in the first compile.  Let's try to salvage
-	    # the situation: Compile a separate program for each library.
-	    for i in $deplibs; do
-	      case $i in
-	      -l*)
-		func_stripname -l '' "$i"
-		name=$func_stripname_result
-		$opt_dry_run || $RM conftest
-		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		    case " $predeps $postdeps " in
-		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
-		      i=""
-		      ;;
-		    esac
-		  fi
-		  if test -n "$i" ; then
-		    libname=`eval "\\$ECHO \"$libname_spec\""`
-		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-		    set dummy $deplib_matches; shift
-		    deplib_match=$1
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
-		    else
-		      droppeddeps=yes
-		      $ECHO
-		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		      $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 a test_compile did reveal that the linker did not use this one"
-		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
-		    fi
-		  fi
-		else
-		  droppeddeps=yes
-		  $ECHO
-		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $ECHO "*** make it link in!  You will probably need to install it or some"
-		  $ECHO "*** library that it depends on before this library will be fully"
-		  $ECHO "*** functional.  Installing it before continuing would be even better."
-		fi
-		;;
-	      *)
-		newdeplibs="$newdeplibs $i"
-		;;
-	      esac
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method; shift
-	  file_magic_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 "*)
-		  newdeplibs="$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
-		      # 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
-			 $SED -e 10q |
-			 $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$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.
-	      newdeplibs="$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 "*)
-		  newdeplibs="$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 \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
-		       $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$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.
-	      newdeplibs="$newdeplibs $a_deplib"
-	      ;;
-	    esac
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-	      -e 's/ -lc$//' -e '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 "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
-	    done
-	  fi
-	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
-	     $GREP . >/dev/null; then
-	    $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
-	  fi
-	  ;;
-	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 "X $newdeplibs" | $Xsed -e '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 "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  deplibs=`$ECHO "X $deplibs" | $Xsed -e '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 "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$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
-	if test "$hardcode_into_libs" = yes; then
-	  # Hardcode the library paths
-	  hardcode_libdirs=
-	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$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
-		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"*)
-		    ;;
-		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		    ;;
-		  esac
-		fi
-	      else
-		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
-	      fi
-	    elif test -n "$runpath_var"; then
-	      case "$perm_rpath " in
-	      *" $libdir "*) ;;
-	      *) perm_rpath="$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"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
-	  fi
-	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
-	    # We should set the runpath_var.
-	    rpath=
-	    for dir in $perm_rpath; do
-	      rpath="$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 "$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
-	  linknames="$linknames $link"
-	done
-
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$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"
-	  delfiles="$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 cmd in $cmds; do
-	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      func_len " $cmd"
-	      len=$func_len_result
-	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-		func_show_eval "$cmd" 'exit $?'
-		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 "X$include_expsyms" | $Xsed | $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
-	  delfiles="$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 "*) ;;
-	  *)
-	    tmp_deplibs="$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"
-	    generated="$generated $gentop"
-
-	    func_extract_archives $gentop $convenience
-	    libobjs="$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\"
-	  linker_flags="$linker_flags $flag"
-	fi
-
-	# Make a backup of the uninstalled library when relinking
-	if test "$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
-	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
-	  # 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
-	      $ECHO "$obj" >> $output
-	    done
-	    $ECHO ')' >> $output
-	    delfiles="$delfiles $output"
-	  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
-	      $ECHO "$obj" >> $output
-	    done
-	    delfiles="$delfiles $output"
-	    output=$firstobj\"$file_list_spec$output\"
-	  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.
-		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-		  else
-		    # All subsequent reloadable object files will link in
-		    # the last one created.
-		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$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~
-	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-	      if test -n "$last_robj"; then
-	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
-	      fi
-	      delfiles="$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 "$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 "X$include_expsyms" | $Xsed | $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
-	      delfiles="$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"
-	  generated="$generated $gentop"
-
-	  func_extract_archives $gentop $dlprefiles
-	  libobjs="$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 "$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 "$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 "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
-	else
-	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
-
-	  func_extract_archives $gentop $convenience
-	  reload_conv_objs="$reload_objs $func_extract_archives_result"
-	fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$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 "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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])
-	      compile_command="$compile_command ${wl}-bind_at_load"
-	      finalize_command="$finalize_command ${wl}-bind_at_load"
-	    ;;
-	  esac
-	fi
-	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
-	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e '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 "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $compile_deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$new_libs $deplib" ;;
-	esac
-      done
-      compile_deplibs="$new_libs"
-
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$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 "*) ;;
-	  *) finalize_rpath="$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"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$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;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$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"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$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
-      *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
-        ;;
-      *cegcc)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
-      *)
-        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 "X$compile_command" | $Xsed -e '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=$?'
-
-	# 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
-	    rpath="$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
-	    rpath="$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 "X$link_command" | $Xsed -e '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 $?'
-	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 "X$compile_var$compile_command$compile_rpath" | $Xsed -e '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 "X$link_command" | $Xsed -e '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 $?'
-
-      # 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $ECHO for shipping.
-      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
-	case $progpath in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-	esac
-	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$ECHO "X$ECHO" | $Xsed -e "$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
-	    oldobjs="$oldobjs $symfileobj"
-	  fi
-	fi
-	addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
-
-	func_extract_archives $gentop $addlibs
-	oldobjs="$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"
-	  generated="$generated $gentop"
-
-	  func_extract_archives $gentop $dlprefiles
-	  oldobjs="$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"
-	  generated="$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"
-	      oldobjs="$oldobjs $gentop/$newobj"
-	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
-	    esac
-	  done
-	fi
-	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
-	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 "X$relink_command" | $Xsed -e "$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"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		test -z "$libdir" && \
-		  func_fatal_error "\`$deplib' is not a valid libtool archive"
-		newdependency_libs="$newdependency_libs $libdir/$name"
-		;;
-	      *) newdependency_libs="$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"
-		newdlfiles="$newdlfiles $libdir/$name"
-		;;
-	      *) newdlfiles="$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"
-		newdlprefiles="$newdlprefiles $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
-	      newdlfiles="$newdlfiles $abs"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlprefiles="$newdlprefiles $abs"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  fi
-	  $RM $output
-	  # place dlname in correct position for cygwin
-	  tdlname=$dlname
-	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-	  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 "$mode" = link || test "$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) RM="$RM $arg"; rmforce=yes ;;
-      -*) RM="$RM $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    test -z "$RM" && \
-      func_fatal_help "you must specify an RM program"
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-	objdir="$origobjdir"
-      else
-	objdir="$dir/$origobjdir"
-      fi
-      func_basename "$file"
-      name="$func_basename_result"
-      test "$mode" = uninstall && objdir="$dir"
-
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
-	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
-	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
-	    rmfiles="$rmfiles $objdir/$n"
-	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
-	  case "$mode" in
-	  clean)
-	    case "  $library_names " in
-	    # "  " in the beginning catches empty $dlname
-	    *" $dlname "*) ;;
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
-	    esac
-	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${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
-	    rmfiles="$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
-	    rmfiles="$rmfiles $dir/$non_pic_object"
-	  fi
-	fi
-	;;
-
-      *)
-	if test "$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
-	    rmfiles="$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
-	      rmfiles="$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
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
-	    fi
-	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
-	    fi
-	  fi
-	fi
-	;;
-      esac
-      func_show_eval "$RM $rmfiles" 'exit_status=1'
-    done
-    objdir="$origobjdir"
-
-    # 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 "$mode" = uninstall || test "$mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
-  help="$generic_help"
-  func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$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
-
@@ -1,376 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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 <http://www.gnu.org/licenses/>.
-
-# 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
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
-Send bug reports to <bug-automake@gnu.org>."
-    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
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar*)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f y.tab.h; then
-	echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG="\${$#}"
-	case $LASTARG in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if test -f "$SRCFILE"; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if test ! -f lex.yy.c; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-	/^@setfilename/{
-	  s/.* \([^ ]*\) *$/\1/
-	  p
-	  q
-	}' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar*)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case $firstarg in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case $firstarg in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# 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:
@@ -1,667 +0,0 @@
-#!/usr/bin/python
-
-#  Copyright (C) 2009 Sun Microsystems
-#
-#  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; version 2 of the License.
-#
-#  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, write to the Free Software
-#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-pandora_plugin_file = 'config/pandora-plugin.ini'
-
-# Find plugins in the tree and add them to the build system
-
-import ConfigParser, os, sys
-import datetime, time
-import subprocess
-
-plugin_am_file=None
-plugin_ac_file=None
-
-class ChangeProtectedFile(object):
-
-  def __init__(self, fname):
-    self.bogus_file= False
-    self.real_fname= fname
-    self.new_fname= "%s.new" % fname
-    try:
-      self.new_file= open(self.new_fname,'w+')
-    except IOError:
-      self.bogus_file= True
-
-  def write(self, text):
-    if not self.bogus_file:
-      self.new_file.write(text)
-
-  # We've written all of this out into .new files, now we only copy them
-  # over the old ones if they are different, so that we don't cause
-  # unnecessary recompiles
-  def close(self):
-    """Return True if the file had changed."""
-    if self.bogus_file:
-      return
-    self.new_file.seek(0)
-    new_content = self.new_file.read()
-    self.new_file.close()
-    try:
-        old_file = file(self.real_fname, 'r')
-        old_content = old_file.read()
-        old_file.close()
-    except IOError:
-        old_content = None
-    if new_content != old_content:
-      if old_content != None:
-        os.unlink(self.real_fname)
-      os.rename(self.new_fname, self.real_fname)
-      return True
-    else:
-        try:
-          os.unlink(self.new_fname)
-        except:
-          pass
-
-
-def write_external_configure(plugin, plugin_file):
-  """Write the initial bits of the configure.ac file"""
-  if not os.path.exists('m4'):
-    os.mkdir('m4')
-  plugin_file.write("""
-AC_PREREQ(2.59)dnl		Minimum Autoconf version required.
-AC_INIT([%(name)s],[%(version)s],[%(url)s])
-AC_CONFIG_SRCDIR([%(main_source)s])
-AC_CONFIG_AUX_DIR(config)
-
-PANDORA_CANONICAL_TARGET(less-warnings, warnings-always-on, require-cxx, force-gcc42,skip-visibility)
-
-PANDORA_REQUIRE_LIBPROTOBUF
-PANDORA_PROTOBUF_REQUIRE_VERSION([2.1.0])
-PANDORA_REQUIRE_PROTOC
-
-AC_LANG_PUSH(C++)
-PANDORA_REQUIRE_PTHREAD
-PANDORA_REQUIRE_LIBDL
-AC_LANG_POP
-
-PANDORA_USE_BETTER_MALLOC
-
-PANDORA_DRIZZLE_BUILD
-""" % plugin)
-
-  write_plugin_ac(plugin, plugin_file)
-
-  plugin_file.write("""
-AC_CONFIG_FILES(Makefile)
-
-AC_OUTPUT
-
-echo "---"
-echo "Configuration summary for $PACKAGE_NAME version $VERSION $PANDORA_RELEASE_COMMENT"
-echo ""
-echo "   * Installation prefix:       $prefix"
-echo "   * System type:               $host_vendor-$host_os"
-echo "   * Host CPU:                  $host_cpu"
-echo "   * C Compiler:                $CC_VERSION"
-echo "   * C++ Compiler:              $CXX_VERSION"
-echo "   * Debug enabled:             $with_debug"
-echo "   * Warnings as failure:       $ac_cv_warnings_as_errors"
-echo "   * C++ cstdint location:      $ac_cv_cxx_cstdint"
-echo "   * C++ hash_map location:     $ac_cv_cxx_hash_map"
-echo "   * C++ hash namespace:        $ac_cv_cxx_hash_namespace"
-echo "   * C++ shared_ptr namespace:  $ac_cv_shared_ptr_namespace"
-echo ""
-echo "---"
-
-  """ % plugin)
-
-def write_external_makefile(plugin, plugin_file):
-
-  plugin_file.write("""
-ACLOCAL_AMFLAGS = -I m4 --force
-VERSION=$(PANDORA_RELEASE_VERSION)
-
-pkgplugindir=%(pkgplugindir)s
-EXTRA_DIST = plugin.ini
-
-""" % plugin)
-  if plugin['headers'] != "":
-    plugin_file.write("noinst_HEADERS = %(headers)s\n" % plugin)
-  if plugin['install_headers'] != "":
-    plugin_file.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
-  if plugin['testsuite']:
-    if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
-      plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
-  plugin_file.write("""
-pkgplugin_LTLIBRARIES=%(libname)s.la
-%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
-%(libname)s_la_LIBADD=%(libs)s
-%(libname)s_la_DEPENDENCIES=%(libs)s
-%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
-%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
-%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
-%(libname)s_la_SOURCES=%(sources)s
-check_PROGRAMS += %(tests)s
-""" % plugin)
-  plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
-  if os.path.exists(plugin_am_file):
-    plugin_file.write('include %s\n' % plugin_am_file)
-
-def write_external_plugin():
-  """Return True if the plugin had changed."""
-  plugin = read_plugin_ini('.')
-  expand_plugin_ini(plugin)
-  plugin_file = ChangeProtectedFile('configure.ac')
-  write_external_configure(plugin, plugin_file)
-  result = plugin_file.close()
-  plugin_file = ChangeProtectedFile('Makefile.am')
-  write_external_makefile(plugin, plugin_file)
-  # Write some stub configure.ac and Makefile.am files that include the above
-  result = plugin_file.close() or result
-  return result
-
-def write_plugin(plugin, plugin_ini_list):
-  # Since this function is recursive, make sure we're not already in it.
-  if plugin.has_key('writing_status'):
-    if plugin['writing_status'] == 'done':
-      return
-    else:
-      print "Dependency loop detected with %s" % plugin['name']
-      exit(1)
-
-  plugin['writing_status'] = 'dependencies'
-
-  # Write all dependencies first to get around annoying automake bug
-  for dependency in plugin['dependency_list']:
-    found = False
-    for find_plugin in plugin_ini_list:
-      if find_plugin['module_name'] == dependency:
-        found = True
-        write_plugin(find_plugin, plugin_ini_list)
-        break
-    if found is False:
-      print "Could not find dependency %s: %s" % (plugin['name'], dependency)
-      exit(1)
-
-  write_plugin_ac(plugin, plugin_ac_file)
-  write_plugin_am(plugin, plugin_am_file)
-  plugin['writing_status'] = 'done'
-
-def write_plugin_ac(plugin, plugin_ac):
-  #
-  # Write plugin config instructions into plugin.ac file.
-  #
-  plugin_ac_file=os.path.join(plugin['rel_path'],'plugin.ac')
-  plugin_m4_dir=os.path.join(plugin['rel_path'],'m4')
-  plugin_m4_files=[]
-  if os.path.exists(plugin_m4_dir) and os.path.isdir(plugin_m4_dir):
-    for m4_file in os.listdir(plugin_m4_dir):
-      if os.path.splitext(m4_file)[-1] == '.m4':
-        plugin_m4_files.append(os.path.join(plugin['rel_path'], m4_file))
-  plugin_ac.write("""
-dnl Config for %(title)s
-""" % plugin)
-  for m4_file in plugin_m4_files:
-    plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
-  plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
-
-  plugin_ac.write("""
-AC_ARG_WITH([%(name_with_dashes)s-plugin],[
-dnl indented wierd to make the help output correct
-AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(enabled)s@:>@])
-AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s])
-  ],[
-    with_%(name)s_plugin="$withval"
-    AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
-      requested_%(name)s_plugin="yes"
-    ],[
-      requested_%(name)s_plugin="no"
-    ])
-  ],[
-    with_%(name)s_plugin="%(enabled)s"
-    requested_%(name)s_plugin="no"
-  ])
-AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
-dnl indented wierd to make the help output correct
-AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(default_yesno)s@:>@])
-AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable building %(title)s])
-  ],
-  [enable_%(name)s_plugin="$enableval"],
-  [enable_%(name)s_plugin=%(default_yesno)s])
-
-""" % plugin)
-  if os.path.exists(plugin_ac_file):
-    plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file)
-  # The plugin author has specified some check to make to determine
-  # if the plugin can be built. If the plugin is turned on and this
-  # check fails, then configure should error out. If the plugin is not
-  # turned on, then the normal conditional build stuff should just let
-  # it silently not build
-  if plugin['has_build_conditional']:
-    plugin_ac.write("""
-AS_IF([test %(build_conditional)s],
-      [], dnl build_conditional can only negate
-      [
-        AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"],
-              [AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])])
-        with_%(name)s_plugin=no
-      ])
-
-""" % plugin)
-  if not plugin['unconditional']:
-    plugin_ac.write("""
-AM_CONDITIONAL([%(build_conditional_tag)s],
-               [test %(build_conditional)s])
-    """ % plugin)
-
-  plugin_ac.write("""
-AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
-    [
-""" % plugin)
-  if plugin['testsuite']:
-    plugin_ac.write("""
-      pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
-    """ % plugin)
-  if plugin['static']:
-    plugin_ac.write("""
-        AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
-          pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
-          pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
-          pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
-          PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
-        ])
-    """ % plugin)
-
-  else:
-    plugin_ac.write("""
-        AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
-          pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
-        ])
-    """ % plugin)
-  plugin_ac.write("      ])\n")
-
-def fix_file_paths(plugin, files):
-  # TODO: determine path to plugin dir relative to top_srcdir... append it to
-  # source files if they don't already have it
-  new_files=""
-  if plugin['plugin_dir'] != ".":
-    for file in files.split():
-      if not file.startswith(plugin['rel_path']):
-        file= os.path.join(plugin['rel_path'], file)
-        new_files= "%s %s" % (new_files, file)
-  else:
-    new_files= " ".join(plugin['sources'].split())
-  if new_files != "":
-    return new_files
-  return files
-
-def expand_plugin_ini(plugin):
-    if plugin['name'] == "**OUT-OF-TREE**":
-      print "Out of tree plugins require the name field to be specified in plugin.ini"
-      sys.exit(1)
-
-    if plugin['plugin_dir'] == ".":
-      plugin['rel_path']= plugin['plugin_dir']
-      plugin['unconditional']=True
-    else:
-      plugin['rel_path']= plugin['plugin_dir'][len(config['top_srcdir'])+len(os.path.sep):]
-      plugin['unconditional']=False
-
-    plugin['sources']= fix_file_paths(plugin, plugin['sources'])
-    plugin['main_source']= plugin['sources'].split()[0]
-    plugin['headers']= fix_file_paths(plugin, plugin['headers'])
-    plugin['install_headers']= fix_file_paths(plugin, plugin['install_headers'])
-    plugin['tests']= fix_file_paths(plugin, plugin['tests'])
-
-    # Make a yes/no version for autoconf help messages
-    if plugin['load_by_default'] or plugin['static']:
-      plugin['default_yesno']="yes"
-    else:
-      plugin['default_yesno']="no"
-
-
-    plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
-    plugin['name_with_dashes']= plugin['name'].replace('_','-')
-    if plugin.has_key('build_conditional'):
-      plugin['has_build_conditional']=True
-      plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes" -a %(build_conditional)s' % plugin
-    else:
-      plugin['has_build_conditional']=False
-      plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
-
-    if plugin['install']:
-      plugin['library_type']= 'pkgplugin'
-    else:
-      plugin['library_type']= 'noinst'
-
-def find_testsuite(plugin_dir):
-  for testdir in ['drizzle-tests','tests']:
-    if os.path.isdir(os.path.join(plugin_dir,testdir)):
-      return testdir
-  if os.path.isdir(os.path.join('tests','suite',os.path.basename(plugin_dir))):
-    return ""
-  return None
-
-def read_plugin_ini(plugin_dir):
-    if plugin_dir == ".":
-      plugin_name="**OUT-OF-TREE**"
-    else:
-      short_name=os.path.basename(plugin_dir)
-      plugin_name = plugin_dir[plugin_dir.index(config['root_plugin_dir']) + len(config['root_plugin_dir']) + 1:]
-      module_name = plugin_name.replace("/", config['module_name_separator']).replace("\\", config['module_name_separator'])
-      plugin_name = plugin_name.replace("/", config['plugin_name_separator']).replace("\\", config['plugin_name_separator'])
-
-
-    plugin_file= os.path.join(plugin_dir,config['plugin_ini_fname'])
-    plugin_defaults= dict(sources="%s.cc" % short_name,
-                          headers="",
-                          install_headers="",
-                          cflags="",
-                          cppflags="",
-                          cxxflags="",
-                          libs="",
-                          ldflags="",
-                          author="",
-                          title="",
-                          description="",
-                          license="PLUGIN_LICENSE_GPL",
-                          name=plugin_name,
-                          module_name=module_name,
-                          load_by_default=config['default_load_by_default'],
-                          disabled="False",
-                          static="False",
-                          dependencies="",
-                          dependency_aliases="",
-                          tests="",
-                          install=config['default_install'])
-    parser=ConfigParser.ConfigParser(defaults= plugin_defaults)
-    parser.read(plugin_file)
-    plugin=dict(parser.items('plugin'))
-    plugin['plugin_dir'] = plugin_dir
-    if plugin_dir == '.':
-      if not plugin.has_key('url'):
-        print "External Plugins are required to specifiy a url"
-        plugin['url']= 'http://launchpad.net/%(name)s' % plugin
-        sys.exit(1)
-      if plugin_dir == '.' and not plugin.has_key('version'):
-        print "External Plugins are required to specifiy a version"
-        sys.exit(1)
-    if not plugin.has_key('version'):
-      plugin['version'] = config['default_plugin_version']
-
-    if plugin.has_key('load_by_default'):
-      plugin['load_by_default']=parser.getboolean('plugin','load_by_default')
-    if plugin.has_key('disabled'):
-      plugin['disabled']=parser.getboolean('plugin','disabled')
-    if plugin['disabled']:
-      plugin['enabled']="no"
-    else:
-      plugin['enabled']="yes"
-    if plugin.has_key('static'):
-      plugin['static']= parser.getboolean('plugin','static')
-    if plugin.has_key('install'):
-      plugin['install']= parser.getboolean('plugin','install')
-    if plugin.has_key('testsuite'):
-      if plugin['testsuite'] == 'disable':
-        plugin['testsuite']= False
-    else:
-      plugin_testsuite= find_testsuite(plugin_dir)
-      plugin['testsuitedir']=plugin_testsuite
-      if plugin_testsuite is not None:
-        plugin['testsuite']=True
-      else:
-        plugin['testsuite']=False
-
-    plugin['cflags']+= ' ' + config['extra_cflags']
-    plugin['cppflags']+= ' ' + config['extra_cppflags']
-    plugin['cxxflags']+= ' ' + config['extra_cxxflags']
-
-    plugin['libname']= "lib%s%s%s" % (config['plugin_prefix'],
-                                      plugin['name'],
-                                      config['plugin_suffix'])
-    if config['force_lowercase_libname']:
-      plugin['libname']= plugin['libname'].lower()
-
-    plugin['root_plugin_dir']= config['root_plugin_dir']
-    plugin['plugin_prefix']= config['plugin_prefix']
-    plugin['plugin_suffix']= config['plugin_suffix']
-    plugin['pkgplugindir']= config['pkgplugindir']
-
-    # Dependencies must have a module but dependency aliases are simply added
-    # to the variable passed during compile.
-    plugin['dependency_list'] = plugin['dependencies'].split()
-    dependency_aliases = plugin['dependency_aliases'].split()
-    plugin['dependencies'] = ','.join(plugin['dependency_list'] +
-                                      plugin['dependency_aliases'].split())
-    dependency_libs = ["%s/lib%s%s.la" % (config['root_plugin_dir'],
-                                          dependency.lower().replace('::', '_'),
-                                          config['plugin_suffix'])
-                       for dependency in plugin['dependency_list']]
-    plugin['libs'] = " ".join(plugin['libs'].split() + dependency_libs);
-
-# Libtool is going to expand:
-#      -DPANDORA_MODULE_AUTHOR='"Padraig O'"'"'Sullivan"'
-# to:
-# "-DPANDORA_MODULE_AUTHOR=\"Padraig O'Sullivan\""
-# So we have to replace internal ''s to '"'"'
-    for key in ('author','title','description','version'):
-      plugin[key]=plugin[key].replace('"','\\"')
-      plugin[key]=plugin[key].replace("'","'\"'\"'")
-    return plugin
-
-
-def write_plugin_am(plugin, plugin_am):
-  """Write an automake fragment for this plugin.
-
-  :param plugin: The plugin dict.
-  :param plugin_am: The file to write to.
-  """
-  # The .plugin.ini.stamp avoids changing the datestamp on plugin.ini which can
-  # confuse VCS systems.
-  plugin_am.write("""
-EXTRA_DIST += %(rel_path)s/plugin.ini
-
-# Prevent errors when a plugin dir is removed
-%(rel_path)s/plugin.ini:
-
-""" % plugin)
-  if plugin['headers'] != "":
-    plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
-  if plugin['install_headers'] != "":
-    plugin_am.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
-  if plugin['testsuite']:
-    if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
-      plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
-  if plugin['static']:
-    plugin_am.write("""
-%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
-EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
-  noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
-  %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
-  %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
-  %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
-  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
-  %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
-  %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
-  %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
-  check_PROGRAMS += %(tests)s
-  PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
-endif
-""" % plugin)
-  else:
-    plugin_am.write("""
-%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
-EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
-  %(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
-  %(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
-  %(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
-  %(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
-  %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
-  %(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
-  %(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
-  %(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
-  check_PROGRAMS += %(tests)s
-endif
-""" % plugin)
-  plugin_am_file=os.path.join(plugin['rel_path'],'plugin.am')
-  if os.path.exists(plugin_am_file):
-    plugin_am.write('include %s\n' % plugin_am_file)
-
-#
-# MAIN STARTS HERE:
-#
-
-# Parse the pandora-plugin config file
-
-config_defaults= dict(
-  top_srcdir='.',
-  top_builddir='.',
-  plugin_ini_fname='plugin.ini',
-  plugin_prefix='',
-  plugin_suffix='',
-  extra_cflags='',
-  extra_cppflags='',
-  extra_cxxflags='',
-  root_plugin_dir='',
-  pkgplugindir='',
-  default_install='True',
-  default_plugin_version='',
-  default_load_by_default='False',
-  force_lowercase_libname='True',
-  plugin_name_separator='_',
-  module_name_separator='::'
-)
-
-config_parser = ConfigParser.ConfigParser(defaults=config_defaults)
-config_parser.read(pandora_plugin_file)
-config = dict(config_parser.items('pandora-plugin'))
-config['force_lowercase_libname']=config_parser.getboolean('pandora-plugin','force_lowercase_libname')
-
-# I'm 3 seconds away from writing a comprehensive build solution
-if not os.path.exists('config/pandora_vc_revinfo'):
-  if os.path.exists('.bzr'):
-    bzr_revno= subprocess.Popen(["bzr", "revno"], stdout=subprocess.PIPE).communicate()[0].strip()
-    rev_date= datetime.date.fromtimestamp(time.time())
-    config['default_plugin_version'] = "%d.%02d.%s" % (rev_date.year, rev_date.month, bzr_revno)
-  else:
-    config['default_plugin_version']=datetime.date.fromtimestamp(time.time()).isoformat()
-else:
-  # need to read config/pandora_vc_revno
-  pandora_vc_revno=open('config/pandora_vc_revinfo','r').read().split()
-  rev_date=""
-  bzr_revno=""
-  for revno_line in pandora_vc_revno:
-    (revno_key,revno_val)= revno_line.split("=")
-    if revno_key == 'PANDORA_VC_REVNO':
-      bzr_revno=revno_val.strip()
-    elif revno_key == 'PANDORA_RELEASE_DATE':
-      rev_date=revno_val.strip()
-
-  config['default_plugin_version'] = "%s.%s" % (rev_date, bzr_revno)
-
-actions=[]
-for arg in sys.argv:
-  if arg.startswith('--top_srcdir='):
-    config['top_srcdir']=arg[12:]
-  elif arg.startswith('--top_builddir='):
-    config['top_builddir']=arg[14:]
-  elif arg == "--force-all":
-    actions=['plugin-list','pandora-plugin.am','write']
-    break
-  else:
-    actions.append(arg)
-if len(actions) == 0:
-  actions.append('write')
-
-plugin_list=[]
-
-def accumulate_plugins(arg, dirname, fnames):
-  # plugin_ini_fname is a name in dirname indicating dirname is a plugin.
-  if config['plugin_ini_fname'] in fnames:
-    arg.append(dirname)
-
-os.path.walk(os.path.join(config['top_srcdir'],
-                          config['root_plugin_dir']),
-             accumulate_plugins,
-             plugin_list)
-
-
-if not os.path.exists("config/pandora-plugin.am") or "write" in actions:
-  plugin_am_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.am'))
-  plugin_am_file.write("""
-# always the current list, generated every build so keep this lean.
-# pandora-plugin.list: datestamp preserved list
-${srcdir}/config/pandora-plugin.list: .plugin.scan
-.plugin.scan:
-	@cd ${top_srcdir} && python config/pandora-plugin plugin-list
-
-# Plugins affect configure; so to prevent configure running twice in a tarball
-# build (once up front, once with the right list of plugins, we ship the
-# generated list of plugins and the housekeeping material for that list so it
-# is likewise not updated.
-EXTRA_DIST += \
-	config/pandora-plugin.am \
-	config/pandora-plugin.ac \
-	config/pandora-plugin \
-	config/pandora-plugin.ini
-
-
-# Seed the list of plugin LDADDS which plugins may extend.
-PANDORA_DYNAMIC_LDADDS=
-
-# plugin.stamp: graph dominator for creating all per pandora-plugin.ac/am
-# files. This is invoked when the code to generate such files has altered.""")
-
-if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
-  plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
-  plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
-
-
-if os.path.exists('plugin.ini'):
-  # Are we in a plugin dir which wants to have a self-sufficient build system?
-  plugin_list=['.']
-
-  write_external_plugin()
-else:
-  plugin_list_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.list'))
-  for p in plugin_list:
-    plugin_list_file.write(p)
-    plugin_list_file.write("\n")
-  plugin_list.sort()
-  plugin_list_file.close()
-
-if not os.path.exists("config/pandora-plugin.am") or 'write' in actions:
-  plugin_am_file.write("\n${top_srcdir}/config/pandora-plugin.am: ${top_srcdir}/config/pandora-plugin.list ${top_srcdir}/config/pandora-plugin ")
-  for plugin_dir in plugin_list:
-    plugin_am_file.write("\\\n\t%s/plugin.ini " % plugin_dir)
-  plugin_am_file.write("\n\tcd ${top_srcdir} && python config/pandora-plugin write\n")
-  plugin_ini_list=[]
-
-  # Load all plugin.ini files first so we can do dependency tracking.
-  for plugin_dir in plugin_list:
-    plugin = read_plugin_ini(plugin_dir)
-    expand_plugin_ini(plugin)
-    plugin_ini_list.append(plugin)
-
-  # Check for duplicates
-  plugin_name_list = [plugin['libname'] for plugin in plugin_ini_list]
-  for plugin in plugin_ini_list:
-    if plugin_name_list.count(plugin['libname']) != 1:
-      print "Duplicate module name %s" % plugin['libname']
-      exit(1)
-
-  for plugin in plugin_ini_list:
-    write_plugin(plugin, plugin_ini_list)
-
-if plugin_am_file is not None:
-  plugin_am_file.close()
-if plugin_ac_file is not None:
-  plugin_ac_file.close()
@@ -1,1112 +0,0 @@
-#
-# Uncrustify options (with comments) for Pandora Projects
-#
-
-nl_after_brace_close = TRUE
-
-# The type of line endings
-newlines                                 = lf       # auto/lf/crlf/cr
-
-# The original size of tabs in the input
-input_tab_size                           = 8        # number
-
-# The size of tabs in the output (only used if align_with_tabs=true)
-output_tab_size                          = 3        # number
-
-# The ascii value of the string escape char, usually 92 (\) or 94 (^). (Pawn)
-string_escape_char                       = 92       # number
-
-# Alternate string escape char for Pawn. Only works right before the quote char.
-string_escape_char2                      = 0        # number
-
-#
-# Indenting
-#
-
-# The number of columns to indent per level.
-# Usually 2, 3, 4, or 8.
-indent_columns                           = 2        # number
-
-# How to use tabs when indenting code
-# 0=spaces only
-# 1=indent with tabs, align with spaces
-# 2=indent and align with tabs
-indent_with_tabs                         = 0        # number
-
-# Whether to indent strings broken by '\' so that they line up
-indent_align_string                      = true     # false/true
-
-# The number of spaces to indent multi-line XML strings.
-# Requires indent_align_string=True
-indent_xml_string                        = 0        # number
-
-# Spaces to indent '{' from level
-indent_brace                             = 0        # number
-
-# Whether braces are indented to the body level
-indent_braces                            = false    # false/true
-
-# Disabled indenting function braces if indent_braces is true
-indent_braces_no_func                    = false    # false/true
-
-# Indent based on the size of the brace parent, ie 'if' => 3 spaces, 'for' => 4 spaces, etc.
-indent_brace_parent                      = false    # false/true
-
-# Whether the 'namespace' body is indented
-indent_namespace                         = false    # false/true
-
-# Whether the 'extern "C"' body is indented
-indent_extern                            = false    # false/true
-
-# Whether the 'class' body is indented
-indent_class                             = true     # false/true
-
-# Whether to indent the stuff after a leading class colon
-indent_class_colon                       = true     # false/true
-
-# False=treat 'else\nif' as 'else if' for indenting purposes
-# True=indent the 'if' one level
-indent_else_if                           = false    # false/true
-
-# True:  indent continued function call parameters one indent level
-# False: align parameters under the open paren
-indent_func_call_param                   = false    # false/true
-
-# Same as indent_func_call_param, but for function defs
-indent_func_def_param                    = false    # false/true
-
-# Same as indent_func_call_param, but for function protos
-indent_func_proto_param                  = false    # false/true
-
-# Same as indent_func_call_param, but for class declarations
-indent_func_class_param                  = false    # false/true
-
-# Same as indent_func_call_param, but for class variable constructors
-indent_func_ctor_var_param               = false    # false/true
-
-# Same as indent_func_call_param, but for templates
-indent_template_param                    = false    # false/true
-
-# Double the indent for indent_func_xxx_param options
-indent_func_param_double                 = false    # false/true
-
-# Indentation column for standalone 'const' function decl/proto qualifier
-indent_func_const                        = 0        # number
-
-# Indentation column for standalone 'throw' function decl/proto qualifier
-indent_func_throw                        = 0        # number
-
-# The number of spaces to indent a continued '->' or '.'
-# Usually set to 0, 1, or indent_columns.
-indent_member                            = 3        # number
-
-# Spaces to indent single line ('//') comments on lines before code
-indent_sing_line_comments                = 0        # number
-
-# If set, will indent trailing single line ('//') comments relative
-# to the code instead of trying to keep the same absolute column
-indent_relative_single_line_comments     = false    # false/true
-
-# Spaces to indent 'case' from 'switch'
-# Usually 0 or indent_columns.
-indent_switch_case                       = 0        # number
-
-# Spaces to shift the 'case' line, without affecting any other lines
-# Usually 0.
-indent_case_shift                        = 0        # number
-
-# Spaces to indent '{' from 'case'.
-# By default, the brace will appear under the 'c' in case.
-# Usually set to 0 or indent_columns.
-indent_case_brace                        = 0        # number
-
-# Whether to indent comments found in first column
-indent_col1_comment                      = false    # false/true
-
-# How to indent goto labels
-#  >0 : absolute column where 1 is the leftmost column
-#  <=0 : subtract from brace indent
-indent_label                             = 1        # number
-
-# Same as indent_label, but for access specifiers that are followed by a colon
-indent_access_spec                       = 1        # number
-
-# Indent the code after an access specifier by one level.
-# If set, this option forces 'indent_access_spec=0'
-indent_access_spec_body                  = false    # false/true
-
-# If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
-indent_paren_nl                          = false    # false/true
-
-# Controls the indent of a close paren after a newline.
-# 0: Indent to body level
-# 1: Align under the open paren
-# 2: Indent to the brace level
-indent_paren_close                       = 0        # number
-
-# Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
-indent_comma_paren                       = false    # false/true
-
-# Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
-indent_bool_paren                        = false    # false/true
-
-# If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
-indent_square_nl                         = false    # false/true
-
-# Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
-indent_preserve_sql                      = false    # false/true
-
-#
-# Spacing options
-#
-
-# Add or remove space around arithmetic operator '+', '-', '/', '*', etc
-sp_arith                                 = force    # ignore/add/remove/force
-
-# Add or remove space before assignment operator '=', '+=', etc
-sp_before_assign                         = remove    # ignore/add/remove/force
-
-# Add or remove space after assignment operator '=', '+=', etc
-sp_after_assign                         = force    # ignore/add/remove/force
-
-# Add or remove space around assignment '=' in enum
-sp_enum_assign                           = ignore   # ignore/add/remove/force
-
-# Add or remove space around boolean operators '&&' and '||'
-sp_bool                                  = force    # ignore/add/remove/force
-
-# Add or remove space around compare operator '<', '>', '==', etc
-sp_compare                               = force    # ignore/add/remove/force
-
-# Add or remove space inside '(' and ')'
-sp_inside_paren                          = remove   # ignore/add/remove/force
-
-# Add or remove space between nested parens
-sp_paren_paren                           = remove   # ignore/add/remove/force
-
-# Whether to balance spaces inside nested parens
-sp_balance_nested_parens                 = false    # false/true
-
-# Add or remove space between ')' and '{'
-sp_paren_brace                           = ignore   # ignore/add/remove/force
-
-# Add or remove space before pointer star '*'
-sp_before_ptr_star                       = force    # ignore/add/remove/force
-
-# Add or remove space before pointer star '*' that isn't followed by a variable name
-# If set to 'ignore', sp_before_ptr_star is used instead.
-sp_before_unnamed_ptr_star               = ignore   # ignore/add/remove/force
-
-# Add or remove space between pointer stars '*'
-sp_between_ptr_star                      = remove   # ignore/add/remove/force
-
-# Add or remove space after pointer star '*', if followed by a word.
-sp_after_ptr_star                        = remove   # ignore/add/remove/force
-
-# Add or remove space after a pointer star '*', if followed by a func proto/def.
-sp_after_ptr_star_func                   = ignore   # ignore/add/remove/force
-
-# Add or remove space before a pointer star '*', if followed by a func proto/def.
-sp_before_ptr_star_func                  = ignore   # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&'
-sp_before_byref                          = remove   # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&' that isn't followed by a variable name
-# If set to 'ignore', sp_before_byref is used instead.
-sp_before_unnamed_byref                  = ignore   # ignore/add/remove/force
-
-# Add or remove space after reference sign '&', if followed by a word.
-sp_after_byref                           = force    # ignore/add/remove/force
-
-# Add or remove space after a reference sign '&', if followed by a func proto/def.
-sp_after_byref_func                      = ignore   # ignore/add/remove/force
-
-# Add or remove space before a reference sign '&', if followed by a func proto/def.
-sp_before_byref_func                     = ignore   # ignore/add/remove/force
-
-# Add or remove space between type and word
-sp_after_type                            = force    # ignore/add/remove/force
-
-# Add or remove space in 'template <' vs 'template<'.
-# If set to ignore, sp_before_angle is used.
-sp_template_angle                        = ignore   # ignore/add/remove/force
-
-# Add or remove space before '<>'
-sp_before_angle                          = remove   # ignore/add/remove/force
-
-# Add or remove space inside '<' and '>'
-sp_inside_angle                          = remove   # ignore/add/remove/force
-
-# Add or remove space after '<>'
-sp_after_angle                           = force    # ignore/add/remove/force
-
-# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
-sp_angle_paren                           = ignore   # ignore/add/remove/force
-
-# Add or remove space between '<>' and a word as in 'List<byte> m;'
-sp_angle_word                            = ignore   # ignore/add/remove/force
-
-# Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
-sp_before_sparen                         = force    # ignore/add/remove/force
-
-# Add or remove space inside if-condition '(' and ')'
-sp_inside_sparen                         = remove   # ignore/add/remove/force
-
-# Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
-sp_after_sparen                          = force    # ignore/add/remove/force
-
-# Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
-sp_sparen_brace                          = add      # ignore/add/remove/force
-
-# Add or remove space before empty statement ';' on 'if', 'for' and 'while'
-sp_special_semi                          = ignore   # ignore/add/remove/force
-
-# Add or remove space before ';'
-sp_before_semi                           = remove   # ignore/add/remove/force
-
-# Add or remove space before ';' in non-empty 'for' statements
-sp_before_semi_for                       = ignore   # ignore/add/remove/force
-
-# Add or remove space before a semicolon of an empty part of a for statment.
-sp_before_semi_for_empty                 = force    # ignore/add/remove/force
-
-# Add or remove space after the final semicolon of an empty part of a for statment: for ( ; ; <here> ).
-sp_after_semi_for_empty                  = ignore   # ignore/add/remove/force
-
-# Add or remove space before '[' (except '[]')
-sp_before_square                         = ignore   # ignore/add/remove/force
-
-# Add or remove space before '[]'
-sp_before_squares                        = ignore   # ignore/add/remove/force
-
-# Add or remove space inside '[' and ']'
-sp_inside_square                         = remove   # ignore/add/remove/force
-
-# Add or remove space after ','
-sp_after_comma                           = force    # ignore/add/remove/force
-
-# Add or remove space before ','
-sp_before_comma                          = remove   # ignore/add/remove/force
-
-# Add or remove space after class ':'
-sp_after_class_colon                     = ignore   # ignore/add/remove/force
-
-# Add or remove space before class ':'
-sp_before_class_colon                    = ignore   # ignore/add/remove/force
-
-# Add or remove space between 'operator' and operator sign
-sp_after_operator                        = ignore   # ignore/add/remove/force
-
-# Add or remove space between the operator symbol and the open paren, as in 'operator ++('
-sp_after_operator_sym                    = ignore   # ignore/add/remove/force
-
-# Add or remove space after C/D cast, ie 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
-sp_after_cast                            = remove   # ignore/add/remove/force
-
-# Add or remove spaces inside cast parens
-sp_inside_paren_cast                     = remove   # ignore/add/remove/force
-
-# Add or remove space between the type and open paren in a C++ cast, ie 'int(exp)' vs 'int (exp)'
-sp_cpp_cast_paren                        = remove   # ignore/add/remove/force
-
-# Add or remove space between 'sizeof' and '('
-sp_sizeof_paren                          = remove   # ignore/add/remove/force
-
-# Add or remove space after the tag keyword (Pawn)
-sp_after_tag                             = ignore   # ignore/add/remove/force
-
-# Add or remove space inside enum '{' and '}'
-sp_inside_braces_enum                    = force    # ignore/add/remove/force
-
-# Add or remove space inside struct/union '{' and '}'
-sp_inside_braces_struct                  = force    # ignore/add/remove/force
-
-# Add or remove space inside '{' and '}'
-sp_inside_braces                         = force    # ignore/add/remove/force
-
-# Add or remove space inside '{}'
-sp_inside_braces_empty                   = ignore   # ignore/add/remove/force
-
-# Add or remove space between return type and function name
-# A minimum of 1 is forced except for pointer return types.
-sp_type_func                             = force    # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function declaration
-sp_func_proto_paren                      = remove   # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function definition
-sp_func_def_paren                        = remove   # ignore/add/remove/force
-
-# Add or remove space inside empty function '()'
-sp_inside_fparens                        = ignore   # ignore/add/remove/force
-
-# Add or remove space inside function '(' and ')'
-sp_inside_fparen                         = remove   # ignore/add/remove/force
-
-# Add or remove space between ']' and '(' when part of a function call.
-sp_square_fparen                         = ignore   # ignore/add/remove/force
-
-# Add or remove space between ')' and '{' of function
-sp_fparen_brace                          = add      # ignore/add/remove/force
-
-# Add or remove space between function name and '(' on function calls
-sp_func_call_paren                       = remove   # ignore/add/remove/force
-
-# Add or remove space between the user function name and '(' on function calls
-# You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
-sp_func_call_user_paren                  = ignore   # ignore/add/remove/force
-
-# Add or remove space between a constructor/destructor and the open paren
-sp_func_class_paren                      = remove   # ignore/add/remove/force
-
-# Add or remove space between 'return' and '('
-sp_return_paren                          = remove   # ignore/add/remove/force
-
-# Add or remove space between '__attribute__' and '('
-sp_attribute_paren                       = remove   # ignore/add/remove/force
-
-# Add or remove space between 'defined' and '(' in '#if defined (FOO)'
-sp_defined_paren                         = remove   # ignore/add/remove/force
-
-# Add or remove space between 'throw' and '(' in 'throw (something)'
-sp_throw_paren                           = ignore   # ignore/add/remove/force
-
-# Add or remove space between macro and value
-sp_macro                                 = ignore   # ignore/add/remove/force
-
-# Add or remove space between macro function ')' and value
-sp_macro_func                            = ignore   # ignore/add/remove/force
-
-# Add or remove space between 'else' and '{' if on the same line
-sp_else_brace                            = ignore   # ignore/add/remove/force
-
-# Add or remove space between '}' and 'else' if on the same line
-sp_brace_else                            = ignore   # ignore/add/remove/force
-
-# Add or remove space between '}' and the name of a typedef on the same line
-sp_brace_typedef                         = force    # ignore/add/remove/force
-
-# Add or remove space between 'catch' and '{' if on the same line
-sp_catch_brace                           = ignore   # ignore/add/remove/force
-
-# Add or remove space between '}' and 'catch' if on the same line
-sp_brace_catch                           = ignore   # ignore/add/remove/force
-
-# Add or remove space between 'finally' and '{' if on the same line
-sp_finally_brace                         = ignore   # ignore/add/remove/force
-
-# Add or remove space between '}' and 'finally' if on the same line
-sp_brace_finally                         = ignore   # ignore/add/remove/force
-
-# Add or remove space between 'try' and '{' if on the same line
-sp_try_brace                             = ignore   # ignore/add/remove/force
-
-# Add or remove space between get/set and '{' if on the same line
-sp_getset_brace                          = ignore   # ignore/add/remove/force
-
-# Add or remove space before the '::' operator
-sp_before_dc                             = remove   # ignore/add/remove/force
-
-# Add or remove space after the '::' operator
-sp_after_dc                              = remove   # ignore/add/remove/force
-
-# Add or remove around the D named array initializer ':' operator
-sp_d_array_colon                         = ignore   # ignore/add/remove/force
-
-# Add or remove space after the '!' (not) operator.
-sp_not                                   = force   # ignore/add/remove/force
-
-# Add or remove space after the '~' (invert) operator.
-sp_inv                                   = remove   # ignore/add/remove/force
-
-# Add or remove space after the '&' (address-of) operator.
-# This does not affect the spacing after a '&' that is part of a type.
-sp_addr                                  = remove   # ignore/add/remove/force
-
-# Add or remove space around the '.' or '->' operators
-sp_member                                = remove   # ignore/add/remove/force
-
-# Add or remove space after the '*' (dereference) operator.
-# This does not affect the spacing after a '*' that is part of a type.
-sp_deref                                 = remove   # ignore/add/remove/force
-
-# Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'
-sp_sign                                  = remove   # ignore/add/remove/force
-
-# Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'
-sp_incdec                                = remove   # ignore/add/remove/force
-
-# Add or remove space before a backslash-newline at the end of a line
-sp_before_nl_cont                        = add      # ignore/add/remove/force
-
-# Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
-sp_after_oc_scope                        = ignore   # ignore/add/remove/force
-
-# Add or remove space after the colon in message specs
-# '-(int) f:(int) x;' vs '-(int) f: (int) x;'
-sp_after_oc_colon                        = ignore   # ignore/add/remove/force
-
-# Add or remove space before the colon in message specs
-# '-(int) f: (int) x;' vs '-(int) f : (int) x;'
-sp_before_oc_colon                       = ignore   # ignore/add/remove/force
-
-# Add or remove space after the colon in message specs
-# '[object setValue:1];' vs '[object setValue: 1];'
-sp_after_send_oc_colon                   = ignore   # ignore/add/remove/force
-
-# Add or remove space before the colon in message specs
-# '[object setValue:1];' vs '[object setValue :1];'
-sp_before_send_oc_colon                  = ignore   # ignore/add/remove/force
-
-# Add or remove space after the (type) in message specs
-# '-(int) f: (int) x;' vs '-(int) f: (int)x;'
-sp_after_oc_type                         = ignore   # ignore/add/remove/force
-
-# Add or remove space around the ':' in 'b ? t : f'
-sp_cond_colon                            = ignore   # ignore/add/remove/force
-
-# Add or remove space around the '?' in 'b ? t : f'
-sp_cond_question                         = ignore   # ignore/add/remove/force
-
-# Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
-sp_case_label                            = remove   # ignore/add/remove/force
-
-#
-# Code alignment (not left column spaces/tabs)
-#
-
-# Whether to keep non-indenting tabs
-align_keep_tabs                          = false    # false/true
-
-# Whether to use tabs for alinging
-align_with_tabs                          = false    # false/true
-
-# Whether to bump out to the next tab when aligning
-align_on_tabstop                         = false    # false/true
-
-# Whether to left-align numbers
-align_number_left                        = false     # false/true
-
-# Align variable definitions in prototypes and functions
-align_func_params                        = false     # false/true
-
-# Align parameters in single-line functions that have the same name.
-# The function names must already be aligned with each other.
-align_same_func_call_params              = false    # false/true
-
-# The span for aligning variable definitions (0=don't align)
-align_var_def_span                       = 1        # number
-
-# How to align the star in variable definitions.
-#  0=Part of the type     'void *   foo;'
-#  1=Part of the variable 'void     *foo;'
-#  2=Dangling             'void    *foo;'
-align_var_def_star_style                 = 1        # number
-
-# How to align the '&' in variable definitions.
-#  0=Part of the type
-#  1=Part of the variable
-#  2=Dangling
-align_var_def_amp_style                  = 0        # number
-
-# The threshold for aligning variable definitions (0=no limit)
-align_var_def_thresh                     = 1       # number
-
-# The gap for aligning variable definitions
-align_var_def_gap                        = 0        # number
-
-# Whether to align the colon in struct bit fields
-align_var_def_colon                      = false     # false/true
-
-# Whether to align inline struct/enum/union variable definitions
-align_var_def_inline                     = false     # false/true
-
-# The span for aligning on '=' in assignments (0=don't align)
-align_assign_span                        = 0        # number
-
-# The threshold for aligning on '=' in assignments (0=no limit)
-align_assign_thresh                      = 12       # number
-
-# The span for aligning on '=' in enums (0=don't align)
-align_enum_equ_span                      = 0       # number
-
-# The threshold for aligning on '=' in enums (0=no limit)
-align_enum_equ_thresh                    = 0        # number
-
-# The span for aligning struct/union (0=don't align)
-align_var_struct_span                    = 0       # number
-
-# The threshold for aligning struct/union member definitions (0=no limit)
-align_var_struct_thresh                  = 0        # number
-
-# The gap for aligning struct/union member definitions
-align_var_struct_gap                     = 0        # number
-
-# The span for aligning struct initializer values (0=don't align)
-align_struct_init_span                   = 3        # number
-
-# The minimum space between the type and the synonym of a typedef
-align_typedef_gap                        = 3        # number
-
-# The span for aligning single-line typedefs (0=don't align)
-align_typedef_span                       = 5        # number
-
-# How to align typedef'd functions with other typedefs
-# 0: Don't mix them at all
-# 1: align the open paren with the types
-# 2: align the function type name with the other type names
-align_typedef_func                       = 0        # number
-
-# Controls the positioning of the '*' in typedefs. Just try it.
-# 0: Align on typdef type, ignore '*'
-# 1: The '*' is part of type name: typedef int  *pint;
-# 2: The '*' is part of the type, but dangling: typedef int *pint;
-align_typedef_star_style                 = 0        # number
-
-# Controls the positioning of the '&' in typedefs. Just try it.
-# 0: Align on typdef type, ignore '&'
-# 1: The '&' is part of type name: typedef int  &pint;
-# 2: The '&' is part of the type, but dangling: typedef int &pint;
-align_typedef_amp_style                  = 0        # number
-
-# The span for aligning comments that end lines (0=don't align)
-align_right_cmt_span                     = 3        # number
-
-# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
-align_right_cmt_mix                      = false    # false/true
-
-# If a trailing comment is more than this number of columns away from the text it follows,
-# it will qualify for being aligned.
-align_right_cmt_gap                      = 0        # number
-
-# The span for aligning function prototypes (0=don't align)
-align_func_proto_span                    = 0        # number
-
-# Minimum gap between the return type and the function name.
-align_func_proto_gap                     = 0        # number
-
-# Whether to mix aligning prototype and variable declarations.
-# If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
-align_mix_var_proto                      = false    # false/true
-
-# Align single-line functions with function prototypes, uses align_func_proto_span
-align_single_line_func                   = false    # false/true
-
-# Aligning the open brace of single-line functions.
-# Requires align_single_line_func=true, uses align_func_proto_span
-align_single_line_brace                  = false    # false/true
-
-# Gap for align_single_line_brace.
-align_single_line_brace_gap              = 0        # number
-
-# The span for aligning ObjC msg spec (0=don't align)
-align_oc_msg_spec_span                   = 0        # number
-
-# Whether to align macros wrapped with a backslash and a newline.
-# This will not work right if the macro contains a multi-line comment.
-align_nl_cont                            = true     # false/true
-
-# The minimum space between label and value of a preprocessor define
-align_pp_define_gap                      = 4        # number
-
-# The span for aligning on '#define' bodies (0=don't align)
-align_pp_define_span                     = 3        # number
-
-# Align lines that start with '<<' with previous '<<'. Default=true
-align_left_shift                         = true     # false/true
-
-#
-# Newline adding and removing options
-#
-
-# Whether to collapse empty blocks between '{' and '}'
-nl_collapse_empty_body                   = true    # false/true
-
-# Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
-nl_assign_leave_one_liners               = false     # false/true
-
-# Don't split one-line braced statements inside a class xx { } body
-nl_class_leave_one_liners                = false     # false/true
-
-# Don't split one-line enums: 'enum foo { BAR = 15 };'
-nl_enum_leave_one_liners                 = false    # false/true
-
-# Don't split one-line get or set functions
-nl_getset_leave_one_liners               = false    # false/true
-
-# Don't split one-line function definitions - 'int foo() { return 0; }'
-nl_func_leave_one_liners                 = false    # false/true
-
-# Don't split one-line if/else statements - 'if(a) b++;'
-nl_if_leave_one_liners                   = false    # false/true
-
-# Add or remove newlines at the start of the file
-nl_start_of_file                         = remove   # ignore/add/remove/force
-
-# The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
-nl_start_of_file_min                     = 0        # number
-
-# Add or remove newline at the end of the file
-nl_end_of_file                           = force    # ignore/add/remove/force
-
-# The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
-nl_end_of_file_min                       = 1        # number
-
-# Add or remove newline between '=' and '{'
-nl_assign_brace                          = force      # ignore/add/remove/force
-
-# Add or remove newline between '=' and '[' (D only)
-nl_assign_square                         = force   # ignore/add/remove/force
-
-# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
-nl_after_square_assign                   = force   # ignore/add/remove/force
-
-# The number of newlines after a block of variable definitions
-nl_func_var_def_blk                      = 1        # number
-
-# Add or remove newline between a function call's ')' and '{', as in:
-# list_for_each(item, &list) { }
-nl_fcall_brace                           = force      # ignore/add/remove/force
-
-# Add or remove newline between 'enum' and '{'
-nl_enum_brace                            = force    # ignore/add/remove/force
-
-# Add or remove newline between 'struct and '{'
-nl_struct_brace                          = force    # ignore/add/remove/force
-
-# Add or remove newline between 'union' and '{'
-nl_union_brace                           = force    # ignore/add/remove/force
-
-# Add or remove newline between 'if' and '{'
-nl_if_brace                              = force      # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'else'
-nl_brace_else                            = force      # ignore/add/remove/force
-
-# Add or remove newline between 'else if' and '{'
-# If set to ignore, nl_if_brace is used instead
-nl_elseif_brace                          = force   # ignore/add/remove/force
-
-# Add or remove newline between 'else' and '{'
-nl_else_brace                            = force      # ignore/add/remove/force
-
-# Add or remove newline between 'else' and 'if'
-nl_else_if                               = remove   # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'finally'
-nl_brace_finally                         = force   # ignore/add/remove/force
-
-# Add or remove newline between 'finally' and '{'
-nl_finally_brace                         = force   # ignore/add/remove/force
-
-# Add or remove newline between 'try' and '{'
-nl_try_brace                             = force   # ignore/add/remove/force
-
-# Add or remove newline between get/set and '{'
-nl_getset_brace                          = force    # ignore/add/remove/force
-
-# Add or remove newline between 'for' and '{'
-nl_for_brace                             = force      # ignore/add/remove/force
-
-# Add or remove newline between 'catch' and '{'
-nl_catch_brace                           = force   # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'catch'
-nl_brace_catch                           = force   # ignore/add/remove/force
-
-# Add or remove newline between 'while' and '{'
-nl_while_brace                           = force      # ignore/add/remove/force
-
-# Add or remove newline between 'do' and '{'
-nl_do_brace                              = force      # ignore/add/remove/force
-
-# Add or remove newline between '}' and 'while' of 'do' statement
-nl_brace_while                           = force   # ignore/add/remove/force
-
-# Add or remove newline between 'switch' and '{'
-nl_switch_brace                          = force      # ignore/add/remove/force
-
-# Add or remove newline when condition spans two or more lines
-nl_multi_line_cond                       = false    # false/true
-
-# Force a newline in a define after the macro name for multi-line defines.
-nl_multi_line_define                     = true     # false/true
-
-# Whether to put a newline before 'case' statement
-nl_before_case                           = true     # false/true
-
-# Add or remove newline between ')' and 'throw'
-nl_before_throw                          = ignore   # ignore/add/remove/force
-
-# Whether to put a newline after 'case' statement
-nl_after_case                            = true     # false/true
-
-# Newline between namespace and {
-nl_namespace_brace                       = add   # ignore/add/remove/force
-
-# Add or remove newline between 'template<>' and whatever follows.
-nl_template_class                        = add   # ignore/add/remove/force
-
-# Add or remove newline between 'class' and '{'
-nl_class_brace                           = add   # ignore/add/remove/force
-
-# Add or remove newline after each ',' in the constructor member initialization
-nl_class_init_args                       = force   # ignore/add/remove/force
-
-# Add or remove newline between return type and function name in definition
-nl_func_type_name                        = ignore   # ignore/add/remove/force
-
-# Add or remove newline between return type and function name in a prototype
-nl_func_proto_type_name                  = remove   # ignore/add/remove/force
-
-# Add or remove newline between a function name and the opening '('
-nl_func_paren                            = remove   # ignore/add/remove/force
-
-# Add or remove newline after '(' in a function declaration
-nl_func_decl_start                       = remove   # ignore/add/remove/force
-
-# Add or remove newline after each ',' in a function declaration
-nl_func_decl_args                        = remove   # ignore/add/remove/force
-
-# Add or remove newline before the ')' in a function declaration
-nl_func_decl_end                         = remove   # ignore/add/remove/force
-
-# Add or remove newline between function signature and '{'
-nl_fdef_brace                            = add      # ignore/add/remove/force
-
-# Whether to put a newline after 'return' statement
-nl_after_return                          = true     # false/true
-
-# Add or remove a newline between the return keyword and return expression.
-nl_return_expr                           = remove   # ignore/add/remove/force
-
-# Whether to put a newline after semicolons, except in 'for' statements
-nl_after_semicolon                       = true     # false/true
-
-# Whether to put a newline after brace open.
-# This also adds a newline before the matching brace close.
-nl_after_brace_open                      = true     # false/true
-
-# If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
-# placed between the open brace and a trailing single-line comment.
-nl_after_brace_open_cmt                  = false    # false/true
-
-# Whether to put a newline after a virtual brace open.
-# These occur in un-braced if/while/do/for statement bodies.
-nl_after_vbrace_open                     = true    # false/true
-
-# Whether to alter newlines in '#define' macros
-nl_define_macro                          = true    # false/true
-
-# Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
-nl_squeeze_ifdef                         = false     # false/true
-
-# Add or remove newline before 'if'
-nl_before_if                             = ignore   # ignore/add/remove/force
-
-# Add or remove newline after 'if'
-nl_after_if                              = ignore   # ignore/add/remove/force
-
-# Add or remove newline before 'for'
-nl_before_for                            = ignore   # ignore/add/remove/force
-
-# Add or remove newline after 'for'
-nl_after_for                             = ignore   # ignore/add/remove/force
-
-# Add or remove newline before 'while'
-nl_before_while                          = ignore   # ignore/add/remove/force
-
-# Add or remove newline after 'while'
-nl_after_while                           = ignore   # ignore/add/remove/force
-
-# Add or remove newline before 'switch'
-nl_before_switch                         = force   # ignore/add/remove/force
-
-# Add or remove newline after 'switch'
-nl_after_switch                          = force   # ignore/add/remove/force
-
-# Add or remove newline before 'do'
-nl_before_do                             = ignore   # ignore/add/remove/force
-
-# Add or remove newline after 'do'
-nl_after_do                              = ignore   # ignore/add/remove/force
-
-# Whether to double-space commented-entries in struct/enum
-nl_ds_struct_enum_cmt                    = false    # false/true
-
-# Whether to double-space before the close brace of a struct/union/enum
-nl_ds_struct_enum_close_brace            = false    # false/true
-
-# Add or remove a newline around a class colon.
-# Related to pos_class_colon, nl_class_init_args, and pos_comma.
-nl_class_colon                           = ignore   # ignore/add/remove/force
-
-# Change simple unbraced if statements into a one-liner
-# 'if(b)\n i++;' => 'if(b) i++;'
-nl_create_if_one_liner                   = false    # false/true
-
-# Change simple unbraced for statements into a one-liner
-# 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);'
-nl_create_for_one_liner                  = false    # false/true
-
-# Change simple unbraced while statements into a one-liner
-# 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);'
-nl_create_while_one_liner                = false    # false/true
-
-#
-# Positioning options
-#
-
-# The position of arithmetic operators in wrapped expressions
-pos_arith                                = lead   # ignore/lead/trail
-
-# The position of assignment in wrapped expressions
-pos_assign                               = trail   # ignore/lead/trail
-
-# The position of boolean operators in wrapped expressions
-pos_bool                                 = lead    # ignore/lead/trail
-
-# The position of the comma in wrapped expressions
-pos_comma                                = trail   # ignore/lead/trail
-
-# The position of the comma in the constructor initialization list
-pos_class_comma                          = trail   # ignore/lead/trail
-
-# The position of colons between constructor and member initialization
-pos_class_colon                          = lead   # ignore/lead/trail
-
-#
-# Line Splitting options
-#
-
-# Try to limit code width to N number of columns
-code_width                               = 76        # number
-
-# Whether to fully split long 'for' statements at semi-colons
-ls_for_split_full                        = true    # false/true
-
-# Whether to fully split long function protos/calls at commas
-ls_func_split_full                       = true    # false/true
-
-#
-# Blank line options
-#
-
-# The maximum consecutive newlines
-nl_max                                   = 4        # number
-
-# The number of newlines after a function prototype, if followed by another function prototype
-nl_after_func_proto                      = 0        # number
-
-# The number of newlines after a function prototype, if not followed by another function prototype
-nl_after_func_proto_group                = 3        # number
-
-# The number of newlines after '}' of a multi-line function body
-nl_after_func_body                       = 3        # number
-
-# The number of newlines after '}' of a single line function body
-nl_after_func_body_one_liner             = 1        # number
-
-# The minimum number of newlines before a multi-line comment.
-# Doesn't apply if after a brace open or another multi-line comment.
-nl_before_block_comment                  = 2        # number
-
-# The minimum number of newlines before a single-line C comment.
-# Doesn't apply if after a brace open or other single-line C comments.
-nl_before_c_comment                      = 1        # number
-
-# The minimum number of newlines before a CPP comment.
-# Doesn't apply if after a brace open or other CPP comments.
-nl_before_cpp_comment                    = 0        # number
-
-# Whether to force a newline after a mulit-line comment.
-nl_after_multiline_comment               = false    # false/true
-
-# The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
-# Will not change the newline count if after a brace open.
-# 0 = No change.
-nl_before_access_spec                    = 1        # number
-
-# The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
-# 0 = No change.
-nl_after_access_spec                     = 1        # number
-
-# The number of newlines between a function def and the function comment.
-# 0 = No change.
-nl_comment_func_def                      = 0        # number
-
-# Whether to remove blank lines after '{'
-eat_blanks_after_open_brace              = true     # false/true
-
-# Whether to remove blank lines before '}'
-eat_blanks_before_close_brace            = true     # false/true
-
-#
-# Code modifying options (non-whitespace)
-#
-
-# Add or remove braces on single-line 'do' statement
-mod_full_brace_do                        = add      # ignore/add/remove/force
-
-# Add or remove braces on single-line 'for' statement
-mod_full_brace_for                       = add      # ignore/add/remove/force
-
-# Add or remove braces on single-line function defintions. (Pawn)
-mod_full_brace_function                  = ignore   # ignore/add/remove/force
-
-# Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
-mod_full_brace_if                        = ignore      # ignore/add/remove/force
-
-# Don't remove braces around statements that span N newlines
-mod_full_brace_nl                        = 0        # number
-
-# Add or remove braces on single-line 'while' statement
-mod_full_brace_while                     = add      # ignore/add/remove/force
-
-# Add or remove unnecessary paren on 'return' statement
-mod_paren_on_return                      = remove      # ignore/add/remove/force
-
-# Whether to change optional semicolons to real semicolons
-mod_pawn_semicolon                       = false    # false/true
-
-# Add parens on 'while' and 'if' statement around bools
-mod_full_paren_if_bool                   = true     # false/true
-
-# Whether to remove superfluous semicolons
-mod_remove_extra_semicolon               = true     # false/true
-
-# If a function body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_function_closebrace_comment = 5        # number
-
-# If a switch body exceeds the specified number of newlines and doesn't have a comment after
-# the close brace, a comment will be added.
-mod_add_long_switch_closebrace_comment   = 5        # number
-
-# If TRUE, will sort consecutive single-line 'import' statements [Java, D]
-mod_sort_import                          = false    # false/true
-
-# If TRUE, will sort consecutive single-line 'using' statements [C#]
-mod_sort_using                           = false    # false/true
-
-# If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
-# This is generally a bad idea, as it may break your code.
-mod_sort_include                         = false    # false/true
-
-# If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
-mod_move_case_break                      = false    # false/true
-
-# If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
-mod_remove_empty_return                  = true     # false/true
-
-#
-# Comment modifications
-#
-
-# Try to wrap comments at cmt_width columns
-cmt_width                                = 0        # number
-
-# If false, disable all multi-line comment changes, including cmt_width and leading chars.
-# Default is true.
-cmt_indent_multi                         = true     # false/true
-
-# Whether to group c-comments that look like they are in a block
-cmt_c_group                              = false    # false/true
-
-# Whether to put an empty '/*' on the first line of the combined c-comment
-cmt_c_nl_start                           = false    # false/true
-
-# Whether to put a newline before the closing '*/' of the combined c-comment
-cmt_c_nl_end                             = false    # false/true
-
-# Whether to group cpp-comments that look like they are in a block
-cmt_cpp_group                            = false    # false/true
-
-# Whether to put an empty '/*' on the first line of the combined cpp-comment
-cmt_cpp_nl_start                         = false    # false/true
-
-# Whether to put a newline before the closing '*/' of the combined cpp-comment
-cmt_cpp_nl_end                           = false    # false/true
-
-# Whether to change cpp-comments into c-comments
-cmt_cpp_to_c                             = false    # false/true
-
-# Whether to put a star on subsequent comment lines
-cmt_star_cont                            = true     # false/true
-
-# The number of spaces to insert at the start of subsequent comment lines
-cmt_sp_before_star_cont                  = 0        # number
-
-# The number of spaces to insert after the star on subsequent comment lines
-cmt_sp_after_star_cont                   = 1        # number
-
-# For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
-# the comment are the same length. Default=True
-cmt_multi_check_last                     = true     # false/true
-
-# The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
-# Will substitue $(filename) with the current file's name.
-cmt_insert_file_header                   = ""         # string
-
-# The filename that contains text to insert before a function implementation if the function isn't preceeded with a C/C++ comment.
-# Will substitue $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
-# Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
-cmt_insert_func_header                   = ""         # string
-
-# The filename that contains text to insert before a class if the class isn't preceeded with a C/C++ comment.
-# Will substitue $(class) with the class name.
-cmt_insert_class_header                  = ""         # string
-
-# If a preprocessor is encountered when stepping backwards from a function name, then
-# this option decides whether the comment should be inserted.
-# Affects cmt_insert_func_header and cmt_insert_class_header.
-cmt_insert_before_preproc                = false    # false/true
-
-#
-# Preprocessor options
-#
-
-# Control indent of preprocessors inside #if blocks at brace level 0
-pp_indent                                = remove    # ignore/add/remove/force
-
-# Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
-pp_indent_at_level                       = false    # false/true
-
-# If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
-pp_indent_count                          = 1        # number
-
-# Add or remove space after # based on pp_level of #if blocks
-pp_space                                 = add   # ignore/add/remove/force
-
-# Sets the number of spaces added with pp_space
-pp_space_count                           = 1        # number
-
-# The indent for #region and #endregion in C# and '#pragma region' in C/C++
-pp_indent_region                         = 0        # number
-
-# Whether to indent the code between #region and #endregion
-pp_region_indent_code                    = false    # false/true
-
-# If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
-pp_indent_if                             = 0        # number
-
-# Control whether to indent the code between #if, #else and #endif when not at file-level
-pp_if_indent_code                        = false    # false/true
-
-# Whether to indent '#define' at the brace level (true) or from column 1 (false)
-pp_define_at_level                       = false    # false/true
-
-# You can force a token to be a type with the 'type' option.
-# Example:
-# type myfoo1 myfoo2
-#
-# You can create custom macro-based indentation using macro-open,
-# macro-else and macro-close.
-# Example:
-# macro-open  BEGIN_TEMPLATE_MESSAGE_MAP
-# macro-open  BEGIN_MESSAGE_MAP
-# macro-close END_MESSAGE_MAP
-#
-# You can assign any keyword to any type with the set option.
-# set func_call_user _ N_
@@ -1,526 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#ifdef _SYS_FEATURE_TESTS_H
-#error "You should include config.h as your first include file"
-#endif
-
-#ifdef WIN32
-#define _WIN32_WINNT 0x0501
-#endif
-
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define to 1 if you have the `abi::__cxa_demangle' function. */
-#undef HAVE_ABI_CXA_DEMANGLE
-
-/* Define to 1 if you have the <assert.h> header file. */
-#undef HAVE_ASSERT_H
-
-/* Define to 1 if you have the `atomic_add_32' function. */
-#undef HAVE_ATOMIC_ADD_32
-
-/* Define to 1 if you have the `atomic_add_64' function. */
-#undef HAVE_ATOMIC_ADD_64
-
-/* Define to 1 if you have the <atomic.h> header file. */
-#undef HAVE_ATOMIC_H
-
-/* Define to 1 if you have the `backtrace' function. */
-#undef HAVE_BACKTRACE
-
-/* Define to 1 if you have the `backtrace_symbols_fd' function. */
-#undef HAVE_BACKTRACE_SYMBOLS_FD
-
-/* Have a working clock_gettime function */
-#undef HAVE_CLOCK_GETTIME
-
-/* Define to 1 if you have the <cxxabi.h> header file. */
-#undef HAVE_CXXABI_H
-
-/* Define to 1 if you have the declaration of `madvise', and to 0 if you
-   don't. */
-#undef HAVE_DECL_MADVISE
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Enables DTRACE Support */
-#undef HAVE_DTRACE
-
-/* Define to 1 if you have the `event_base_free' function. */
-#undef HAVE_EVENT_BASE_FREE
-
-/* Define to 1 if you have the `event_base_get_method' function. */
-#undef HAVE_EVENT_BASE_GET_METHOD
-
-/* Define to 1 if you have the `event_base_new' function. */
-#undef HAVE_EVENT_BASE_NEW
-
-/* Define to 1 if you have the <execinfo.h> header file. */
-#undef HAVE_EXECINFO_H
-
-/* Define to 1 if you have the <fnmatch.h> header file. */
-#undef HAVE_FNMATCH_H
-
-/* Define to 1 if compiler provides atomic builtins. */
-#undef HAVE_GCC_ATOMIC_BUILTINS
-
-/* Define to 1 if you have the `getline' function. */
-#undef HAVE_GETLINE
-
-/* Enables hsieh hashing support */
-#undef HAVE_HSIEH_HASH
-
-/* Have ntohll */
-#undef HAVE_HTONLL
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `bind' library (-lbind). */
-#undef HAVE_LIBBIND
-
-/* Define to 1 if you have the `c_p' library (-lc_p). */
-#undef HAVE_LIBC_P
-
-/* Define if you have the event library. */
-#undef HAVE_LIBEVENT
-
-/* Define if you have the gtest library. */
-#undef HAVE_LIBGTEST
-
-/* Define if you have the innodb library. */
-#undef HAVE_LIBINNODB
-
-/* Enables libmemcachedutil Support */
-#undef HAVE_LIBMEMCACHEDUTIL
-
-/* Define to 1 if you have the `mtmalloc' library (-lmtmalloc). */
-#undef HAVE_LIBMTMALLOC
-
-/* Define if you have the sasl library. */
-#undef HAVE_LIBSASL
-
-/* Define if you have the sasl2 library. */
-#undef HAVE_LIBSASL2
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-#undef HAVE_LIBSOCKET
-
-/* Define to 1 if you have the `tcmalloc' library (-ltcmalloc). */
-#undef HAVE_LIBTCMALLOC
-
-/* Define to 1 if you have the `tcmalloc-minimal' library
-   (-ltcmalloc-minimal). */
-#undef HAVE_LIBTCMALLOC_MINIMAL
-
-/* Define to 1 if you have the `umem' library (-lumem). */
-#undef HAVE_LIBUMEM
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* For some non posix threads */
-#undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC
-
-/* For some non posix threads */
-#undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
-
-/* sigwait with one argument */
-#undef HAVE_NONPOSIX_SIGWAIT
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H
-
-/* Define to 1 if you have the `printstack' function. */
-#undef HAVE_PRINTSTACK
-
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
-
-/* Define to 1 if you have the `pthread_attr_create' function. */
-#undef HAVE_PTHREAD_ATTR_CREATE
-
-/* Define to 1 if you have the `pthread_attr_getstacksize' function. */
-#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
-
-/* Define to 1 if you have the `pthread_attr_setprio' function. */
-#undef HAVE_PTHREAD_ATTR_SETPRIO
-
-/* Define to 1 if you have the `pthread_attr_setschedparam' function. */
-#undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM
-
-/* pthread_attr_setscope */
-#undef HAVE_PTHREAD_ATTR_SETSCOPE
-
-/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
-#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
-
-/* Define to 1 if you have the `pthread_condattr_create' function. */
-#undef HAVE_PTHREAD_CONDATTR_CREATE
-
-/* Define to 1 if you have the `pthread_getsequence_np' function. */
-#undef HAVE_PTHREAD_GETSEQUENCE_NP
-
-/* Define to 1 if you have the `pthread_key_delete' function. */
-#undef HAVE_PTHREAD_KEY_DELETE
-
-/* Define to 1 if you have the `pthread_rwlock_rdlock' function. */
-#undef HAVE_PTHREAD_RWLOCK_RDLOCK
-
-/* Define to 1 if you have the `pthread_setprio' function. */
-#undef HAVE_PTHREAD_SETPRIO
-
-/* Define to 1 if you have the `pthread_setprio_np' function. */
-#undef HAVE_PTHREAD_SETPRIO_NP
-
-/* Define to 1 if you have the `pthread_setschedparam' function. */
-#undef HAVE_PTHREAD_SETSCHEDPARAM
-
-/* Define to 1 if you have the `pthread_sigmask' function. */
-#undef HAVE_PTHREAD_SIGMASK
-
-/* Define to 1 if you have the `pthread_yield_np' function. */
-#undef HAVE_PTHREAD_YIELD_NP
-
-/* pthread_yield function with one argument */
-#undef HAVE_PTHREAD_YIELD_ONE_ARG
-
-/* pthread_yield that doesn't take any arguments */
-#undef HAVE_PTHREAD_YIELD_ZERO_ARG
-
-/* Define to 1 if you have a working SO_RCVTIMEO */
-#undef HAVE_RCVTIMEO
-
-/* POSIX readdir_r */
-#undef HAVE_READDIR_R
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
-   and to 0 otherwise. */
-#undef HAVE_REALLOC
-
-/* Define to 1 if you have the `rwlock_init' function. */
-#undef HAVE_RWLOCK_INIT
-
-/* POSIX sigwait */
-#undef HAVE_SIGWAIT
-
-/* Define to 1 if you have a working SO_SNDTIMEO */
-#undef HAVE_SNDTIMEO
-
-/* Define if g++ supports C++0x features. */
-#undef HAVE_STDCXX_0X
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/wait.h> header file. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <ucontext.h> header file. */
-#undef HAVE_UCONTEXT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
-   declarations. */
-#undef HAVE_VISIBILITY
-
-/* Define to 1 if you have the <winsock2.h> header file. */
-#undef HAVE_WINSOCK2_H
-
-/* CPU of Build System */
-#undef HOST_CPU
-
-/* OS of Build System */
-#undef HOST_OS
-
-/* Vendor of Build System */
-#undef HOST_VENDOR
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Name of the memcached binary used in make test */
-#undef MEMCACHED_BINARY
-
-/* Define to 1 if assertions should be disabled. */
-#undef NDEBUG
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to necessary symbol if this constant uses a non-standard name on
-   your system. */
-#undef PTHREAD_CREATE_JOINABLE
-
-/* Size of long long as computed by sizeof() */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* Size of size_t as computed by sizeof() */
-#undef SIZEOF_SIZE_T
-
-/* Define if ISO C++ 1998 header files are present. */
-#undef STDCXX_98_HEADERS
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* CPU of Target System */
-#undef TARGET_CPU
-
-/* OS of Target System */
-#undef TARGET_OS
-
-/* Whether we are building for FreeBSD */
-#undef TARGET_OS_FREEBSD
-
-/* Whether we build for Linux */
-#undef TARGET_OS_LINUX
-
-/* Whether we build for OSX */
-#undef TARGET_OS_OSX
-
-/* Whether we are building for Solaris */
-#undef TARGET_OS_SOLARIS
-
-/* Vendor of Target System */
-#undef TARGET_VENDOR
-
-/* Define to 1 if time_t is unsigned */
-#undef TIME_T_UNSIGNED
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#undef TM_IN_SYS_TIME
-
-/* Define to true if you want to use functions from atomic.h */
-#undef USE_ATOMIC_H
-
-/* Define to true if you need to test for eagain */
-#undef USE_EAGAIN
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-
-/* Version number of package */
-#undef VERSION
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-#  undef WORDS_BIGENDIAN
-# endif
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Cause Sun Studio to not be quite so strict with standards conflicts */
-#undef _STLP_NO_NEW_C_HEADERS
-
-/* Workaround for bug in FreeBSD headers */
-#undef __APPLE_CC__
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
-/* Define to the equivalent of the C99 'restrict' keyword, or to
-   nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
-#undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
-   __restrict__, even though the corresponding Sun C compiler ends up with
-   "#define restrict _Restrict" or "#define restrict __restrict__" in the
-   previous line.  Perhaps some future version of Sun C++ will work with
-   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
-#if defined __SUNPRO_CC && !defined __RESTRICT
-# define _Restrict
-# define __restrict__
-#endif
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
-   code using `volatile' can become incorrect without. Disable with care. */
-#undef volatile
-
-
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#ifdef HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#else
-#include "poll/poll.h"
-#endif
-
-/* 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 ;-)
- */
-#ifdef WIN32
-#include "win32/wrappers.h"
-#define get_socket_errno() WSAGetLastError()
-#else
-#define INVALID_SOCKET -1
-#define SOCKET_ERROR -1
-#define closesocket(a) close(a)
-#define get_socket_errno() errno
-#endif
-
-#endif
-
-
-
-#ifdef __cplusplus
-#include <cstdio>
-#define PANDORA_PRINTSTACK_STD_PREFIX std::
-#else
-#include <stdio.h>
-#define PANDORA_PRINTSTACK_STD_PREFIX
-#endif
-
-#if defined(HAVE_UCONTEXT_H) && defined(HAVE_PRINTSTACK)
-#include <ucontext.h>
-#define pandora_print_callstack(a) \
-printstack(PANDORA_PRINTSTACK_STD_PREFIX fileno(a))
-#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD)
-
-#include <execinfo.h>
-
-#define pandora_print_callstack(a) \
-{ \
-  void *stack[100];  \
-  int depth = backtrace(stack, 100); \
-  backtrace_symbols_fd(stack, depth, PANDORA_PRINTSTACK_STD_PREFIX fileno(a)); \
-}
-#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && !defined(HAVE_BACKTRACE_SYMBOLS_FD)
-
-#include <execinfo.h>
-
-#define pandora_print_callstack(a) \
-{ \
-  void *stack[100];  \
-  int depth= backtrace(stack, 100); \
-  char **symbol= backtrace_symbols(stack, depth); \
-  for (int x= 0; x < size; ++x) \
-    PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, "%s\n", symbol[x]); \
-}
-#else
-#define pandora_print_callstack(a) \
-    PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, \
-      "Stackdump not supported for this platform\n");
-#endif
-  
@@ -1,14 +1,11 @@
 #! /bin/sh
-# Grabbing changelog and version information from bzr
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for libmemcached 0.44.
+# Generated by GNU Autoconf 2.69 for libmemcached 1.0.18.
 #
 # Report bugs to <http://libmemcached.org/>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -92,6 +89,7 @@ fi
 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
@@ -136,6 +134,31 @@ 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
@@ -169,12 +192,21 @@ 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\$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 \$(( 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
@@ -214,14 +246,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # 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.
-	BASH_ENV=/dev/null
-	ENV=/dev/null
-	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+  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 :
@@ -320,10 +363,18 @@ $as_echo X"$as_dir" |
       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"
+  } || 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
@@ -360,19 +411,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -445,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   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).
@@ -479,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... 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 -p'.
+    # 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 -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -500,28 +555,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+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'"
@@ -529,161 +564,14 @@ 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'"
 
-
-
-# Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-$*
-_LT_EOF
-  exit 0
-fi
-
-# 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
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
-
-	  if test "$prev" != 'sed 50q "$0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# 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`
 
@@ -702,12 +590,11 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libmemcached'
 PACKAGE_TARNAME='libmemcached'
-PACKAGE_VERSION='0.44'
-PACKAGE_STRING='libmemcached 0.44'
+PACKAGE_VERSION='1.0.18'
+PACKAGE_STRING='libmemcached 1.0.18'
 PACKAGE_BUGREPORT='http://libmemcached.org/'
 PACKAGE_URL=''
 
-ac_unique_file="libmemcached/memcached.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -744,112 +631,124 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
+ac_unique_file="libmemcached/memcached.cc"
 ac_header_list=
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
-BUILD_WIN32_WRAPPERS_FALSE
-BUILD_WIN32_WRAPPERS_TRUE
-BUILD_POLL_FALSE
-BUILD_POLL_TRUE
-BUILD_DOCS_FALSE
-BUILD_DOCS_TRUE
-PODCHECKER
-POD2MAN
+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
-HAVE_LIBSASL2_FALSE
-HAVE_LIBSASL2_TRUE
-HAVE_LIBSASL_FALSE
-HAVE_LIBSASL_TRUE
-LIBSASL2_PREFIX
-LTLIBSASL2
-LIBSASL2
-HAVE_LIBSASL2
-LIBSASL_PREFIX
-LTLIBSASL
-LIBSASL
-HAVE_LIBSASL
-HAVE_LIBINNODB_FALSE
-HAVE_LIBINNODB_TRUE
-LIBINNODB_PREFIX
-LTLIBINNODB
-LIBINNODB
-HAVE_LIBINNODB
-DEPRECATED
-MEMC_BINARY
-INCLUDE_HSIEH_SRC_FALSE
-INCLUDE_HSIEH_SRC_TRUE
-BUILD_LIBMEMCACHEDUTIL_FALSE
-BUILD_LIBMEMCACHEDUTIL_TRUE
-BUILD_BYTEORDER_FALSE
-BUILD_BYTEORDER_TRUE
+SASL_LIB
+LIBSASL_LDFLAGS
+LIBSASL_CPPFLAGS
 PTHREAD_CFLAGS
 PTHREAD_LIBS
 PTHREAD_CC
-acx_pthread_config
+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_PREFIX
-LTLIBEVENT
-LIBEVENT
-HAVE_LIBEVENT
-HAVE_LIBGTEST_FALSE
-HAVE_LIBGTEST_TRUE
-LIBGTEST_PREFIX
-LTLIBGTEST
-LIBGTEST
-HAVE_LIBGTEST
-HASHKIT_LIBRARY_VERSION
-MEMCACHED_LIBRARY_VERSION
-MEMCACHED_PROTOCAL_LIBRARY_VERSION
-MEMCACHED_UTIL_LIBRARY_VERSION
-AM_LDFLAGS
-AM_CPPFLAGS
-AM_CXXFLAGS
-AM_CFLAGS
-HAVE_DPKG_GENSYMBOLS_FALSE
-HAVE_DPKG_GENSYMBOLS_TRUE
-DPKG_GENSYMBOLS
-PERL
-DOXYGEN
-BETTER_MALLOC_LIBS
+LIBEVENT_LIB
+BUILD_CACHE_FALSE
+BUILD_CACHE_TRUE
 LIBOBJS
-DTRACE_NEEDS_OBJECTS_FALSE
-DTRACE_NEEDS_OBJECTS_TRUE
-HAVE_DTRACE_FALSE
-HAVE_DTRACE_TRUE
-DTRACEFLAGS
-DTRACE
-GCOV_LIBS
-NO_WERROR
-INNOBASE_SKIP_WARNINGS
-BOOSTSKIP_WARNINGS
-PROTOSKIP_WARNINGS
-NO_OLD_STYLE_CAST
-NO_EFF_CXX
-NO_STRICT_ALIASING
-NO_SHADOW
-NO_UNREACHED
-NO_REDUNDANT_DECLS
-NO_CONVERSION
-LIBC_P
-HAVE_VISIBILITY
-CFLAG_VISIBILITY
+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
-CXX_VERSION
-CC_VERSION
-CXX_STANDARD
 CXXCPP
 OTOOL64
 OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
-lt_ECHO
+MANIFEST_TOOL
 RANLIB
+ac_ct_AR
 AR
+DLLTOOL
 OBJDUMP
 LN_S
 NM
@@ -859,40 +758,33 @@ LD
 FGREP
 SED
 LIBTOOL
-PANDORA_OPTIMIZE_BITFIELD
-TARGET_FREEBSD
-TARGET_SOLARIS
-TARGET_OSX
-TARGET_LINUX
-EGREP
-GREP
-CPP
+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
-ac_ct_CXX
-CXXFLAGS
-CXX
-PANDORA_HEX_VERSION
-ISAINFO
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
 am__quote
 am__include
 DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
 am__untar
 am__tar
 AMTAR
@@ -916,10 +808,9 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
-target_os
-target_vendor
-target_cpu
-target
+EGREP
+GREP
+CPP
 host_os
 host_vendor
 host_cpu
@@ -928,6 +819,16 @@ 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
@@ -969,41 +870,33 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
-enable_fat_binaries
-enable_silent_rules
 enable_dependency_tracking
-enable_64bit
-enable_static
+enable_silent_rules
 enable_shared
+enable_static
 with_pic
 enable_fast_install
 with_gnu_ld
+with_sysroot
 enable_libtool_lock
-enable_largefile
-with_debug
+enable_debug
 enable_assert
-enable_profiling
-enable_coverage
-enable_dtrace
-with_lib_prefix
-enable_umem
-enable_tcmalloc
-enable_mtmalloc
-enable_libgtest
-enable_rpath
-with_libgtest_prefix
-enable_libevent
-with_libevent_prefix
-enable_utils
+enable_libmemcachedprotocol
+with_mysql
+with_gearmand
 enable_hsieh_hash
-with_memcached
+enable_murmur_hash
+enable_fnv64_hash
+enable_memaslap
 enable_deprecated
-enable_libinnodb
-with_libinnodb_prefix
+with_memcached
+with_sphinx_build
+with_lcov
+with_genhtml
 enable_sasl
-with_libsasl_prefix
-with_libsasl2_prefix
-with_docs
+enable_dtrace
+with_sanitize
+enable_jobserver
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1017,7 +910,19 @@ CXX
 CXXFLAGS
 CCC
 CPP
-CXXCPP'
+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.
@@ -1080,8 +985,9 @@ do
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1126,7 +1032,7 @@ do
     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"
+      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
@@ -1152,7 +1058,7 @@ do
     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"
+      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
@@ -1356,7 +1262,7 @@ do
     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"
+      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
@@ -1372,7 +1278,7 @@ do
     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"
+      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
@@ -1402,8 +1308,8 @@ do
   | --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."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1411,7 +1317,7 @@ Try \`$0 --help' for more information."
     # 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'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1421,7 +1327,7 @@ Try \`$0 --help' for more information."
     $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}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1429,13 +1335,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  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" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1458,7 +1364,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  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'
@@ -1472,8 +1378,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1488,9 +1392,9 @@ 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"
+  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"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1529,11 +1433,11 @@ else
 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"
+  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"
+	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
@@ -1559,7 +1463,7 @@ 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 0.44 to adapt to many kinds of systems.
+\`configure' configures libmemcached 1.0.18 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1573,7 +1477,7 @@ Configuration:
       --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
+  -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
@@ -1624,13 +1528,12 @@ Program names:
 System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
 _ACEOF
 fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libmemcached 0.44:";;
+     short | recursive ) echo "Configuration of libmemcached 1.0.18:";;
    esac
   cat <<\_ACEOF
 
@@ -1638,58 +1541,55 @@ 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-fat-binaries   Enable fat binary support on OSX [default=off]
-  --enable-silent-rules          less verbose build output (undo: `make V=1')
-  --disable-silent-rules         verbose build output (undo: `make V=0')
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
-  --disable-64bit         Build 64 bit binary [default=on]
-  --enable-static[=PKGS]  build static libraries [default=no]
+  --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)
-  --disable-largefile     omit support for large files
-  --disable-assert        Turn off assertions
-  --enable-profiling      Toggle profiling [default=off]
-  --enable-coverage       Toggle coverage [default=off]
-  --disable-dtrace        Build with support for the DTRACE. [default=on]
-  --enable-umem           Enable linking with libumem [default=off]
-  --enable-tcmalloc       Enable linking with tcmalloc [default=off]
-  --disable-mtmalloc      Enable linking with mtmalloc [default=on]
-  --disable-libgtest      Build with libgtest support [default=on]
-  --disable-rpath         do not hardcode runtime library paths
-  --disable-libevent      Build with libevent support [default=on]
-  --disable-utils         Disable libmemcachedutils [default=on]
-  --enable-hsieh_hash     build with support for hsieh hashing.
-                          @<:default=off]
+  --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-libinnodb     Build with libinnodb support [default=on]
   --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              try to use only PIC/non-PIC objects [default=use
+  --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-debug            Add debug code/turns off optimizations (yes|no)
-                          [default=no]
-  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
-  --with-libgtest-prefix[=DIR]  search for libgtest in DIR/include and DIR/lib
-  --without-libgtest-prefix     don't search for libgtest in includedir and libdir
-  --with-libevent-prefix[=DIR]  search for libevent in DIR/include and DIR/lib
-  --without-libevent-prefix     don't search for libevent in includedir and libdir
-  --with-memcached        Memcached binary to use for make test
-  --with-libinnodb-prefix[=DIR]  search for libinnodb in DIR/include and DIR/lib
-  --without-libinnodb-prefix     don't search for libinnodb in includedir and libdir
-  --with-libsasl-prefix[=DIR]  search for libsasl in DIR/include and DIR/lib
-  --without-libsasl-prefix     don't search for libsasl in includedir and libdir
-  --with-libsasl2-prefix[=DIR]  search for libsasl2 in DIR/include and DIR/lib
-  --without-libsasl2-prefix     don't search for libsasl2 in includedir and libdir
-  --with-docs             Generate documentation (yes|no) [default=yes]
+  --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
@@ -1703,6 +1603,28 @@ Some influential environment variables:
   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.
@@ -1770,10 +1692,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libmemcached configure 0.44
-generated by GNU Autoconf 2.65
+libmemcached configure 1.0.18
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+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
@@ -1817,7 +1739,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1855,7 +1777,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -1881,7 +1803,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -1892,7 +1814,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1905,10 +1827,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1944,7 +1866,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+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; }
 
@@ -1967,17 +1889,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $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;}
-( cat <<\_ASBOX
-## --------------------------------------- ##
+( $as_echo "## --------------------------------------- ##
 ## Report this to http://libmemcached.org/ ##
-## --------------------------------------- ##
-_ASBOX
+## --------------------------------------- ##"
      ) | 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1986,7 +1906,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -2027,7 +1947,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -2041,7 +1961,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2059,49 +1979,10 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, 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_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $2
-  (void) $2;
-#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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -2129,7 +2010,7 @@ $as_echo "$ac_try_echo"; } >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
+	 test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2143,7 +2024,7 @@ fi
   # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2156,7 +2037,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2211,7 +2092,7 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2236,7 +2117,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -2247,7 +2128,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_cpp
@@ -2279,7 +2160,7 @@ $as_echo "$ac_try_echo"; } >&5
 	 test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
 	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
+	 test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2293,7 +2174,7 @@ fi
   # 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_link
@@ -2307,7 +2188,7 @@ 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=no"
@@ -2348,325 +2229,233 @@ 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_type
 
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
+# 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
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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 ()
 {
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+#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 :
-  ac_hi=$ac_mid; break
+  eval "$3=yes"
 else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+  eval "$3=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  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_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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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.  */
-$4
+$ac_includes_default
+	     enum { N = $2 / 2 - 1 };
 int
 main ()
 {
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+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 :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$4
+$ac_includes_default
+	        enum { N = $2 / 2 - 1 };
 int
 main ()
 {
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+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 :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
+
 else
-  ac_lo= ac_hi=
+  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
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+       if eval test \"x\$"$3"\" = x"no"; then :
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
 else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+  break
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
-  ac_retval=1
+     done
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
-  fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-  as_fn_set_status $ac_retval
+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_compute_int
+} # ac_fn_c_find_intX_t
 
-# ac_fn_cxx_check_decl LINENO SYMBOL VAR
-# --------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
-ac_fn_cxx_check_decl ()
+# 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 whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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.  */
-$4
+$ac_includes_default
 int
 main ()
 {
-#ifndef $2
-  (void) $2;
-#endif
+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_cxx_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
+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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
-} # ac_fn_cxx_check_decl
+} # ac_fn_c_find_uintX_t
 
-# ac_fn_cxx_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_cxx_check_header_mongrel ()
+# 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; 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_cxx_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_cxx_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err 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_cxx_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;}
-( cat <<\_ASBOX
-## --------------------------------------- ##
-## Report this to http://libmemcached.org/ ##
-## --------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
+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
-  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; }
+  $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
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  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_check_header_mongrel
+} # 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 0.44, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by libmemcached $as_me 1.0.18, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2776,11 +2565,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -2814,11 +2601,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -2831,11 +2616,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -2849,11 +2632,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -2908,7 +2689,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # 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
@@ -2923,7 +2709,11 @@ do
     { $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"
+    . "$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
 
@@ -2944,10 +2734,39 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
-as_fn_append ac_header_list " winsock2.h"
+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 " fnmatch.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
@@ -3003,7 +2822,7 @@ if $ac_cache_corrupted; then
 $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
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -3017,361 +2836,68 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-ac_aux_dir=
-for ac_dir in config "$srcdir"/config; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+# 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
-if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$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.
-
-
-
+  done
+IFS=$as_save_IFS
 
-  # Check whether --enable-fat-binaries was given.
-if test "${enable_fat_binaries+set}" = set; then :
-  enableval=$enable_fat_binaries; ac_enable_fat_binaries="$enableval"
-else
-  ac_enable_fat_binaries="no"
 fi
-
-
-    if test "x${enable_dependency_tracking}" = "x"; then :
-
-    enable_dependency_tracking=yes
-
 fi
-    if test "x${ac_enable_fat_binaries}" = "xyes"; then :
-
-    enable_dependency_tracking=no
-
+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
 
-# 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 test "${ac_cv_build+set}" = set; then :
+    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
-  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 test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-am__api_version='1.11'
-
-# 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 test "${ac_cv_path_install+set}" = set; 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# 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 (
-   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
-   rm -f conftest.file
-   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
-
-   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; }
-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"`
-
-# 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 --run true"; then
-  am_missing_run="$MISSING --run "
-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 test "${ac_cv_prog_STRIP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  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
@@ -3379,8 +2905,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+  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
@@ -3390,427 +2916,554 @@ 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; }
+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
-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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ;;
+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
-    STRIP=$ac_ct_STRIP
+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
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+  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 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 test "${ac_cv_path_mkdir+set}" = set; 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
-	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
+int
+main ()
+{
 
-  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; }
+  ;
+  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[^ ]*//'`
 
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
-  [\\/$]* | ?:[\\/]*) ;;
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
 
-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 test "${ac_cv_prog_AWK+set}" = set; 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
+ac_rmfiles=
+for ac_file in $ac_files
 do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+  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
-  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
-
+rm -f $ac_rmfiles
 
-  test -n "$AWK" && break
+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=
 
-{ $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; 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
+  ac_file=''
 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
+if test -z "$ac_file"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
+{ { $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
-  am__leading_dot=_
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-rmdir .tst 2>/dev/null
-
-DEPDIR="${am__leading_dot}deps"
+{ $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
 
-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
-  ;;
+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
-# 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
+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 <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
 
-{ $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;
+  ;
+  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; }
 
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
+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
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-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
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
+  ;
+  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
-  done
-IFS=$as_save_IFS
+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
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+{ $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
+  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
-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; }
+{ $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  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.  */
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+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
-    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
+    CFLAGS="-g"
   fi
 else
-  CC="$ac_cv_prog_CC"
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
 fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+{ $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
-  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
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+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
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
+  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
-  done
-IFS=$as_save_IFS
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
 
 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; }
+# 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
 
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
+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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
-  ac_prog_rejected=no
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
+  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
@@ -3818,44 +3471,34 @@ done
   done
 IFS=$as_save_IFS
 
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
 fi
 fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
+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 "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
+  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
@@ -3863,8 +3506,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+  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
@@ -3874,65 +3517,21 @@ IFS=$as_save_IFS
 
 fi
 fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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; }
+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_CC" && break
+  test -n "$ac_ct_CXX" && break
 done
 
-  if test "x$ac_ct_CC" = x; then
-    CC=""
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -3940,20 +3539,14 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    CC=$ac_ct_CC
+    CXX=$ac_ct_CXX
   fi
 fi
 
+  fi
 fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
 # Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+$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
@@ -3977,461 +3570,370 @@ $as_echo "$ac_try_echo"; } >&5
   test $ac_status = 0; }
 done
 
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{ $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
-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=
-
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
 else
-  ac_file=''
+  ac_compiler_gnu=no
 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
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+  GXX=
 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
+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.  */
 
-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
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=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 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; }
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+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.  */
-#include <stdio.h>
+
 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
+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
-    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
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&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
 
-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 test "${ac_cv_objext+set}" = set; then :
+
+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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  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
 
-  ;
-  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;;
+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
-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
+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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  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
 
-{ { $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
+{ $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
-{ $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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
 #endif
-
-  ;
-  return 0;
-}
+		     Syntax error
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
+if ac_fn_c_try_cpp "$LINENO"; then :
+
 else
-  ac_compiler_gnu=no
+  # Broken: fails on valid input.
+continue
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-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
+  # 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 <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
 else
-  GCC=
+  # Passes both tests.
+ac_preproc_ok=:
+break
 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 test "${ac_cv_prog_cc_g+set}" = set; 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.  */
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-int
-main ()
-{
+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
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
 else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_cpp "$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 ()
-{
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-  ;
-  return 0;
-}
+  # 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 <ac_nonexistent.h>
 _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
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
 else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
+  # Passes both tests.
+ac_preproc_ok=:
+break
 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 test "${ac_cv_prog_cc_c89+set}" = set; 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 <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* 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];
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-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 :
+# 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
@@ -4440,1523 +3942,1511 @@ 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
 
-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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+{ $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 "$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'.
-  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
+  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
 
-  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 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+      $ac_path_GREP_found && break 3
     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
-      ;;
-    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='#'
+  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
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
+  ac_cv_path_GREP=$GREP
 fi
 
-
-
-
-
-  # Check whether --enable-64bit was given.
-if test "${enable_64bit+set}" = set; then :
-  enableval=$enable_64bit; ac_enable_64bit="$enableval"
-else
-  ac_enable_64bit="yes"
 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"
 
 
-  for ac_prog in isainfo
-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 test "${ac_cv_prog_ISAINFO+set}" = set; then :
+{ $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 test -n "$ISAINFO"; then
-  ac_cv_prog_ISAINFO="$ISAINFO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+  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
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ISAINFO="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
+      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
-IFS=$as_save_IFS
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-fi
-fi
-ISAINFO=$ac_cv_prog_ISAINFO
-if test -n "$ISAINFO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ISAINFO" >&5
-$as_echo "$ISAINFO" >&6; }
+      $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_path_EGREP=$EGREP
 fi
 
-
-  test -n "$ISAINFO" && break
-done
-test -n "$ISAINFO" || ISAINFO="no"
-
-  if test "x$ISAINFO" != "xno"; then :
-  isainfo_b=`${ISAINFO} -b`
-else
-  isainfo_b="x"
+   fi
 fi
-
-  if test "$isainfo_b" != "x"; then :
+{ $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"
 
 
-    isainfo_k=`${ISAINFO} -k`
-    DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"
+{ $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-    if test "x$ac_enable_64bit" = "xyes"; then :
+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 "x${ac_cv_env_LDFLAGS_set}" = "x"; then :
+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 <string.h>
 
-        LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
 
+else
+  ac_cv_header_stdc=no
 fi
-
-      if test "x$libdir" = "x\${exec_prefix}/lib"; then :
-
-                     libdir="${libdir}/${isainfo_k}"
+rm -f conftest*
 
 fi
 
-      if test "x${ac_cv_env_CFLAGS_set}" = "x"; then :
+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 <stdlib.h>
 
-        CFLAGS="${CFLAGS} -m64"
-        ac_cv_env_CFLAGS_set=set
-        ac_cv_env_CFLAGS_value='-m64'
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
 
+else
+  ac_cv_header_stdc=no
 fi
-      if test "x${ac_cv_env_CXXFLAGS_set}" = "x"; then :
-
-        CXXFLAGS="${CXXFLAGS} -m64"
-        ac_cv_env_CXXFLAGS_set=set
-        ac_cv_env_CXXFLAGS_value='-m64'
+rm -f conftest*
 
 fi
 
-      if test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"; then :
+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 <ctype.h>
+#include <stdlib.h>
+#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
 
-        AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
-        AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
+#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
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 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
 
+# 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
 
-    test -n "$CXX" && break
-  done
 fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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; }
+
+
+  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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  MINIX=
 fi
 
 
-  test -n "$ac_ct_CXX" && break
-done
+  if test "$MINIX" = yes; then
 
-  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
+$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
-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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+
+  { $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 ()
 {
-#ifndef __GNUC__
-       choke me
-#endif
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
 else
-  ac_compiler_gnu=no
+  ac_cv_safe_to_define___extensions__=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 test "${ac_cv_prog_cxx_g+set}" = set; 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 ()
-{
+{ $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
 
-  ;
-  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.  */
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
 
-int
-main ()
-{
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
 
-else
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  $as_echo "#define _TANDEM_SOURCE 1" >>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
 
-depcc="$CXX"  am_compiler_list=
+am__api_version='1.13'
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+# 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
-  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'.
-  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 8's {/usr,}/bin/sh.
-      touch sub/conftst$i.h
+  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
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+    ;;
+esac
 
-    # 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
-      ;;
-    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
+IFS=$as_save_IFS
 
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CXX_dependencies_compiler_type=none
-fi
+rm -rf conftest.one conftest.two conftest.dir
 
 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 "${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; }
 
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-  am__fastdepCXX_TRUE=
-  am__fastdepCXX_FALSE='#'
+# 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
-  am__fastdepCXX_TRUE='#'
-  am__fastdepCXX_FALSE=
+   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`
 
-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=
+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
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+  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
 
-else
-  # Broken: fails on valid input.
-continue
+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
-rm -f conftest.err 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 <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+# 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
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
+  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
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
+  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
 
-    done
-    ac_cv_prog_CPP=$CPP
 
 fi
-  CPP=$ac_cv_prog_CPP
+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
-  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
+  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
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+  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
 
-else
-  # Broken: fails on valid input.
-continue
 fi
-rm -f conftest.err 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 <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
+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
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
 
+  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
-  { { $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; }
+  STRIP="$ac_cv_prog_STRIP"
 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
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ $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 test "${ac_cv_path_GREP+set}" = set; then :
+{ $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
-  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
+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 grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$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
+    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
-  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"
 
+  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; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+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 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
+  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_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$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
+  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
-  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
+
+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
-  ac_cv_path_EGREP=$EGREP
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 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"
 
+  test -n "$AWK" && break
+done
 
-{ $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 test "${ac_cv_header_stdc+set}" = set; then :
+{ $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
+# 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
-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 <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
+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
-  ac_cv_header_stdc=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
 fi
-rm -f conftest*
 
+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
 
-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 <stdlib.h>
+DEPDIR="${am__leading_dot}deps"
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
+ac_config_commands="$ac_config_commands depfiles"
 
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
 
+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
 
-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 <ctype.h>
-#include <stdlib.h>
-#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 :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
 
-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
+# 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
-{ $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
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
 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
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+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
-
-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" = x""yes; then :
-  MINIX=yes
+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
-  MINIX=
+  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
 
-  if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+# 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
 
 
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+# Define the identity of the package.
+ PACKAGE='libmemcached'
+ VERSION='1.0.18'
 
 
-$as_echo "#define _MINIX 1" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
 
-  fi
 
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
 
-  { $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 test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+# Some tools Automake needs.
 
-#	  define __EXTENSIONS__ 1
-	  $ac_includes_default
-int
-main ()
-{
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
 
-  ;
-  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
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
 
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
 
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
 
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
-if test "x$CC" != xcc; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
-		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-  ;
-  return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { 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; } &&
-   test -f conftest2.$ac_objext && { { 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
-  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
-  if test "x$CC" != xcc; then
-    # Test first that cc exists at all.
-    if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-      rm -f conftest2.*
-      if { { 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; } &&
-	 test -f conftest2.$ac_objext && { { 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
-	# cc works too.
-	:
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+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
-	# cc exists but doesn't like -o.
-	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+         _am_tools=none
       fi
-    fi
-  fi
-else
-  eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      { $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
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+        _am_tools=none
+      fi
 
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+  { $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; }
 
-fi
+  # 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}
 
-# 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
+  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
-      IFS="$lt_save_ifs"
+      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
-else
-  enable_static=no
-fi
-
-
-
-
-
-
-
-
-
-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.2.6b'
-macro_revision='1.3017'
-
-
-
-
-
-
-
-
 
+    # 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
 
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-{ $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 test "${ac_cv_path_SED+set}" = set; 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"
-      { test -f "$ac_path_SED" && $as_test_x "$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
+    # 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 <conftest.tar" >&5
+   ($am__untar <conftest.tar) >&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
-    # 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
+  rm -rf conftest.dir
 
-      $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
+  if ${am_cv_prog_tar_ustar+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_path_SED=$SED
+  am_cv_prog_tar_ustar=$_am_tool
 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}: 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 for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+{ $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 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"
-      { test -f "$ac_path_FGREP" && $as_test_x "$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
+  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
 
-      $ac_path_FGREP_found && break 3
+  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
-  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
+
+  cd ..
+  rm -rf conftest.dir
 else
-  ac_cv_path_FGREP=$FGREP
+  am_cv_CC_dependencies_compiler_type=none
 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
-
-
-
-
+{ $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
 
-# 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; }
+
+#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
-if test "${lt_cv_path_LD+set}" = set; then :
+
+# 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
-  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 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
+            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
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+      $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  ac_cv_path_SED=$SED
 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 test "${lt_cv_prog_gnu_ld+set}" = set; 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 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
+{ $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//"
 
 
 
@@ -5965,10 +5455,211 @@ 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 test "${lt_cv_path_NM+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+
+
+
+{ $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 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&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 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&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.
@@ -6020,14 +5711,17 @@ 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 "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  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 test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -6039,7 +5733,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6065,13 +5759,13 @@ fi
 fi
 if test -z "$DUMPBIN"; then
   ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  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 test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -6083,7 +5777,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6120,6 +5814,15 @@ esac
   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"
@@ -6134,18 +5837,18 @@ 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 test "${lt_cv_nm_interface+set}" = set; then :
+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:6142: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:6145: $NM \\\"conftest.$ac_objext\\\"\"" >&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:6148: output\"" >&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"
@@ -6169,7 +5872,7 @@ 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 test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
@@ -6202,6 +5905,11 @@ else
     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.
@@ -6227,6 +5935,11 @@ else
     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
@@ -6266,8 +5979,8 @@ else
       # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      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`
@@ -6309,8 +6022,8 @@ $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"}, \
-      = c,a/b,, \
+  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
@@ -6359,9 +6072,83 @@ 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 test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
@@ -6375,6 +6162,11 @@ case $reload_flag in
 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'
@@ -6397,7 +6189,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -6409,7 +6201,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6437,7 +6229,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
 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 test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -6449,7 +6241,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6496,7 +6288,7 @@ 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 test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -6538,16 +6330,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # 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
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # 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)
+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'
@@ -6577,6 +6371,10 @@ 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
@@ -6585,11 +6383,11 @@ hpux10.20* | hpux11*)
     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]) shared object file - PA-RISC [0-9].[0-9]'
+    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_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
@@ -6610,8 +6408,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6692,6 +6490,21 @@ 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
@@ -6707,12 +6520,165 @@ 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
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
+  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 test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -6724,8 +6690,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
+  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
@@ -6745,14 +6711,18 @@ $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_AR"; then
+if test -z "$AR"; then
   ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+  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 test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -6764,8 +6734,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="ar"
+  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
@@ -6784,6 +6754,10 @@ else
 $as_echo "no" >&6; }
 fi
 
+
+  test -n "$ac_ct_AR" && break
+done
+
   if test "x$ac_ct_AR" = x; then
     AR="false"
   else
@@ -6795,12 +6769,13 @@ ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
   fi
-else
-  AR="$ac_cv_prog_AR"
 fi
 
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
 
 
 
@@ -6809,6 +6784,61 @@ test -z "$AR_FLAGS" && 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
+
+
+
+
 
 
 
@@ -6817,7 +6847,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -6829,7 +6859,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6857,7 +6887,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -6869,7 +6899,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6916,7 +6946,7 @@ if test -n "$ac_tool_prefix"; then
 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 test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -6928,7 +6958,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -6956,7 +6986,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 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 test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -6968,7 +6998,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7018,15 +7048,27 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  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
+
+
+
+
+
+
 
 
 
@@ -7073,7 +7115,7 @@ 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 test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -7134,8 +7176,8 @@ esac
 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'"
+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=
@@ -7159,6 +7201,7 @@ for ac_symprfx in "" "_"; do
     # 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};"\
@@ -7171,6 +7214,7 @@ for ac_symprfx in "" "_"; do
   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
@@ -7196,8 +7240,8 @@ _LT_EOF
   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
+    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
@@ -7212,6 +7256,18 @@ _LT_EOF
       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
@@ -7223,7 +7279,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -7249,8 +7305,8 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  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
@@ -7260,8 +7316,8 @@ _LT_EOF
   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&5
 	fi
@@ -7298,6 +7354,20 @@ else
 $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
+
+
+
+
+
+
+
+
 
 
 
@@ -7317,6 +7387,41 @@ 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.
@@ -7350,7 +7455,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 7353 "configure"' > conftest.$ac_ext
+  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=$?
@@ -7385,7 +7490,7 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+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
@@ -7403,7 +7508,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -7422,7 +7530,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -7444,7 +7555,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   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 test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -7485,7 +7596,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*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
@@ -7496,7 +7607,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      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"
@@ -7512,19 +7636,16 @@ esac
 
 need_locks="$enable_libtool_lock"
 
-
-  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
+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 test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DSYMUTIL"; then
-  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+  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
@@ -7532,8 +7653,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+  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
@@ -7543,10 +7664,10 @@ 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; }
+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; }
@@ -7554,17 +7675,17 @@ 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
+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 test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} 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.
+  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
@@ -7572,8 +7693,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+  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
@@ -7583,17 +7704,17 @@ 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; }
+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_DSYMUTIL" = x; then
-    DSYMUTIL=":"
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
@@ -7601,22 +7722,50 @@ yes:)
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
-    DSYMUTIL=$ac_ct_DSYMUTIL
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
   fi
 else
-  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+  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}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+  # 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 test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$NMEDIT"; then
-  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+  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
@@ -7624,8 +7773,8 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+  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
@@ -7635,8 +7784,100 @@ IFS=$as_save_IFS
 
 fi
 fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
+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
@@ -7652,7 +7893,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
 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 test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -7664,7 +7905,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7704,7 +7945,7 @@ fi
 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 test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -7716,7 +7957,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7744,7 +7985,7 @@ if test -z "$ac_cv_prog_LIPO"; then
 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 test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -7756,7 +7997,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7796,7 +8037,7 @@ fi
 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 test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -7808,7 +8049,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7836,7 +8077,7 @@ if test -z "$ac_cv_prog_OTOOL"; then
 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 test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -7848,7 +8089,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7888,7 +8129,7 @@ fi
 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 test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -7900,7 +8141,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -7928,7 +8169,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then
 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 test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -7940,7 +8181,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  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
@@ -8003,7 +8244,7 @@ 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 test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
@@ -8019,7 +8260,13 @@ else
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# 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
@@ -8030,9 +8277,10 @@ else
 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 test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
@@ -8062,6 +8310,41 @@ rm -f core conftest.err conftest.$ac_objext \
 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' ;;
@@ -8089,7 +8372,7 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -8101,7 +8384,7 @@ 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" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
@@ -8112,585 +8395,115 @@ done
 
 
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+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
 
 
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+# Set options
+enable_dlopen=yes
 
-  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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
+  enable_win32_dll=no
 
-  ;
-  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 test "${ac_cv_prog_cxx_g+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+            # 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
-  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.  */
+  enable_shared=yes
+fi
 
-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
+
+
+  # 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
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
+  enable_static=yes
 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
 
-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 test "${am_cv_CXX_dependencies_compiler_type+set}" = set; 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'.
-  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 8's {/usr,}/bin/sh.
-      touch 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
-      ;;
-    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=
+
+
+
+
+
+# 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"
       ;;
-    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
+  pic_mode=default
 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
-
-
-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 test "${ac_cv_prog_CXXCPP+set}" = set; 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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.$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 <ac_nonexistent.h>
-_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.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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 <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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.$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 <ac_nonexistent.h>
-_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.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f 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;}
-_lt_caught_CXX_error=yes; }
-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
-
-
-
-
-
-# Set options
-
-
-
-        enable_dlopen=no
-
-
-  enable_win32_dll=no
-
-
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
-else
-  pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
+test -z "$pic_mode" && pic_mode=default
 
 
 
@@ -8761,6 +8574,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -8782,7 +8600,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -8810,19 +8628,6 @@ _ACEOF
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
@@ -8835,23 +8640,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# 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'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -8880,7 +8668,7 @@ for cc_temp in $compiler""; do
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
 
 # Only perform the check for file, if the check method requires it
@@ -8890,7 +8678,7 @@ 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 test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -8956,7 +8744,7 @@ 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 test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -9089,11 +8877,16 @@ if test -n "$compiler"; then
 lt_prog_compiler_no_builtin_flag=
 
 if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+  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 test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
@@ -9109,15 +8902,15 @@ else
    -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:9112: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9116: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $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
@@ -9146,8 +8939,6 @@ fi
 lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
-{ $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 test "$GCC" = yes; then
     lt_prog_compiler_wl='-Wl,'
@@ -9195,6 +8986,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       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
@@ -9237,6 +9034,15 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       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
@@ -9278,7 +9084,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -9299,7 +9105,13 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic='--shared'
 	lt_prog_compiler_static='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      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,'
@@ -9311,25 +9123,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      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,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic='-KPIC'
+        *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'
-	  lt_prog_compiler_wl=''
 	  ;;
 	esac
 	;;
@@ -9361,7 +9188,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	lt_prog_compiler_wl='-Qoption ld ';;
       *)
 	lt_prog_compiler_wl='-Wl,';;
@@ -9418,13 +9245,17 @@ case $host_os in
     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
 
+{ $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.
@@ -9432,7 +9263,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; }
 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 test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
@@ -9448,15 +9279,15 @@ else
    -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:9451: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:9455: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $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
@@ -9485,13 +9316,18 @@ 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 test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
@@ -9504,7 +9340,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $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
@@ -9534,7 +9370,7 @@ 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 test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -9553,16 +9389,16 @@ else
    -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:9556: $lt_compile\"" >&5)
+   (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:9560: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $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
@@ -9589,7 +9425,7 @@ $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 test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -9608,16 +9444,16 @@ else
    -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:9611: $lt_compile\"" >&5)
+   (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:9615: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $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
@@ -9683,7 +9519,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -9730,7 +9565,33 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   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}'
 
@@ -9748,6 +9609,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     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 ...
@@ -9763,11 +9625,12 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** 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 modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** 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
@@ -9803,10 +9666,12 @@ _LT_EOF
       # _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/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      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'
@@ -9824,6 +9689,11 @@ _LT_EOF
       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
@@ -9839,7 +9709,7 @@ _LT_EOF
       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)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
@@ -9849,15 +9719,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  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*)	# 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	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' ;;
@@ -9868,13 +9739,17 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec=
 	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  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
@@ -9890,17 +9765,16 @@ _LT_EOF
         fi
 
 	case $cc_basename in
-	xlf*)
+	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=
-	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -9914,8 +9788,8 @@ _LT_EOF
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	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'
+	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
       ;;
 
@@ -9933,8 +9807,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	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'
+	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
@@ -9980,8 +9854,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	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'
+	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
@@ -10021,8 +9895,10 @@ _LT_EOF
       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")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  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
@@ -10109,7 +9985,13 @@ _LT_EOF
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        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
@@ -10122,25 +10004,32 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-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 "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        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'
@@ -10149,7 +10038,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	 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
@@ -10162,30 +10057,42 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-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 "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  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'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
+	  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'
@@ -10217,20 +10124,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      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 `$ECHO "X$deplibs" | $Xsed -e '\''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'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
+      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*)
@@ -10240,7 +10191,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
+  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
@@ -10248,7 +10204,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    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}"
@@ -10266,10 +10222,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=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
@@ -10282,7 +10234,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -10291,7 +10243,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      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
@@ -10299,7 +10251,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     hpux9*)
       if test "$GCC" = yes; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	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
@@ -10314,14 +10266,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      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_flag_spec_ld='+b $libdir'
 	hardcode_libdir_separator=:
 	hardcode_direct=yes
 	hardcode_direct_absolute=yes
@@ -10333,16 +10284,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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
@@ -10354,7 +10305,46 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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
@@ -10382,26 +10372,39 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	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.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	# 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) {}
+int foo (void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  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"
+           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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	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'
@@ -10463,17 +10466,17 @@ rm -f core conftest.err conftest.$ac_objext \
       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'
+      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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	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'
@@ -10483,13 +10486,13 @@ rm -f core conftest.err conftest.$ac_objext \
     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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $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'
@@ -10502,9 +10505,9 @@ rm -f core conftest.err conftest.$ac_objext \
       no_undefined_flag=' -z defs'
       if test "$GCC" = yes; then
 	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	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 ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $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"*)
@@ -10692,44 +10695,50 @@ x|xyes)
       # 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; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+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
+	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
+	  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
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
+	  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
@@ -10887,11 +10896,6 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -10900,16 +10904,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  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 -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    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=
@@ -10922,7 +10933,7 @@ if test "$GCC" = yes; then
 	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 '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -10942,7 +10953,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[lt_foo]++; }
   if (lt_freq[lt_foo] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # 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
@@ -10968,7 +10985,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  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
 
@@ -10977,7 +10994,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -11030,7 +11047,7 @@ amigaos*)
   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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    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
   ;;
@@ -11042,7 +11059,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  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'
@@ -11061,8 +11078,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  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}`~
@@ -11083,36 +11101,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     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="/usr/lib /lib/w32api /lib /usr/local/lib"
+
+      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}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        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
       ;;
     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
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -11133,7 +11198,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=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'
@@ -11141,10 +11206,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -11152,7 +11213,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -11170,7 +11231,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11190,12 +11251,26 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=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}'
   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
   ;;
 
@@ -11241,12 +11316,14 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # 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
+  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}'
@@ -11262,7 +11339,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -11299,9 +11376,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+# 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}'
@@ -11309,12 +11386,17 @@ linux* | k*bsd*-gnu)
   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
-  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
+  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
@@ -11327,13 +11409,17 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  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
+    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
@@ -11345,8 +11431,9 @@ rm -f core conftest.err conftest.$ac_objext \
 
   # 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;/^$/d' | tr '\n' ' '`
+    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
@@ -11377,7 +11464,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  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
@@ -11446,7 +11533,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=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}'
@@ -11471,7 +11558,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  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
@@ -11495,7 +11582,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    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
@@ -11526,7 +11613,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=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}'
@@ -11536,7 +11623,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  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
@@ -11648,6 +11735,11 @@ 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=
@@ -11720,7 +11812,7 @@ else
   # 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 test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11754,7 +11846,7 @@ 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" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
@@ -11768,12 +11860,12 @@ fi
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+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 test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11807,16 +11899,16 @@ 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" = x""yes; then :
+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" = x""yes; then :
+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 test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11850,12 +11942,12 @@ 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" = x""yes; then :
+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 test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11889,12 +11981,12 @@ 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" = x""yes; then :
+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 test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -11928,7 +12020,7 @@ 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" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
@@ -11969,7 +12061,7 @@ fi
 
     { $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 test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -11978,7 +12070,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11981 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12019,7 +12111,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* 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);
@@ -12028,7 +12126,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -12065,7 +12167,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
       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 test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -12074,7 +12176,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12077 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12115,7 +12217,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* 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);
@@ -12124,7 +12232,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -12281,45 +12393,185 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 CC="$lt_save_CC"
 
-
-ac_ext=cpp
+      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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
 
-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_flag_spec_ld_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
-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
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
 
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
+  # 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 <ac_nonexistent.h>
+_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
 
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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
@@ -12362,6 +12614,7 @@ $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
@@ -12379,6 +12632,7 @@ $RM -r conftest*
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   compiler_CXX=$CC
   for cc_temp in $compiler""; do
@@ -12389,7 +12643,7 @@ $RM -r conftest*
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 
 
   if test -n "$compiler"; then
@@ -12452,7 +12706,7 @@ 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 test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -12489,10 +12743,10 @@ 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
+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 test "${lt_cv_prog_gnu_ld+set}" = set; then :
+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.
@@ -12518,8 +12772,8 @@ 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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        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'
@@ -12551,7 +12805,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
       # 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 "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -12661,7 +12915,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
           allow_undefined_flag_CXX='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+          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
@@ -12674,26 +12934,33 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-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 "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          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'
@@ -12702,7 +12969,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	    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
@@ -12715,30 +12988,42 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-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 "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  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 "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  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'
-	    # Exported symbols can be pulled into shared objects from archives
-	    whole_archive_flag_spec_CXX='$convenience'
+	    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.
@@ -12768,28 +13053,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _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'
-        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
-        ;;
+	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*)
 
 
@@ -12797,7 +13129,12 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct_CXX=no
   hardcode_automatic_CXX=yes
   hardcode_shlibpath_var_CXX=unsupported
-  whole_archive_flag_spec_CXX=''
+  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
@@ -12805,7 +13142,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    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}"
@@ -12839,7 +13176,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -12858,6 +13195,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       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=:
@@ -12882,11 +13224,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
             # 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; $ECHO "X$list" | $Xsed'
+            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 -fPIC ${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'
+              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
@@ -12947,7 +13289,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # 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; $ECHO "X$list" | $Xsed'
+	    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
@@ -12957,10 +13299,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	            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 -fPIC ${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}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -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
@@ -12990,7 +13332,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	    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
@@ -13001,9 +13343,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           *)
 	    if test "$GXX" = yes; then
 	      if test "$with_gnu_ld" = no; then
-	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	        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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	        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
@@ -13014,7 +13356,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         inherit_rpath_CXX=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13032,7 +13374,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # 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; $ECHO "X$list" | $Xsed'
+	    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'
@@ -13069,26 +13411,26 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
-	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	    *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 | $NL2SP`"'
+		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 | $NL2SP`~
+		$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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+		$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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+		$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 will use weak symbols
+	    *) # 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'
 	      ;;
@@ -13096,7 +13438,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
 	    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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	    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++
@@ -13115,9 +13457,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    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*)
+	  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'
@@ -13137,13 +13479,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	      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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      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='echo'
+	      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
@@ -13212,7 +13554,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    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=echo
+	  output_verbose_link_cmd=func_echo_all
 	else
 	  ld_shlibs_CXX=no
 	fi
@@ -13247,15 +13589,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $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'
 		;;
@@ -13271,17 +13613,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          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 -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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
 
@@ -13291,7 +13633,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/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 "\-L"'
+	      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
@@ -13327,7 +13669,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
             archive_cmds_need_lc_CXX=yes
 	    no_undefined_flag_CXX=' -zdefs'
@@ -13348,7 +13690,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    esac
 	    link_all_deplibs_CXX=yes
 
-	    output_verbose_link_cmd='echo'
+	    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
@@ -13368,14 +13710,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    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 -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        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 -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $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 "\-L"'
+	        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.
@@ -13386,7 +13728,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/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 -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        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'
@@ -13440,6 +13782,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           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'
@@ -13501,6 +13847,14 @@ private:
 };
 _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=$?
@@ -13514,7 +13868,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -13523,13 +13877,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
           test $p = "-R"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        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 $p in
-	 -L* | -R*)
+	 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.
@@ -13549,8 +13912,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	   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.
@@ -13586,6 +13951,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 case $host_os in
@@ -13621,7 +13987,7 @@ linux*)
 
 solaris*)
   case $cc_basename in
-  CC*)
+  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
@@ -13686,8 +14052,6 @@ fi
 lt_prog_compiler_pic_CXX=
 lt_prog_compiler_static_CXX=
 
-{ $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; }
 
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -13737,6 +14101,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # 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.
@@ -13786,6 +14155,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	  ;;
 	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++*)
@@ -13842,7 +14216,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -13875,8 +14249,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	    lt_prog_compiler_pic_CXX=
 	    lt_prog_compiler_static_CXX='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  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'
@@ -13938,7 +14312,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       solaris*)
 	case $cc_basename in
-	  CC*)
+	  CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-Bstatic'
@@ -14003,10 +14377,17 @@ case $host_os in
     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
-$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
-
 
+{ $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.
@@ -14014,7 +14395,7 @@ $as_echo "$lt_prog_compiler_pic_CXX" >&6; }
 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 test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works_CXX=no
@@ -14030,15 +14411,15 @@ else
    -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:14033: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14037: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $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
@@ -14064,13 +14445,15 @@ 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 test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_CXX=no
@@ -14083,7 +14466,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $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
@@ -14110,7 +14493,7 @@ 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 test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14129,16 +14512,16 @@ else
    -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:14132: $lt_compile\"" >&5)
+   (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:14136: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $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
@@ -14162,7 +14545,7 @@ $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 test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14181,16 +14564,16 @@ else
    -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:14184: $lt_compile\"" >&5)
+   (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:14188: \$? = $ac_status" >&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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $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
@@ -14241,27 +14624,37 @@ fi
 $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")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      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*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    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
-  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
 $as_echo "$ld_shlibs_CXX" >&6; }
@@ -14293,44 +14686,50 @@ x|xyes)
       # 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; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+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
+	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
+	  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
-	  archive_cmds_need_lc_CXX=no
-        else
-	  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*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
-$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+	  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
@@ -14398,8 +14797,6 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
@@ -14425,7 +14822,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  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
 
@@ -14434,7 +14831,7 @@ aix3*)
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -14487,7 +14884,7 @@ amigaos*)
   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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    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
   ;;
@@ -14499,7 +14896,7 @@ beos*)
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  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'
@@ -14518,8 +14915,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  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}`~
@@ -14540,36 +14938,82 @@ cygwin* | mingw* | pw32* | cegcc*)
     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="/usr/lib /lib/w32api /lib /usr/local/lib"
+
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        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
       ;;
     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
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -14589,7 +15033,7 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=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'
@@ -14597,10 +15041,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -14608,7 +15048,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -14626,7 +15066,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14646,12 +15086,26 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=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}'
   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
   ;;
 
@@ -14697,12 +15151,14 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # 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
+  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}'
@@ -14718,7 +15174,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -14750,26 +15206,12579 @@ irix5* | irix6* | nonstopux*)
   hardcode_into_libs=yes
   ;;
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
+# 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 <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// 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 <mateusz@loskot.net>
+#
+#   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 <gleensalmon@yahoo.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 <cstdint>
+int
+main ()
+{
+
+        uint32_t t
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cxx_cstdint_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 <tr1/cstdint>
+int
+main ()
+{
+ uint32_t t
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cxx_cstdint_tr1_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 <boost/cstdint.hpp>
+int
+main ()
+{
+ uint32_t t
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cxx_cstdint_boost_cstdint_hpp="<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="<stdint.h>"
+      { $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 <cinttypes>
+int
+main ()
+{
+
+          uint32_t foo= UINT32_C(1);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cxx_cinttypes_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 <tr1/cinttypes>
+int
+main ()
+{
+
+                                              uint32_t foo= UINT32_C(1);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cxx_cinttypes_tr1_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 <boost/cinttypes.hpp>
+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="<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="<inttypes.h>"
+      { $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 <sys/types.h>
+	     #include <sys/param.h>
+
+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 <sys/types.h>
+		#include <sys/param.h>
+
+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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+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 <limits.h>
+
+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 <sys/types.h>
+#include <netinet/in.h>
+#include <inttypes.h>
+
+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 <sys/types.h>
+#include <sys/socket.h>
+#include <time.h>
+#include <sys/time.h>
+#include <errno.h>
+
+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 <sys/types.h>
+#include <sys/socket.h>
+#include <time.h>
+#include <sys/time.h>
+#include <errno.h>
+
+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 <inttypes.h>
+#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 <alloca.h>
+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 <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  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 <error.h>
+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 <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#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 <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  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 <sys/types.h>
+                #endif
+                #ifdef HAVE_NETINET_IN_H
+                # include <netinet/in.h>
+                #endif
+                #ifdef HAVE_NETDB_H
+                # include <netdb.h>
+                #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 <stdbool.h>
+             #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 <sys/types.h>
+	     #include <sys/param.h>
+
+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 <sys/types.h>
+		#include <sys/param.h>
+
+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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+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 <limits.h>
+
+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 <typeinfo>
+#include <cxxabi.h>
+#include <cstdlib>
+#include <string>
+          template<typename TYPE>
+          class A {};
+int
+main ()
+{
+A<int> 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<int>") != 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 <sys/types.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <event.h>
+
+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 <netdb.h>
+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 <netdb.h>
+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 <netdb.h>
+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 <uuid/uuid.h>
+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 <uuid/uuid.h>
+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 <uuid/uuid.h>
+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 <pthread.h>
+                        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 <pthread.h>
+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 <pthread.h>
+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 <pthread.h>
+#include <stdlib.h>
+
+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 <sys/types.h>
+	     #include <sys/param.h>
+
+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 <sys/types.h>
+		#include <sys/param.h>
+
+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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+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 <limits.h>
+
+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
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
-  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
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+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.  */
 
@@ -14781,391 +27790,703 @@ 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 :
-  shlibpath_overrides_runpath=yes
+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
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
 
-  # 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
+else
+  :
+fi
 
-  # Add ABI-specific directories to the system library path.
-  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+done
 
-  # 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;/^$/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
-  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
-  ;;
+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
 
-*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'
-  ;;
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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
-  ;;
+int
+main ()
+{
 
-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
-  ;;
+  ;
+  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
 
-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"
-  ;;
+else
+  :
+fi
 
-rdos*)
-  dynamic_linker=no
-  ;;
+done
 
-solaris*)
-  version_type=linux
-  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
-  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
+
+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; }
       ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+    *)
+      { { $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
-  ;;
+   esac
+else
+  CFLAGS="$flag"
+fi
+
+else
+  :
+fi
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    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
-  ;;
+done
 
-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
-  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
-  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
+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
 
-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
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 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"
+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 ()
+{
 
-    { $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
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
+  eval "$as_CACHEVAR=no"
 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
+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
 
-  fi # test -n "$compiler"
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  CC=$lt_save_CC
-  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
+int
+main ()
+{
 
-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
+  ;
+  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
 
 
-        ac_config_commands="$ac_config_commands libtool"
 
 
 
+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
 
-# Only expand once:
+  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
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features without additional flags" >&5
-$as_echo_n "checking if g++ supports C++0x features without additional flags... " >&6; }
-if test "${ac_cv_cxx_compile_cxx0x_native+set}" = set; then :
-  $as_echo_n "(cached) " >&6
 else
+  :
+fi
+
+done
 
-  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.  */
 
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
 
-    typedef check<check<bool>> right_angle_brackets;
+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
 
-    int a;
-    decltype(a) b;
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;
 int
 main ()
 {
@@ -15174,54 +28495,62 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_cxx_compile_cxx0x_native=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_cxx_compile_cxx0x_native=no
+  eval "$as_CACHEVAR=no"
 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
-
-
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_native" >&5
-$as_echo "$ac_cv_cxx_compile_cxx0x_native" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=c++0x" >&5
-$as_echo_n "checking if g++ supports C++0x features with -std=c++0x... " >&6; }
-if test "${ac_cv_cxx_compile_cxx0x_cxx+set}" = set; then :
-  $as_echo_n "(cached) " >&6
 else
+  :
+fi
+
+done
 
-  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_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -std=c++0x"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
 
-    typedef check<check<bool>> right_angle_brackets;
+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
 
-    int a;
-    decltype(a) b;
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;
 int
 main ()
 {
@@ -15230,55 +28559,62 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_cxx_compile_cxx0x_cxx=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_cxx_compile_cxx0x_cxx=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CXXFLAGS="$ac_save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+  CFLAGS=$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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_cxx" >&5
-$as_echo "$ac_cv_cxx_compile_cxx0x_cxx" >&6; }
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if g++ supports C++0x features with -std=gnu++0x" >&5
-$as_echo_n "checking if g++ supports C++0x features with -std=gnu++0x... " >&6; }
-if test "${ac_cv_cxx_compile_cxx0x_gxx+set}" = set; then :
-  $as_echo_n "(cached) " >&6
 else
+  :
+fi
+
+done
 
-  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_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -std=gnu++0x"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
 
-    typedef check<check<bool>> right_angle_brackets;
+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
 
-    int a;
-    decltype(a) b;
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;
 int
 main ()
 {
@@ -15287,675 +28623,844 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_cxx_compile_cxx0x_gxx=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_cxx_compile_cxx0x_gxx=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CXXFLAGS="$ac_save_CXXFLAGS"
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+  CFLAGS=$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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compile_cxx0x_gxx" >&5
-$as_echo "$ac_cv_cxx_compile_cxx0x_gxx" >&6; }
-
-  if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
-     test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
-     test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
-
-$as_echo "#define HAVE_STDCXX_0X /**/" >>confdefs.h
-
-  fi
 
+else
+  :
+fi
 
+done
 
 
 
 
-  acl_libdirstem=lib
-  acl_libdirstem2=
-  case "$host_os" in
-    solaris*)
-                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
-$as_echo_n "checking for 64-bit host... " >&6; }
-if test "${gl_cv_solaris_64bit+set}" = set; then :
+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
-  if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
-else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
 int
 main ()
 {
 
-             return sizeof(void*) == 8 ? 0 : 1;
-
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_solaris_64bit=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  gl_cv_solaris_64bit=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
-$as_echo "$gl_cv_solaris_64bit" >&6; }
-      if test $gl_cv_solaris_64bit = yes; then
-        acl_libdirstem=lib/64
-        case "$host_cpu" in
-          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
-          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
-        esac
-      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; }
       ;;
     *)
-      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-      if test -n "$searchpath"; then
-        acl_save_IFS="${IFS= 	}"; IFS=":"
-        for searchdir in $searchpath; do
-          if test -d "$searchdir"; then
-            case "$searchdir" in
-              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-              *) searchdir=`cd "$searchdir" && pwd`
-                 case "$searchdir" in
-                   */lib64 ) acl_libdirstem=lib64 ;;
-                 esac ;;
-            esac
-          fi
-        done
-        IFS="$acl_save_IFS"
-      fi
+      { { $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
-  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+   esac
+else
+  CFLAGS="$flag"
+fi
 
+else
+  :
+fi
 
-      if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
+done
 
-for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
 
-fi
 
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+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
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_malloc_0_nonnull=no
-else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
 
 int
 main ()
 {
-return ! malloc (0);
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_malloc_0_nonnull=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_func_malloc_0_nonnull=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
 
 else
-  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
-
-   case " $LIBOBJS " in
-  *" malloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
-
+  :
 fi
 
+done
 
-for ac_header in stdlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
 
-fi
 
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
-$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
-if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
+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
-  if test "$cross_compiling" = yes; then :
-  ac_cv_func_realloc_0_nonnull=no
-else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *realloc ();
-#endif
 
 int
 main ()
 {
-return ! realloc (0, 0);
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_realloc_0_nonnull=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_func_realloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  eval "$as_CACHEVAR=no"
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
-if test $ac_cv_func_realloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
-
+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
-  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
-
-   case " $LIBOBJS " in
-  *" realloc.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define realloc rpl_realloc" >>confdefs.h
-
+  CFLAGS="$flag"
 fi
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    ac_config_headers="$ac_config_headers config.h"
-
-
-
-  # We need to prevent canonical target
-  # from injecting -O2 into CFLAGS - but we won't modify anything if we have
-  # set CFLAGS on the command line, since that should take ultimate precedence
-  if test "x${ac_cv_env_CFLAGS_set}" = "x"; then :
-  CFLAGS=""
-fi
-  if test "x${ac_cv_env_CXXFLAGS_set}" = "x"; then :
-  CXXFLAGS=""
+else
+  :
 fi
 
+done
 
 
 
-    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='0.44'
 
+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
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
+  ;
+  return 0;
+}
 _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"}
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-
-  # Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
-
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no)  AM_DEFAULT_VERBOSITY=1;;
-*)   AM_DEFAULT_VERBOSITY=0;;
-esac
-AM_BACKSLASH='\'
-
-
-
-
-
-
-
-
-
-
-  pandora_building_from_vc=no
-
-  if test -d ".bzr" ; then
-    pandora_building_from_bzr=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_bzr=no
-  fi
-
-  if test -d ".svn" ; then
-    pandora_building_from_svn=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_svn=no
-  fi
-
-  if test -d ".hg" ; then
-    pandora_building_from_hg=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_hg=no
-  fi
-
-  if test -d ".git" ; then
-    pandora_building_from_git=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_git=no
-  fi
-
-
-
-
-  PANDORA_HEX_VERSION=`echo $VERSION | sed 's|\-a-z0-9*$||' | \
-    awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'`
-
-
-
-
-
-
-
-
-
-  # FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
+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 ()
+{
 
-cat >>confdefs.h <<_ACEOF
-#define HOST_VENDOR "$host_vendor"
+  ;
+  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
 
-cat >>confdefs.h <<_ACEOF
-#define HOST_OS "$host_os"
-_ACEOF
+done
 
 
-cat >>confdefs.h <<_ACEOF
-#define HOST_CPU "$host_cpu"
-_ACEOF
 
 
+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
 
-cat >>confdefs.h <<_ACEOF
-#define TARGET_VENDOR "$target_vendor"
-_ACEOF
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-cat >>confdefs.h <<_ACEOF
-#define TARGET_OS "$target_os"
+  ;
+  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
 
-cat >>confdefs.h <<_ACEOF
-#define TARGET_CPU "$target_cpu"
-_ACEOF
+done
 
 
 
-  case "$host_os" in
-    *solaris*|*freebsd*)
-    if test "x${ac_cv_env_CPPFLAGS_set}" = "x"; then :
 
-      CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
+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
 
-fi
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    if test "x${ac_cv_env_LDFLAGS_set}" = "x"; then :
+int
+main ()
+{
 
-      LDFLAGS="${LDFLAGS} -L/usr/local/lib"
+  ;
+  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
-    ;;
-  esac
 
-  PANDORA_OPTIMIZE_BITFIELD=1
+done
 
-  case "$target_os" in
-    *linux*)
-    TARGET_LINUX="true"
 
 
-$as_echo "#define TARGET_OS_LINUX 1" >>confdefs.h
 
-      ;;
-    *darwin*)
-      TARGET_OSX="true"
+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.  */
 
-$as_echo "#define TARGET_OS_OSX 1" >>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"
       ;;
-    *solaris*)
-      TARGET_SOLARIS="true"
-      PANDORA_OPTIMIZE_BITFIELD=0
+   esac
+else
+  CFLAGS="$flag"
+fi
+
+else
+  :
+fi
 
+done
 
-$as_echo "#define TARGET_OS_SOLARIS 1" >>confdefs.h
 
-      ;;
-    *freebsd*)
-      TARGET_FREEBSD="true"
 
 
-$as_echo "#define TARGET_OS_FREEBSD 1" >>confdefs.h
+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.  */
 
-$as_echo "#define __APPLE_CC__ 1" >>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
-
-
-
-  ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default"
-if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then :
-  SUNCC="yes"
+   esac
 else
-  SUNCC="no"
+  CFLAGS="$flag"
 fi
 
-  ac_fn_c_check_decl "$LINENO" "__ICC" "ac_cv_have_decl___ICC" "$ac_includes_default"
-if test "x$ac_cv_have_decl___ICC" = x""yes; then :
-  INTELCC="yes"
 else
-  INTELCC="no"
+  :
 fi
 
+done
 
-  if test "$INTELCC" = "yes"; then :
-  enable_rpath=no
-fi
 
-          if test "$SUNCC" = "yes"; then :
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long])
+#         GCC 4.5 removed this.
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code])
 
+          if test "x$MINGW" != xyes; then :
 
-$as_echo "#define _STLP_NO_NEW_C_HEADERS 1" >>confdefs.h
+                if test "x$enable_shared" = "xyes"; then :
+  case $ax_harden_sanitize in #(
+  thread) :
 
 
-fi
 
-  if test "x$TARGET_OSX" = "xtrue"; then :
+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
 
-    if test "x$ac_enable_fat_binaries" = "xyes"; then :
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-      AM_CFLAGS="-arch i386 -arch x86_64 -arch ppc"
-      AM_CXXFLAGS="-arch i386 -arch x86_64 -arch ppc"
-      AM_LDFLAGS="-arch i386 -arch x86_64 -arch ppc"
+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
 
-    pandora_have_old_libtool=no
-
-  if test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"; then :
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    as_fn_error "Building ${PACKAGE} with Sun Studio requires at least libtool 2.2" "$LINENO" 5
+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 ()
+{
 
-  if test "$GCC" = "yes"; then :
-  if test "$ac_cv_cxx_compile_cxx0x_native" = "yes"; then :
-
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  if test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"; then :
-  CXX_STANDARD="-std=gnu++0x"
+  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
-  CXX_STANDARD="-std=gnu++98"
+  CFLAGS="$flag"
 fi
 
+else
+  :
 fi
 
-fi
-  AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}"
+done
 
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}"
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ISO C++ 98 include files" >&5
-$as_echo_n "checking for ISO C++ 98 include files... " >&6; }
-if test "${ac_cv_cxx_stdcxx_98+set}" = set; then :
+
+
+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
 
-  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
-
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-    #include <cassert>
-    #include <cctype>
-    #include <cerrno>
-    #include <cfloat>
-    #include <ciso646>
-    #include <climits>
-    #include <clocale>
-    #include <cmath>
-    #include <csetjmp>
-    #include <csignal>
-    #include <cstdarg>
-    #include <cstddef>
-    #include <cstdio>
-    #include <cstdlib>
-    #include <cstring>
-    #include <ctime>
-
-    #include <algorithm>
-    #include <bitset>
-    #include <complex>
-    #include <deque>
-    #include <exception>
-    #include <fstream>
-    #include <functional>
-    #include <iomanip>
-    #include <ios>
-    #include <iosfwd>
-    #include <iostream>
-    #include <istream>
-    #include <iterator>
-    #include <limits>
-    #include <list>
-    #include <locale>
-    #include <map>
-    #include <memory>
-    #include <new>
-    #include <numeric>
-    #include <ostream>
-    #include <queue>
-    #include <set>
-    #include <sstream>
-    #include <stack>
-    #include <stdexcept>
-    #include <streambuf>
-    #include <string>
-    #include <typeinfo>
-    #include <utility>
-    #include <valarray>
-    #include <vector>
-
 int
 main ()
 {
@@ -15964,435 +29469,699 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_cxx_stdcxx_98=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_cxx_stdcxx_98=no
+  eval "$as_CACHEVAR=no"
 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
-
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_stdcxx_98" >&5
-$as_echo "$ac_cv_cxx_stdcxx_98" >&6; }
-  if test "$ac_cv_cxx_stdcxx_98" = yes; then
 
-$as_echo "#define STDCXX_98_HEADERS /**/" >>confdefs.h
+done
 
-  fi
 
-  CXXFLAGS="${save_CXXFLAGS}"
 
 
+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
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"C Compiler version--$GCC\"" >&5
-$as_echo_n "checking \"C Compiler version--$GCC\"... " >&6; }
-  if test "$GCC" = "yes"; then :
 
-    CC_VERSION=`$CC --version | sed 1q`
 
+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
-  if test "$SUNCC" = "yes"; then :
-
-      CC_VERSION=`$CC -V 2>&1 | sed 1q`
 
-else
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-      CC_VERSION=""
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CC_VERSION\"" >&5
-$as_echo "\"$CC_VERSION\"" >&6; }
 
+done
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"C++ Compiler version\"" >&5
-$as_echo_n "checking \"C++ Compiler version\"... " >&6; }
-  if test "$GCC" = "yes"; then :
 
-    CXX_VERSION=`$CXX --version | sed 1q`
 
+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
-  if test "$SUNCC" = "yes"; then :
 
-      CXX_VERSION=`$CXX -V 2>&1 | sed 1q`
-
-else
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    CXX_VERSION=""
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CXX_VERSION\"" >&5
-$as_echo "\"$CXX_VERSION\"" >&6; }
+
+done
 
 
 
-   { $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 test "${ac_cv_c_bigendian+set}" = set; then :
+
+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
-  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
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-	     #include <sys/param.h>
 
 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
+  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.  */
-#include <sys/types.h>
-		#include <sys/param.h>
 
 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
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_c_bigendian=no
+  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
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-	      bogus endian macros
-	     #endif
+else
+  :
+fi
 
-  ;
-  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
+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.  */
-#include <limits.h>
 
 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
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_c_bigendian=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
 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
+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.  */
-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
+  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.  */
-$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
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_c_bigendian=yes
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+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
 
-    fi
+else
+  :
 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
+done
 
-     ;; #(
-   *)
-     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 test "${ac_cv_c_const+set}" = set; then :
+
+
+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 ()
 {
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset cs;
-  /* 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.  */
-    char *t;
-    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 saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; 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
+  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
-  ac_cv_c_const=no
+  CFLAGS="$flag"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  :
 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
+done
 
-fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+
+
+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
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   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
 
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_inline=$ac_kw
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
+  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
-{ $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
+done
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if test "${ac_cv_c_volatile+set}" = set; then :
+
+
+
+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.  */
 
@@ -16400,185 +30169,258 @@ 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
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_c_volatile=no
+  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
-{ $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
 
+else
+  :
 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 test "${ac_cv_c_restrict+set}" = set; then :
+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
-  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
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  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
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     test "$ac_cv_c_restrict" != no && break
-   done
+  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
-{ $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
+done
+
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
-if test "${ac_cv_header_time+set}" = set; then :
+
+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.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
 
 int
 main ()
 {
-if ((struct tm *) 0)
-return 0;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_time=yes
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_header_time=no
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
-
-$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
+else
+  :
 fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test "${ac_cv_struct_tm+set}" = set; then :
+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.  */
-#include <sys/types.h>
-#include <time.h>
 
 int
 main ()
 {
-struct tm tm;
-				     int *p = &tm.tm_sec;
-				     return !p;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_struct_tm=time.h
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_struct_tm=sys/time.h
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
-
+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
 
-  ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
-
 else
+  :
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
+done
 
-fi
 
-  # Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
-  enableval=$enable_largefile;
-fi
 
-if test "$enable_largefile" != no; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+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
-  ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-	 # IRIX 6.2 and later do not support large files by default,
-	 # so use the C compiler's -n32 option if that helps.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
+
 int
 main ()
 {
@@ -16587,68 +30429,62 @@ main ()
   return 0;
 }
 _ACEOF
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  break
+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
-	 CC="$CC -n32"
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_largefile_CC=' -n32'; break
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
 fi
-rm -f core conftest.err conftest.$ac_objext
-	 break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+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
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
+
 int
 main ()
 {
@@ -16658,42 +30494,61 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=64; break
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done
+  CFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then :
+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
-  while :; do
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
+
 int
 main ()
 {
@@ -16703,21 +30558,74 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=no; break
+  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.  */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
+
 int
 main ()
 {
@@ -16727,616 +30635,882 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=1; break
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done
+  CFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  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])
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-$as_echo_n "checking for library containing clock_gettime... " >&6; }
-if test "${ac_cv_search_clock_gettime+set}" = set; then :
+
+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
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS -Werror $flag"
+  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
-for ac_lib in '' rt; 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_clock_gettime=$ac_res
+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_exeext
-  if test "${ac_cv_search_clock_gettime+set}" = set; then :
-  break
+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
-done
-if test "${ac_cv_search_clock_gettime+set}" = set; then :
 
 else
-  ac_cv_search_clock_gettime=no
+  :
+fi
+
+done
+
+
+
+fi
+fi
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-$as_echo "$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
+         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
 
-  if test "x${ac_cv_search_clock_gettime}" != "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
 
-$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
 
+           ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
+         if test "x$ax_enable_debug" = xyes; then :
+  CXXFLAGS=''
 
 
-  # off_t is not a builtin type
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if test "${ac_cv_sizeof_off_t+set}" = set; then :
+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
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
 
+  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
-  if test "$ac_cv_type_off_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (off_t)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_off_t=0
-   fi
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
 
+done
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
 
 
-  if test "$ac_cv_sizeof_off_t" -eq 0; then :
+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
 
-    as_fn_error "\"${PACKAGE} needs an off_t type.\"" "$LINENO" 5
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
+int
+main ()
+{
 
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
-
+  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
-  if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (size_t)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_size_t=0
-   fi
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
-
 
+done
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
 
 
-  if test "$ac_cv_sizeof_size_t" -eq 0; then :
 
-    as_fn_error "\"${PACKAGE} needs an size_t type.\"" "$LINENO" 5
+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
 
-fi
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+  ;
+  return 0;
+}
 _ACEOF
-
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
-
+  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
-  if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
-
 
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
+done
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if time_t is unsigned" >&5
-$as_echo_n "checking if time_t is unsigned... " >&6; }
-if test "${ac_cv_time_t_unsigned+set}" = set; then :
+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.  */
 
-#include <time.h>
-
 int
 main ()
 {
 
-      int array[(((time_t)-1) > 0) ? 1 : -1];
-
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-      ac_cv_time_t_unsigned=yes
-
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-
-      ac_cv_time_t_unsigned=no
-
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_time_t_unsigned" >&5
-$as_echo "$ac_cv_time_t_unsigned" >&6; }
-  if test "$ac_cv_time_t_unsigned" = "yes"; then :
 
+done
 
-$as_echo "#define TIME_T_UNSIGNED 1" >>confdefs.h
 
 
-fi
 
-  LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-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 test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmw  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_mw__mwvalidcheckl=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_mw__mwvalidcheckl" >&5
-$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
-if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then :
-  LIBM="-lmw"
+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
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_m_cos=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
-  LIBM="$LIBM -lm"
+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
 
-  ;;
-*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
-$as_echo_n "checking for cos in -lm... " >&6; }
-if test "${ac_cv_lib_m_cos+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_m_cos=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_m_cos" >&5
-$as_echo "$ac_cv_lib_m_cos" >&6; }
-if test "x$ac_cv_lib_m_cos" = x""yes; then :
-  LIBM="-lm"
+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
 
-  ;;
-esac
-
+else
+  :
+fi
 
+done
 
 
-  ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
-if test "x$ac_cv_func_setsockopt" = x""yes; then :
 
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
-$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_setsockopt+set}" = set; then :
+
+
+
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 setsockopt ();
 int
 main ()
 {
-return setsockopt ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_socket_setsockopt=yes
+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
-  ac_cv_lib_socket_setsockopt=no
+  CXXFLAGS="$flag"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
-$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
-if test "x$ac_cv_lib_socket_setsockopt" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
 
-  LIBS="-lsocket $LIBS"
+done
 
-fi
 
-fi
 
-  ac_fn_c_check_func "$LINENO" "bind" "ac_cv_func_bind"
-if test "x$ac_cv_func_bind" = x""yes; then :
 
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bind in -lbind" >&5
-$as_echo_n "checking for bind in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_bind+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 bind ();
 int
 main ()
 {
-return bind ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind_bind=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_bind_bind=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_bind_bind" >&5
-$as_echo "$ac_cv_lib_bind_bind" >&6; }
-if test "x$ac_cv_lib_bind_bind" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBIND 1
-_ACEOF
-
-  LIBS="-lbind $LIBS"
-
+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 "$GCC" = "yes" -a "$INTELCC" = "no"; then :
-
-
-                case "$target_cpu" in
-      *ppc* | *powerpc*)
-        AM_CFLAGS="-mno-fused-madd ${AM_CFLAGS}"
-        AM_CXXFLAGS="-mno-fused-madd ${AM_CXXFLAGS}"
-      ;;
-    esac
+         if test "x$ac_cv_vcs_checkout" = xyes; then :
 
-            CC="${CC} -std=gnu99"
 
-    AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}"
+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
 
-    DEBUG_CFLAGS="-O0"
-    DEBUG_CXXFLAGS="-O0"
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    OPTIMIZE_CFLAGS="-O3"
-    OPTIMIZE_CXXFLAGS="-O3"
+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
-  if test "$INTELCC" = "yes"; then :
-
-            CC="${CC} -std=c99"
-
-    AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
-
-    DEBUG_CFLAGS="-O0"
-    DEBUG_CXXFLAGS="-O0"
-
-    OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static"
-    OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}"
-
 
+else
+  :
 fi
-  if test "$SUNCC" = "yes"; then :
 
-            CC="${CC} -xc99=all"
-    CXX="${CXX} -xlang=c99"
+done
 
-    AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}"
-    AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${AM_CXXFLAGS}"
 
-    DEBUG_CXXFLAGS="-g"
+#          _APPEND_COMPILE_FLAGS_ERROR([--coverage])
 
-        OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin"
-    OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}"
-    OPTIMIZE_CXXFLAGS="-g0 ${OPTIMIZE_FLAGS}"
 
+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
 
-fi
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-# Check whether --with-debug was given.
-if test "${with_debug+set}" = set; then :
-  withval=$with_debug; with_debug=$withval
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  with_debug=no
+  eval "$as_CACHEVAR=no"
 fi
-
-  if test "$with_debug" = "yes"; then :
-
-    # Debugging. No optimization.
-    AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
-
+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
-
-    # Optimized version. No debug
-    AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
-
+  CXXFLAGS="$flag"
 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
-
-  # Test whether madvise() is declared in C++ code -- it is not on some
-  # systems, such as Solaris
-  ac_fn_cxx_check_decl "$LINENO" "madvise" "ac_cv_have_decl_madvise" "$ac_includes_default
-  #if HAVE_SYS_MMAN_H
-  #include <sys/types.h>
-  #include <sys/mman.h>
-  #endif
-
-"
-if test "x$ac_cv_have_decl_madvise" = x""yes; then :
-  ac_have_decl=1
 else
-  ac_have_decl=0
+  :
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MADVISE $ac_have_decl
-_ACEOF
-
-  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
+done
 
 
 
 
-  { $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 test "${ac_cv_gcc_atomic_builtins+set}" = set; then :
+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.  */
 
@@ -17344,66 +31518,67 @@ 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;
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_gcc_atomic_builtins=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_gcc_atomic_builtins=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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: $ac_cv_gcc_atomic_builtins" >&5
-$as_echo "$ac_cv_gcc_atomic_builtins" >&6; }
-
-  if test "x$ac_cv_gcc_atomic_builtins" = "xyes"; then :
-
-
-$as_echo "#define HAVE_GCC_ATOMIC_BUILTINS 1" >>confdefs.h
-
-
+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
 
 
-        save_CFLAGS="${CFLAGS}"
-    CFLAGS="${CFLAGS} -Werror"
-
-
+else
 
-  CFLAG_VISIBILITY=
-  HAVE_VISIBILITY=0
-  if test -n "$GCC"; then :
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
-$as_echo_n "checking for simple visibility declarations... " >&6; }
-    if test "${gl_cv_cc_visibility+set}" = set; then :
+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
 
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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);
+
 int
 main ()
 {
@@ -17412,187 +31587,257 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_cc_visibility=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  gl_cv_cc_visibility=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$gl_save_CFLAGS"
+  CXXFLAGS=$ax_check_save_flags
 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
-
+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
-  if test "x$SUNCC" = "xyes"; then :
-
-    CFLAG_VISIBILITY="-xldscope=hidden"
-    HAVE_VISIBILITY=1
 
+else
+  :
 fi
 
+done
 
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_VISIBILITY $HAVE_VISIBILITY
-_ACEOF
 
 
-    CFLAGS="${save_CFLAGS}"
+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 ()
+{
 
-  for ac_header in assert.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "assert.h" "ac_cv_header_assert_h" "$ac_includes_default"
-if test "x$ac_cv_header_assert_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ASSERT_H 1
+  ;
+  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
 
-done
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
-$as_echo_n "checking whether to enable assertions... " >&6; }
-  # Check whether --enable-assert was given.
-if test "${enable_assert+set}" = set; then :
-  enableval=$enable_assert; ac_cv_assert="no"
 else
-  ac_cv_assert="yes"
+  :
 fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_assert" >&5
-$as_echo "$ac_cv_assert" >&6; }
-
-  if test "$ac_cv_assert" = "no"; then :
+done
 
-$as_echo "#define NDEBUG 1" >>confdefs.h
 
 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 ()
+{
 
-
-
-
-
-  if test "$pandora_building_from_vc" = "yes"; then :
-  ac_cv_warnings_as_errors=yes
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_warnings_as_errors=no
+  eval "$as_CACHEVAR=no"
 fi
-
-  # Check whether --enable-profiling was given.
-if test "${enable_profiling+set}" = set; then :
-  enableval=$enable_profiling; ac_profiling="$enableval"
+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
-  ac_profiling="no"
+  CXXFLAGS="$flag"
 fi
 
-
-  # Check whether --enable-coverage was given.
-if test "${enable_coverage+set}" = set; then :
-  enableval=$enable_coverage; ac_coverage="$enableval"
 else
-  ac_coverage="no"
+  :
 fi
 
+done
+
 
-  if test "$GCC" = "yes"; then :
+fi
 
 
-    if test "$ac_profiling" = "yes"; then :
 
-      CC_PROFILING="-pg"
-      GCOV_LIBS="-pg -lgcov"
-      save_LIBS="${LIBS}"
-      LIBS=""
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for read in -lc_p" >&5
-$as_echo_n "checking for read in -lc_p... " >&6; }
-if test "${ac_cv_lib_c_p_read+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_p  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 read ();
 int
 main ()
 {
-return read ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_p_read=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_c_p_read=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_c_p_read" >&5
-$as_echo "$ac_cv_lib_c_p_read" >&6; }
-if test "x$ac_cv_lib_c_p_read" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBC_P 1
-_ACEOF
-
-  LIBS="-lc_p $LIBS"
-
+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
 
-      LIBC_P="${LIBS}"
-      LIBS="${save_LIBS}"
-
-
 else
-
-      CC_PROFILING=" "
-
+  :
 fi
 
-    if test "$ac_coverage" = "yes"; then :
-
-            CC_COVERAGE="--coverage"
-            GCOV_LIBS="-lgcov"
-
-fi
+done
 
 
 
-    if test "$ac_cv_warnings_as_errors" = "yes"; then :
-  W_FAIL="-Werror"
-fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -fdiagnostics-show-option" >&5
-$as_echo_n "checking whether it is safe to use -fdiagnostics-show-option... " >&6; }
-if test "${ac_cv_safe_to_use_fdiagnostics_show_option_+set}" = set; then :
+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
-  save_CFLAGS="$CFLAGS"
-       CFLAGS="-fdiagnostics-show-option ${AM_CFLAGS} ${CFLAGS}"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -17603,138 +31848,191 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_fdiagnostics_show_option_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_fdiagnostics_show_option_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$save_CFLAGS"
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_fdiagnostics_show_option_" >&5
-$as_echo "$ac_cv_safe_to_use_fdiagnostics_show_option_" >&6; }
 
-    if test "$ac_cv_safe_to_use_fdiagnostics_show_option_" = "yes"; then :
+done
 
-            F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
 
-fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wconversion" >&5
-$as_echo_n "checking whether it is safe to use -Wconversion... " >&6; }
-if test "${ac_cv_safe_to_use_wconversion_+set}" = set; then :
+
+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
-  save_CFLAGS="$CFLAGS"
-                     CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <stdbool.h>
-void foo(bool a)
-{
-  (void)a;
-}
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
 main ()
 {
 
-foo(0);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_wconversion_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_wconversion_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$save_CFLAGS"
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_wconversion_" >&5
-$as_echo "$ac_cv_safe_to_use_wconversion_" >&6; }
 
-    if test "$ac_cv_safe_to_use_wconversion_" = "yes"; then :
-  W_CONVERSION="-Wconversion"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wconversion with htons" >&5
-$as_echo_n "checking whether it is safe to use -Wconversion with htons... " >&6; }
-if test "${ac_cv_safe_to_use_Wconversion_+set}" = set; then :
+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
-  save_CFLAGS="$CFLAGS"
-                           CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <netinet/in.h>
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
 main ()
 {
 
-uint16_t x= htons(80);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wconversion_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wconversion_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         CFLAGS="$save_CFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wconversion_" >&5
-$as_echo "$ac_cv_safe_to_use_Wconversion_" >&6; }
-
-      if test "$ac_cv_safe_to_use_Wconversion_" = "no"; then :
-  NO_CONVERSION="-Wno-conversion"
+  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
 
-    NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing"
-    NO_SHADOW="-Wno-shadow"
-
-    if test "$INTELCC" = "yes"; then :
-
-
-        BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual"
-
-      CC_WARNINGS="${BASE_WARNINGS}"
-      CXX_WARNINGS="${BASE_WARNINGS}"
-
 else
+  :
+fi
 
+done
 
-        BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"
-        CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
-        CXX_WARNINGS_FULL="-Wold-style-cast"
-        NO_OLD_STYLE_CAST="-Wno-old-style-cast"
-        NO_EFF_CXX="-Wno-effc++"
 
+# Anything below this comment please keep sorted.
+# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute])
 
-      if test "${ac_cv_assert}" = "no"; then :
-  NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"
-fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wextra" >&5
-$as_echo_n "checking whether it is safe to use -Wextra... " >&6; }
-if test "${ac_cv_safe_to_use_Wextra_+set}" = set; then :
+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
-  save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
 
-#include <stdio.h>
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
 main ()
@@ -17743,48 +32041,63 @@ main ()
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wextra_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wextra_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$save_CFLAGS"
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wextra_" >&5
-$as_echo "$ac_cv_safe_to_use_Wextra_" >&6; }
 
-      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
-      if test "$ac_cv_safe_to_use_Wextra_" = "yes"; then :
-  BASE_WARNINGS="${BASE_WARNINGS} -Wextra"
 else
-  BASE_WARNINGS="${BASE_WARNINGS} -W"
+  :
 fi
 
-      CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
-      CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
+done
+
+
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wmissing-declarations from C++" >&5
-$as_echo_n "checking whether it is safe to use -Wmissing-declarations from C++... " >&6; }
-if test "${ac_cv_safe_to_use_Wmissing_declarations_+set}" = set; then :
+
+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
-  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
 
-         save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
-#include <stdio.h>
-
 int
 main ()
 {
@@ -17792,41 +32105,62 @@ main ()
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wmissing_declarations_=yes
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wmissing_declarations_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        CXXFLAGS="$save_CXXFLAGS"
-        ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+  CXXFLAGS=$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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wmissing_declarations_" >&5
-$as_echo "$ac_cv_safe_to_use_Wmissing_declarations_" >&6; }
-      if test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"; then :
-  CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"
+
+else
+  :
 fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wlogical-op" >&5
-$as_echo_n "checking whether it is safe to use -Wlogical-op... " >&6; }
-if test "${ac_cv_safe_to_use_Wlogical_op_+set}" = set; then :
+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
-  save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
 
-#include <stdio.h>
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
 main ()
@@ -17835,42 +32169,63 @@ main ()
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wlogical_op_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wlogical_op_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$save_CFLAGS"
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wlogical_op_" >&5
-$as_echo "$ac_cv_safe_to_use_Wlogical_op_" >&6; }
-      if test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"; then :
-  CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"
+
+else
+  :
 fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wredundant-decls from C++" >&5
-$as_echo_n "checking whether it is safe to use -Wredundant-decls from C++... " >&6; }
-if test "${ac_cv_safe_to_use_Wredundant_decls_+set}" = set; then :
+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
-  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
 
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-template <typename E> struct C { void foo(); };
-template <typename E> void C<E>::foo() { }
-template <> void C<int>::foo();
-            $ac_includes_default
 int
 main ()
 {
@@ -17880,66 +32235,60 @@ main ()
 }
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wredundant_decls_=yes
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wredundant_decls_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         CXXFLAGS="${save_CXXFLAGS}"
-         ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+  CXXFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wredundant_decls_" >&5
-$as_echo "$ac_cv_safe_to_use_Wredundant_decls_" >&6; }
-      if test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"; then :
-  CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"
+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
-  CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"
+  CXXFLAGS="$flag"
 fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wattributes from C++" >&5
-$as_echo_n "checking whether it is safe to use -Wattributes from C++... " >&6; }
-if test "${ac_cv_safe_to_use_Wattributes_+set}" = set; 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
+  :
+fi
 
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+done
 
-#include <google/protobuf/message.h>
-#include <google/protobuf/descriptor.h>
 
 
-const ::google::protobuf::EnumDescriptor* Table_TableOptions_RowType_descriptor();
-enum Table_TableOptions_RowType {
-  Table_TableOptions_RowType_ROW_TYPE_DEFAULT = 0,
-  Table_TableOptions_RowType_ROW_TYPE_FIXED = 1,
-  Table_TableOptions_RowType_ROW_TYPE_DYNAMIC = 2,
-  Table_TableOptions_RowType_ROW_TYPE_COMPRESSED = 3,
-  Table_TableOptions_RowType_ROW_TYPE_REDUNDANT = 4,
-  Table_TableOptions_RowType_ROW_TYPE_COMPACT = 5,
-  Table_TableOptions_RowType_ROW_TYPE_PAGE = 6
-};
 
-namespace google {
-namespace protobuf {
-template <>
-inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
-  return Table_TableOptions_RowType_descriptor();
-}
-}
-}
+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 ()
@@ -17950,33 +32299,60 @@ main ()
 }
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wattributes_=yes
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wattributes_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-          CXXFLAGS="${save_CXXFLAGS}"
-          ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  CXXFLAGS=$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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wattributes_" >&5
-$as_echo "$ac_cv_safe_to_use_Wattributes_" >&6; }
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to use -Wno-attributes" >&5
-$as_echo_n "checking whether it is safe to use -Wno-attributes... " >&6; }
-if test "${ac_cv_safe_to_use_Wno_attributes_+set}" = set; then :
+
+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
-  save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-
-#include <stdio.h>
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 int
 main ()
@@ -17985,1668 +32361,1410 @@ main ()
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_use_Wno_attributes_=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_safe_to_use_Wno_attributes_=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$save_CFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_use_Wno_attributes_" >&5
-$as_echo "$ac_cv_safe_to_use_Wno_attributes_" >&6; }
-
-                  if test "$ac_cv_safe_to_use_Wattributes_" != "yes"; then :
-
-        if test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"; then :
-
-          CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
-          NO_ATTRIBUTES="-Wno-attributes"
-fi
-fi
-
-
-      NO_REDUNDANT_DECLS="-Wno-redundant-decls"
-            PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
-      NO_WERROR="-Wno-error"
-      INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
-      if test "$host_vendor" = "apple"; then :
-
-        BOOSTSKIP_WARNINGS="-Wno-uninitialized"
-
+  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
 
-  if test "$SUNCC" = "yes"; then :
+done
 
 
-    if test "$ac_profiling" = "yes"; then :
-  CC_PROFILING="-xinstrument=datarace"
-fi
 
-    if test "$ac_cv_warnings_as_errors" = "yes"; then :
-  W_FAIL="-errwarn=%all"
-fi
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether E_PASTE_RESULT_NOT_TOKEN is usable" >&5
-$as_echo_n "checking whether E_PASTE_RESULT_NOT_TOKEN is usable... " >&6; }
-if test "${ac_cv_paste_result+set}" = set; then :
+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
 
-        save_CFLAGS="${CFLAGS}"
-        CFLAGS="-errwarn=%all -erroff=E_PASTE_RESULT_NOT_TOKEN ${CFLAGS}"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-            $ac_includes_default
-
 int
 main ()
 {
 
-            int x= 0;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_paste_result=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_paste_result=no
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        CFLAGS="${save_CFLAGS}"
-
+  CXXFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_paste_result" >&5
-$as_echo "$ac_cv_paste_result" >&6; }
-    if test $ac_cv_paste_result = yes; then :
-  W_PASTE_RESULT=",E_PASTE_RESULT_NOT_TOKEN"
+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
 
-
-
-      CC_WARNINGS_FULL="-erroff=E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
-      CXX_WARNINGS_FULL="-erroff=inllargeuse"
-
-
-    CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL} ${CFLAG_VISIBILITY}"
-    CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL} ${CFLAG_VISIBILITY}"
-    PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit"
-    BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem"
-    NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
-    NO_WERROR="-errwarn=%none"
-
-
+else
+  :
 fi
 
+done
 
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-  # Check whether --enable-dtrace was given.
-if test "${enable_dtrace+set}" = set; then :
-  enableval=$enable_dtrace; ac_cv_enable_dtrace="$enableval"
+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
-  ac_cv_enable_dtrace="yes"
-fi
 
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  if test "$ac_cv_enable_dtrace" = "yes"; then :
+int
+main ()
+{
 
-    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 test "${ac_cv_prog_DTRACE+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DTRACE"; then
-  ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
-
+  eval "$as_CACHEVAR=no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 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
-
-    if test "x$ac_cv_prog_DTRACE" = "xdtrace"; then :
-
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace works" >&5
-$as_echo_n "checking if dtrace works... " >&6; }
-if test "${ac_cv_dtrace_works+set}" = set; 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
+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
-  ac_cv_dtrace_works=no
+  CXXFLAGS="$flag"
 fi
-        rm -f conftest.h conftest.d
 
+else
+  :
 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 :
 
+done
 
-$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 test "${ac_cv_dtrace_needs_objects+set}" = set; then :
+
+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
 
-                    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
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-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
+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
-
- if test "x$ac_cv_dtrace_works" = "xyes"; then
-  HAVE_DTRACE_TRUE=
-  HAVE_DTRACE_FALSE='#'
+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
-  HAVE_DTRACE_TRUE='#'
-  HAVE_DTRACE_FALSE=
+  CXXFLAGS="$flag"
 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
 
+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 ()
+{
 
-
-
-    use_additional=yes
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-lib-prefix was given.
-if test "${with_lib_prefix+set}" = set; then :
-  withval=$with_lib_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-
+  ;
+  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
 
-  if test $use_additional = yes; then
-                            if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
+else
+  :
+fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+done
 
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-                        CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-                            if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-      haveit=
-      for x in $LDFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-                        LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
 
 
 
+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 ()
+{
 
-  # Check whether --enable-umem was given.
-if test "${enable_umem+set}" = set; then :
-  enableval=$enable_umem; ac_enable_umem="$enableval"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-
-      case "$target_os" in
-        *solaris*)
-          ac_enable_umem="yes"
-        ;;
-        *)
-          ac_enable_umem="no"
-        ;;
-      esac
-
+  eval "$as_CACHEVAR=no"
 fi
-
-
-  # Check whether --enable-tcmalloc was given.
-if test "${enable_tcmalloc+set}" = set; then :
-  enableval=$enable_tcmalloc; ac_enable_tcmalloc="$enableval"
+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
-  ac_enable_tcmalloc="no"
+  CXXFLAGS="$flag"
 fi
 
-
-  # Check whether --enable-mtmalloc was given.
-if test "${enable_mtmalloc+set}" = set; then :
-  enableval=$enable_mtmalloc; ac_enable_mtmalloc="$enableval"
 else
-  ac_enable_mtmalloc="yes"
+  :
 fi
 
+done
+
+
 
-  save_LIBS="${LIBS}"
-  LIBS=
-  if test "x$ac_enable_umem" = "xyes"; then :
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lumem" >&5
-$as_echo_n "checking for malloc in -lumem... " >&6; }
-if test "${ac_cv_lib_umem_malloc+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lumem  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 malloc ();
 int
 main ()
 {
-return malloc ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_umem_malloc=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_umem_malloc=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_malloc" >&5
-$as_echo "$ac_cv_lib_umem_malloc" >&6; }
-if test "x$ac_cv_lib_umem_malloc" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUMEM 1
-_ACEOF
-
-  LIBS="-lumem $LIBS"
 
+else
+  :
 fi
 
+done
 
-else
 
-    case "$target_os" in
-      *linux*)
-        if test "x$ac_enable_tcmalloc" != "xno"; then :
 
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ltcmalloc-minimal" >&5
-$as_echo_n "checking for malloc in -ltcmalloc-minimal... " >&6; }
-if test "${ac_cv_lib_tcmalloc_minimal_malloc+set}" = set; then :
+
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltcmalloc-minimal  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 malloc ();
 int
 main ()
 {
-return malloc ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tcmalloc_minimal_malloc=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_tcmalloc_minimal_malloc=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcmalloc_minimal_malloc" >&5
-$as_echo "$ac_cv_lib_tcmalloc_minimal_malloc" >&6; }
-if test "x$ac_cv_lib_tcmalloc_minimal_malloc" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBTCMALLOC_MINIMAL 1
-_ACEOF
-
-  LIBS="-ltcmalloc-minimal $LIBS"
 
+else
+  :
 fi
 
-          if test "x$ac_cv_lib_tcmalloc_minimal_malloc" != "xyes"; then :
+done
+
+
 
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ltcmalloc" >&5
-$as_echo_n "checking for malloc in -ltcmalloc... " >&6; }
-if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then :
+
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltcmalloc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 malloc ();
 int
 main ()
 {
-return malloc ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tcmalloc_malloc=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_tcmalloc_malloc=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcmalloc_malloc" >&5
-$as_echo "$ac_cv_lib_tcmalloc_malloc" >&6; }
-if test "x$ac_cv_lib_tcmalloc_malloc" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBTCMALLOC 1
-_ACEOF
-
-  LIBS="-ltcmalloc $LIBS"
 
+else
+  :
 fi
 
+done
+
 
-fi
 
-fi
-        ;;
-      *solaris*)
-        if test "x$ac_enable_mtmalloc" != "xno"; then :
 
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lmtmalloc" >&5
-$as_echo_n "checking for malloc in -lmtmalloc... " >&6; }
-if test "${ac_cv_lib_mtmalloc_malloc+set}" = set; then :
+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
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmtmalloc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 malloc ();
 int
 main ()
 {
-return malloc ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_mtmalloc_malloc=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_lib_mtmalloc_malloc=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+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: $ac_cv_lib_mtmalloc_malloc" >&5
-$as_echo "$ac_cv_lib_mtmalloc_malloc" >&6; }
-if test "x$ac_cv_lib_mtmalloc_malloc" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBMTMALLOC 1
-_ACEOF
-
-  LIBS="-lmtmalloc $LIBS"
-
+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
-        ;;
-    esac
 
-fi
-  BETTER_MALLOC_LIBS="${LIBS}"
-  LIBS="${save_LIBS}"
+done
 
 
 
 
-  for ac_prog in doxygen
-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 test "${ac_cv_prog_DOXYGEN+set}" = set; then :
+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
-  if test -n "$DOXYGEN"; then
-  ac_cv_prog_DOXYGEN="$DOXYGEN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_DOXYGEN="$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
-DOXYGEN=$ac_cv_prog_DOXYGEN
-if test -n "$DOXYGEN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
-$as_echo "$DOXYGEN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  test -n "$DOXYGEN" && break
-done
+int
+main ()
+{
 
-  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 test "${ac_cv_prog_PERL+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PERL"; then
-  ac_cv_prog_PERL="$PERL" # Let the user override the test.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
-
+  eval "$as_CACHEVAR=no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 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; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
+fi
 
-  test -n "$PERL" && break
 done
 
-  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 test "${ac_cv_prog_DPKG_GENSYMBOLS+set}" = set; then :
+
+
+
+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
-  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
 
+  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
-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; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 fi
 
-
-  test -n "$DPKG_GENSYMBOLS" && break
-done
-test -n "$DPKG_GENSYMBOLS" || DPKG_GENSYMBOLS=":"
-
-
-   if test "x${DPKG_GENSYMBOLS}" != "x:"; then
-  HAVE_DPKG_GENSYMBOLS_TRUE=
-  HAVE_DPKG_GENSYMBOLS_FALSE='#'
 else
-  HAVE_DPKG_GENSYMBOLS_TRUE='#'
-  HAVE_DPKG_GENSYMBOLS_FALSE=
+  :
 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 ()
+{
 
-
-
-
-  if test "x${gl_LIBOBJS}" != "x"; then :
-
-    if test "$GCC" = "yes"; then :
-
-      AM_CPPFLAGS="-isystem \${top_srcdir}/gnulib -isystem \${top_builddir}/gnulib ${AM_CPPFLAGS}"
-
+  ;
+  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
-
-    AM_CPPFLAGS="-I\${top_srcdir}/gnulib -I\${top_builddir}/gnulib ${AM_CPPFLAGS}"
-
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
 fi
 
-    AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}"
-
+done
 
 
 
-  if test "$GCC" = "yes"; then :
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working -pipe" >&5
-$as_echo_n "checking for working -pipe... " >&6; }
-if test "${pandora_cv_use_pipe+set}" = set; then :
+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
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <stdio.h>
-
-int main(int argc, char** argv)
+int
+main ()
 {
-  (void) argc; (void) argv;
+
+  ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pandora_cv_use_pipe=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_use_pipe=no
+  eval "$as_CACHEVAR=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: $pandora_cv_use_pipe" >&5
-$as_echo "$pandora_cv_use_pipe" >&6; }
-    if test "$pandora_cv_use_pipe" = "yes"; then :
-
-      AM_CFLAGS="-pipe ${AM_CFLAGS}"
-      AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}"
-
+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
 
-
-
-  AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
-  AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
-
-
-
-
-
-
-
-
-#shared library versioning
-MEMCACHED_UTIL_LIBRARY_VERSION=1:0:0
-MEMCACHED_PROTOCAL_LIBRARY_VERSION=0:0:0
-MEMCACHED_LIBRARY_VERSION=6: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
-
-
-
-
-
-HASHKIT_LIBRARY_VERSION=0:0:0
-
-
+done
 
 
 
 
-{ $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 test "${ac_cv_search_getopt_long+set}" = set; then :
+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
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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
+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_exeext
-  if test "${ac_cv_search_getopt_long+set}" = set; then :
-  break
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-done
-if test "${ac_cv_search_getopt_long+set}" = set; then :
-
+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
-  ac_cv_search_getopt_long=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+  CXXFLAGS="$flag"
 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"
 
+else
+  :
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
-$as_echo_n "checking for library containing gethostbyname... " >&6; }
-if test "${ac_cv_search_gethostbyname+set}" = set; then :
+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
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 test "${ac_cv_search_gethostbyname+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_gethostbyname+set}" = set; 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
-
-
-for ac_func in getline
-do :
-  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
-if test "x$ac_cv_func_getline" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_GETLINE 1
-_ACEOF
-
-fi
-done
-
-
-
-# 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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  with_gnu_ld=no
+  eval "$as_CACHEVAR=no"
 fi
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 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 GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&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.
-    [\\/]* | [A-Za-z]:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the path 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"
+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; }
       ;;
-  "")
-    # 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 test "${acl_cv_path_LD+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
-      *)
-	test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
+    *)
+      { { $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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 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 test "${acl_cv_prog_gnu_ld+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+
 else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-$as_echo "$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
+
+done
 
 
 
 
-                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if test "${acl_cv_rpath+set}" = set; then :
+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
 
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  acl_libext="$acl_cv_libext"
-  acl_shlibext="$acl_cv_shlibext"
-  acl_libname_spec="$acl_cv_libname_spec"
-  acl_library_names_spec="$acl_cv_library_names_spec"
-  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  acl_hardcode_direct="$acl_cv_hardcode_direct"
-  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-    # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
-  enableval=$enable_rpath; :
+
 else
-  enable_rpath=yes
+  :
 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 ()
+{
 
-  # Check whether --enable-libgtest was given.
-if test "${enable_libgtest+set}" = set; then :
-  enableval=$enable_libgtest; ac_enable_libgtest="$enableval"
+  ;
+  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
-  ac_enable_libgtest="yes"
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
+fi
 
-  if test "x$ac_enable_libgtest" = "xyes"; then :
+done
 
-    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
 
+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.  */
 
-    use_additional=yes
-  if test "x$GCC" = "xyes" -a "x" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
+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
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+else
+  :
+fi
 
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
+done
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
 
-# Check whether --with-libgtest-prefix was given.
-if test "${with_libgtest_prefix+set}" = set; then :
-  withval=$with_libgtest_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+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
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+int
+main ()
+{
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
+  ;
+  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
 
-      LIBGTEST=
-  LTLIBGTEST=
-  INCGTEST=
-  LIBGTEST_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='gtest '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBGTEST; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBGTEST; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBGTEST="${LIBGTEST}${LIBGTEST:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBGTEST="${LIBGTEST}${LIBGTEST:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$found_a"
-              else
-                                                LIBGTEST="${LIBGTEST}${LIBGTEST:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'gtest'; then
-                  LIBGTEST_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'gtest'; then
-                  LIBGTEST_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCGTEST; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCGTEST="${INCGTEST}${INCGTEST:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBGTEST; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBGTEST="${LIBGTEST}${LIBGTEST:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBGTEST; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$dep"
-                    LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBGTEST="${LIBGTEST}${LIBGTEST:+ }-l$name"
-            LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBGTEST="${LIBGTEST}${LIBGTEST:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBGTEST="${LTLIBGTEST}${LTLIBGTEST:+ }-R$found_dir"
-    done
-  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
 
-        ac_save_CPPFLAGS="$CPPFLAGS"
+else
+  :
+fi
 
-  for element in $INCGTEST; do
-    haveit=
-    for x in $CPPFLAGS; do
+done
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgtest" >&5
-$as_echo_n "checking for libgtest... " >&6; }
-if test "${ac_cv_libgtest+set}" = set; then :
+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
 
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBGTEST"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-      #include <gtest/gtest.h>
-TEST(pandora_test_libgtest, PandoraTest)
-{
-  ASSERT_EQ(1, 1);
-}
-
 int
 main ()
 {
@@ -19655,4174 +33773,2949 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_libgtest=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_libgtest=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
-
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgtest" >&5
-$as_echo "$ac_cv_libgtest" >&6; }
-  if test "$ac_cv_libgtest" = yes; then
-    HAVE_LIBGTEST=yes
-
-$as_echo "#define HAVE_LIBGTEST 1" >>confdefs.h
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgtest" >&5
-$as_echo_n "checking how to link with libgtest... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGTEST" >&5
-$as_echo "$LIBGTEST" >&6; }
-  else
-    HAVE_LIBGTEST=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBGTEST=
-    LTLIBGTEST=
-    LIBGTEST_PREFIX=
-  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
 
-    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_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
-
-    ac_cv_libgtest="no"
-
+  eval "$as_CACHEVAR=no"
 fi
-
-   if test "x${ac_cv_libgtest}" = "xyes"; then
-  HAVE_LIBGTEST_TRUE=
-  HAVE_LIBGTEST_FALSE='#'
+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
-  HAVE_LIBGTEST_TRUE='#'
-  HAVE_LIBGTEST_FALSE=
+  CXXFLAGS="$flag"
 fi
 
-
-
-
-
-
-
-  # Check whether --enable-libevent was given.
-if test "${enable_libevent+set}" = set; then :
-  enableval=$enable_libevent; ac_enable_libevent="$enableval"
 else
-  ac_enable_libevent="yes"
+  :
 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 ()
+{
 
-
-
-
-
-
-
-
-
-
-
-    use_additional=yes
-  if test "x$GCC" = "xyes" -a "x" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
-
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-libevent-prefix was given.
-if test "${with_libevent_prefix+set}" = set; then :
-  withval=$with_libevent_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
-
+  ;
+  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
 
-      LIBEVENT=
-  LTLIBEVENT=
-  INCEVENT=
-  LIBEVENT_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='event '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBEVENT; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBEVENT; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBEVENT="${LIBEVENT}${LIBEVENT:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBEVENT="${LIBEVENT}${LIBEVENT:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$found_a"
-              else
-                                                LIBEVENT="${LIBEVENT}${LIBEVENT:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'event'; then
-                  LIBEVENT_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'event'; then
-                  LIBEVENT_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCEVENT; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCEVENT="${INCEVENT}${INCEVENT:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBEVENT; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBEVENT="${LIBEVENT}${LIBEVENT:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBEVENT; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$dep"
-                    LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBEVENT="${LIBEVENT}${LIBEVENT:+ }-l$name"
-            LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBEVENT="${LIBEVENT}${LIBEVENT:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBEVENT="${LTLIBEVENT}${LTLIBEVENT:+ }-R$found_dir"
-    done
-  fi
-
-
-
-
-
-
-
-        ac_save_CPPFLAGS="$CPPFLAGS"
+else
+  :
+fi
 
-  for element in $INCEVENT; do
-    haveit=
-    for x in $CPPFLAGS; do
+done
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libevent" >&5
-$as_echo_n "checking for libevent... " >&6; }
-if test "${ac_cv_libevent+set}" = set; then :
+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
 
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBEVENT"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-    #include <sys/types.h>
-    #include <sys/time.h>
-    #include <stdlib.h>
-    #include <event.h>
-
 int
 main ()
 {
 
-    struct bufferevent bev;
-    bufferevent_settimeout(&bev, 1, 1);
-    event_init();
-    event_loop(EVLOOP_ONCE);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_libevent=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_libevent=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
-
+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: $ac_cv_libevent" >&5
-$as_echo "$ac_cv_libevent" >&6; }
-  if test "$ac_cv_libevent" = yes; then
-    HAVE_LIBEVENT=yes
-
-$as_echo "#define HAVE_LIBEVENT 1" >>confdefs.h
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libevent" >&5
-$as_echo_n "checking how to link with libevent... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEVENT" >&5
-$as_echo "$LIBEVENT" >&6; }
-  else
-    HAVE_LIBEVENT=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBEVENT=
-    LTLIBEVENT=
-    LIBEVENT_PREFIX=
-  fi
-
-
-
-
-
-
-
-
-   if test "x${ac_cv_libevent}" = "xyes"; then
-  HAVE_LIBEVENT_TRUE=
-  HAVE_LIBEVENT_FALSE='#'
+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
-  HAVE_LIBEVENT_TRUE='#'
-  HAVE_LIBEVENT_FALSE=
+  CXXFLAGS="$flag"
 fi
 
-
-  if test "x${ac_cv_libevent}" = "xyes"; then :
-
-    save_LIBS="${LIBS}"
-    LIBS="${LIBS} ${LTLIBEVENT}"
-    for ac_func in event_base_new
-do :
-  ac_fn_c_check_func "$LINENO" "event_base_new" "ac_cv_func_event_base_new"
-if test "x$ac_cv_func_event_base_new" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_NEW 1
-_ACEOF
-
+else
+  :
 fi
-done
-
-    for ac_func in event_base_free
-do :
-  ac_fn_c_check_func "$LINENO" "event_base_free" "ac_cv_func_event_base_free"
-if test "x$ac_cv_func_event_base_free" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_FREE 1
-_ACEOF
 
-fi
 done
 
-    for ac_func in event_base_get_method
-do :
-  ac_fn_c_check_func "$LINENO" "event_base_get_method" "ac_cv_func_event_base_get_method"
-if test "x$ac_cv_func_event_base_get_method" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_EVENT_BASE_GET_METHOD 1
-_ACEOF
-
-fi
-done
 
-    LIBS="$save_LIBS"
 
-fi
 
+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
 
-my_saved_libs="$LIBS"
-LIBS=
+else
+  :
+fi
 
+done
 
 
-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
 
-acx_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.
+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
 
-# 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
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  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 :
-  acx_pthread_ok=yes
+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_exeext conftest.$ac_ext
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
+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
 
-# 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.
-
-acx_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:
+else
+  :
+fi
 
-# 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)
+done
 
-case "${host_cpu}-${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:
 
-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
-        ;;
-esac
 
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
+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
 
-        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; }
-                ;;
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-                -*)
-                { $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"
-                ;;
+int
+main ()
+{
 
-		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 test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$acx_pthread_config"; then
-  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_acx_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_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+  eval "$as_CACHEVAR=no"
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
+fi
 
-		if test x"$acx_pthread_config" = xno; then continue; fi
-		PTHREAD_CFLAGS="`pthread-config --cflags`"
-		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-		;;
+done
 
-                *)
-                { $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"
+#         _APPEND_COMPILE_FLAGS_ERROR([-Weffc++])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast])
 
-        # 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
+
+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.  */
-#include <pthread.h>
+
 int
 main ()
 {
-pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  acx_pthread_ok=yes
+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
-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: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
+else
+  :
+fi
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
 done
-fi
 
-# Various other checks:
-if test "x$acx_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
+
+
+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.  */
-#include <pthread.h>
+
 int
 main ()
 {
-int attr=$attr; return attr;
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  attr_name=$attr; break
+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
-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
+else
+  :
+fi
 
-        fi
+done
 
-        { $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_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        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
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with xlc_r or cc_r
-	if test x"$GCC" != xyes; then
-          for ac_prog in xlc_r 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 test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
+
+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
-  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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
 
+  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
-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; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 fi
 
-
-  test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
-
-        else
-          PTHREAD_CC=$CC
-	fi
 else
-        PTHREAD_CC="$CC"
+  :
 fi
 
+done
 
 
 
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-
-$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
-        :
+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
-        acx_pthread_ok=no
-
-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
 
+  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
 
-  LIBS="${PTHREAD_LIBS} ${LIBS}"
-  AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
-  AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
+else
+  :
+fi
 
+done
 
 
-  save_CFLAGS="${CFLAGS}"
-  save_CXXFLAGS="${CXXFLAGS}"
-  CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
-  CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
-    for ac_func in pthread_yield_np
-do :
-  ac_fn_c_check_func "$LINENO" "pthread_yield_np" "ac_cv_func_pthread_yield_np"
-if test "x$ac_cv_func_pthread_yield_np" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PTHREAD_YIELD_NP 1
-_ACEOF
 
-fi
-done
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_yield takes zero arguments" >&5
-$as_echo_n "checking if pthread_yield takes zero arguments... " >&6; }
-if test "${pandora_cv_pthread_yield_zero_arg+set}" = set; then :
+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.  */
 
-
-#include <pthread.h>
-
 int
 main ()
 {
 
-  pthread_yield();
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_pthread_yield_zero_arg=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_pthread_yield_zero_arg=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_pthread_yield_zero_arg" >&5
-$as_echo "$pandora_cv_pthread_yield_zero_arg" >&6; }
-  if test "$pandora_cv_pthread_yield_zero_arg" = "yes"; then :
 
+done
 
-$as_echo "#define HAVE_PTHREAD_YIELD_ZERO_ARG 1" >>confdefs.h
 
 
-fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_yield takes one argument" >&5
-$as_echo_n "checking if pthread_yield takes one argument... " >&6; }
-if test "${pandora_cv_pthread_yield_one_arg+set}" = set; then :
+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.  */
 
-
-#include <pthread.h>
-
 int
 main ()
 {
 
-  pthread_yield(0);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_pthread_yield_one_arg=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_pthread_yield_one_arg=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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: $pandora_cv_pthread_yield_one_arg" >&5
-$as_echo "$pandora_cv_pthread_yield_one_arg" >&6; }
-  if test "$pandora_cv_pthread_yield_one_arg" = "yes"; then :
-
-
-$as_echo "#define HAVE_PTHREAD_YIELD_ONE_ARG 1" >>confdefs.h
-
-
+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
 
-  for ac_func in pthread_attr_getstacksize pthread_attr_setprio \
-    pthread_attr_setschedparam \
-    pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
-    pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
-    pthread_setprio_np pthread_setschedparam pthread_sigmask \
-    pthread_attr_create rwlock_init
-
-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"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+else
+  :
 fi
+
 done
 
 
 
 
-# Check definition of pthread_getspecific
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking args to pthread_getspecific" >&5
-$as_echo_n "checking args to pthread_getspecific... " >&6; }
-if test "${pandora_cv_getspecific_args+set}" = set; then :
+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.  */
 
-#if !defined(_REENTRANT)
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
-
 int
 main ()
 {
 
-void *pthread_getspecific(pthread_key_t key);
-pthread_getspecific((pthread_key_t) NULL);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pandora_cv_getspecific_args=POSIX
+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
-  pandora_cv_getspecific_args=other
+  CXXFLAGS="$flag"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_getspecific_args" >&5
-$as_echo "$pandora_cv_getspecific_args" >&6; }
-  if test "$pandora_cv_getspecific_args" = "other"
-  then
 
-$as_echo "#define HAVE_NONPOSIX_PTHREAD_GETSPECIFIC 1" >>confdefs.h
+done
+
+
 
-  fi
 
-  # Check definition of pthread_mutex_init
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking args to pthread_mutex_init" >&5
-$as_echo_n "checking args to pthread_mutex_init... " >&6; }
-if test "${pandora_cv_mutex_init_args+set}" = set; then :
+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.  */
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
 int
 main ()
 {
 
-  pthread_mutexattr_t attr;
-  pthread_mutex_t mp;
-  pthread_mutex_init(&mp,&attr);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  pandora_cv_mutex_init_args=POSIX
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_mutex_init_args=other
+  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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_mutex_init_args" >&5
-$as_echo "$pandora_cv_mutex_init_args" >&6; }
-  if test "$pandora_cv_mutex_init_args" = "other"
-  then
 
-$as_echo "#define HAVE_NONPOSIX_PTHREAD_MUTEX_INIT 1" >>confdefs.h
+else
+  :
+fi
+
+done
+
+
 
-  fi
-#---END:
 
-#---START: Used in for client configure
-# Check definition of readdir_r
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking args to readdir_r" >&5
-$as_echo_n "checking args to readdir_r... " >&6; }
-if test "${pandora_cv_readdir_r+set}" = set; then :
+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.  */
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
-#include <dirent.h>
 int
 main ()
 {
- int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
-readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL);
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_readdir_r=POSIX
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_readdir_r=other
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_readdir_r" >&5
-$as_echo "$pandora_cv_readdir_r" >&6; }
-if test "$pandora_cv_readdir_r" = "POSIX"
-then
-
-$as_echo "#define HAVE_READDIR_R 1" >>confdefs.h
 
+else
+  :
 fi
 
-# Check definition of posix sigwait()
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of sigwait" >&5
-$as_echo_n "checking style of sigwait... " >&6; }
-if test "${pandora_cv_sigwait+set}" = set; then :
+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.  */
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
-#include <signal.h>
-
 int
 main ()
 {
 
-#ifndef _AIX
-sigset_t set;
-int sig;
-sigwait(&set,&sig);
-#endif
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_sigwait=POSIX
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_sigwait=other
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_sigwait" >&5
-$as_echo "$pandora_cv_sigwait" >&6; }
-if test "$pandora_cv_sigwait" = "POSIX"
-then
-
-$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
 
+else
+  :
 fi
 
-if test "$pandora_cv_sigwait" != "POSIX"
-then
-unset pandora_cv_sigwait
-# Check definition of posix sigwait()
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking style of sigwait" >&5
-$as_echo_n "checking style of sigwait... " >&6; }
-if test "${pandora_cv_sigwait+set}" = set; then :
+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.  */
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
-#include <signal.h>
-
 int
 main ()
 {
 
-sigset_t set;
-int sig;
-sigwait(&set);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_sigwait=NONPOSIX
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_sigwait=other
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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: $pandora_cv_sigwait" >&5
-$as_echo "$pandora_cv_sigwait" >&6; }
-if test "$pandora_cv_sigwait" = "NONPOSIX"
-then
-
-$as_echo "#define HAVE_NONPOSIX_SIGWAIT 1" >>confdefs.h
-
+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
-#---END:
 
-# Check if pthread_attr_setscope() exists
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_attr_setscope" >&5
-$as_echo_n "checking for pthread_attr_setscope... " >&6; }
-if test "${pandora_cv_pthread_attr_setscope+set}" = set; then :
+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.  */
 
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS
-#endif
-#include <pthread.h>
-
 int
 main ()
 {
 
-pthread_attr_t thr_attr;
-pthread_attr_setscope(&thr_attr,0);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pandora_cv_pthread_attr_setscope=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_pthread_attr_setscope=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_pthread_attr_setscope" >&5
-$as_echo "$pandora_cv_pthread_attr_setscope" >&6; }
-if test "$pandora_cv_pthread_attr_setscope" = "yes"
-then
-
-$as_echo "#define HAVE_PTHREAD_ATTR_SETSCOPE 1" >>confdefs.h
 
+else
+  :
 fi
 
+done
+
+
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_yield takes zero arguments" >&5
-$as_echo_n "checking if pthread_yield takes zero arguments... " >&6; }
-if test "${ac_cv_pthread_yield_zero_arg+set}" = set; then :
+
+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.  */
-#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
 
 int
 main ()
 {
 
-  pthread_yield();
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_pthread_yield_zero_arg=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_pthread_yield_zero_arg=yeso
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_yield_zero_arg" >&5
-$as_echo "$ac_cv_pthread_yield_zero_arg" >&6; }
-if test "$ac_cv_pthread_yield_zero_arg" = "yes"
-then
-
-$as_echo "#define HAVE_PTHREAD_YIELD_ZERO_ARG 1" >>confdefs.h
 
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_yield takes 1 argument" >&5
-$as_echo_n "checking if pthread_yield takes 1 argument... " >&6; }
-if test "${ac_cv_pthread_yield_one_arg+set}" = set; then :
+
+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.  */
-#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
 
 int
 main ()
 {
 
-  pthread_yield(0);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_pthread_yield_one_arg=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_pthread_yield_one_arg=no
+  eval "$as_CACHEVAR=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_pthread_yield_one_arg" >&5
-$as_echo "$ac_cv_pthread_yield_one_arg" >&6; }
-if test "$ac_cv_pthread_yield_one_arg" = "yes"
-then
-
-$as_echo "#define HAVE_PTHREAD_YIELD_ONE_ARG 1" >>confdefs.h
-
-fi
-
-  CFLAGS="${save_CFLAGS}"
-  CXXFLAGS="${save_CXXFLAGS}"
-
-
-
-
-
-
-
-  if test "x$acx_pthread_ok" != "xyes"; then :
-
-    as_fn_error "could not find libpthread" "$LINENO" 5
+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
 
-LIBS="$my_saved_libs"
-
-
-  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
-
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
-  for ac_header in cxxabi.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "cxxabi.h" "ac_cv_header_cxxabi_h" "$ac_includes_default"
-if test "x$ac_cv_header_cxxabi_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_CXXABI_H 1
-_ACEOF
-
+else
+  :
 fi
 
 done
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for abi::__cxa_demangle" >&5
-$as_echo_n "checking checking for abi::__cxa_demangle... " >&6; }
-if test "${pandora_cv_cxa_demangle+set}" = set; then :
+
+#         _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.  */
-#include <cxxabi.h>
+
 int
 main ()
 {
 
-    char *foo= 0; int bar= 0;
-    foo= abi::__cxa_demangle(foo, foo, 0, &bar);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  pandora_cv_cxa_demangle=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  pandora_cv_cxa_demangle=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pandora_cv_cxa_demangle" >&5
-$as_echo "$pandora_cv_cxa_demangle" >&6; }
-  CXXFLAGS="${save_CXXFLAGS}"
-  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$pandora_cv_cxa_demangle" = xyes; then :
-
-
-$as_echo "#define HAVE_ABI_CXA_DEMANGLE 1" >>confdefs.h
-
 
+else
+  :
 fi
 
+done
 
 
+                #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector])
+                #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4])
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htonll" >&5
-$as_echo_n "checking for htonll... " >&6; }
-if test "${ac_cv_have_htonll+set}" = set; then :
+
+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.  */
 
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <inttypes.h>
-
 int
 main ()
 {
 
-return htonll(0);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-   ac_cv_have_htonll=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-   ac_cv_have_htonll=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
+  eval "$as_CACHEVAR=no"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_htonll" >&5
-$as_echo "$ac_cv_have_htonll" >&6; }
-    if test "x$ac_cv_have_htonll" = "xyes"; then :
-
-
-$as_echo "#define HAVE_HTONLL 1" >>confdefs.h
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-
-     if test "x$ac_cv_have_htonll" = "xno"; then
-  BUILD_BYTEORDER_TRUE=
-  BUILD_BYTEORDER_FALSE='#'
+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
-  BUILD_BYTEORDER_TRUE='#'
-  BUILD_BYTEORDER_FALSE=
+  CXXFLAGS="$flag"
 fi
 
-
-
-  # Check whether --enable-utils was given.
-if test "${enable_utils+set}" = set; then :
-  enableval=$enable_utils; BUILD_UTILLIB="$enableval"
 else
-  BUILD_UTILLIB="yes"
+  :
 fi
 
+done
 
-  if test "x$BUILD_UTILLIB" = "xyes"; then
-    if test x"$acx_pthread_ok" != "xyes"; then
-      as_fn_error "Sorry you need POSIX thread library to build libmemcachedutil." "$LINENO" 5
-    fi
-
-$as_echo "#define HAVE_LIBMEMCACHEDUTIL 1" >>confdefs.h
 
-  fi
 
-   if test "x$BUILD_UTILLIB" = "xyes"; then
-  BUILD_LIBMEMCACHEDUTIL_TRUE=
-  BUILD_LIBMEMCACHEDUTIL_FALSE='#'
-else
-  BUILD_LIBMEMCACHEDUTIL_TRUE='#'
-  BUILD_LIBMEMCACHEDUTIL_FALSE=
+fi
+fi
+fi
 fi
 
+          if test "x$MINGW" != xyes; then :
 
+                if test "x$enable_shared" = "xyes"; then :
+  case $ax_harden_sanitize in #(
+  thread) :
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working SO_SNDTIMEO" >&5
-$as_echo_n "checking for working SO_SNDTIMEO... " >&6; }
-if test "${ac_cv_have_so_sndtimeo+set}" = set; then :
+
+
+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
-  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
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-
 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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_have_so_sndtimeo=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+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
 
-   if test "x$ac_cv_have_so_sndtimeo" = "xyes"; then :
-
-
-$as_echo "#define HAVE_SNDTIMEO 1" >>confdefs.h
+done
 
-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
+          ;; #(
+  address) :
 
 
-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 test "${ac_cv_have_so_rcvtimeo+set}" = set; then :
+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
-  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
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-
 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
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=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
+  eval "$as_CACHEVAR=no"
 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
-
-
+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: $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
+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
-  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
-
+  CXXFLAGS="$flag"
 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
 
+done
 
+          ;; #(
+  rest) :
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported struct padding" >&5
-$as_echo_n "checking for supported struct padding... " >&6; }
-if test "${ac_cv_supported_struct_padding+set}" = set; then :
+
+
+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
 
-    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
-
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -I${srcdir}"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <inttypes.h>
-#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_c_try_compile "$LINENO"; then :
-   ac_cv_supported_struct_padding=no
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-   ac_cv_supported_struct_padding=yes
+  eval "$as_CACHEVAR=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   CFLAGS="$save_CFLAGS"
-   ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
+  CXXFLAGS=$ax_check_save_flags
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_supported_struct_padding" >&5
-$as_echo "$ac_cv_supported_struct_padding" >&6; }
-  if test "x$ac_cv_supported_struct_padding" = "xno"; then :
-
-        as_fn_error "Unsupported struct padding done by compiler." "$LINENO" 5
+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
 
-
-# Check whether --with-memcached was given.
-if test "${with_memcached+set}" = set; then :
-  withval=$with_memcached; ac_cv_with_memcached="$withval"
 else
-  ac_cv_with_memcached=memcached
+  :
 fi
 
+done
 
-  # just ignore the user if --without-memcached is passed.. it is
-  # only used by make test
-  if test "x$withval" = "xno"; then :
 
-      ac_cv_with_memcached=memcached
-      MEMC_BINARY=memcached
 
-else
 
-       if test -f "$withval"; then :
+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
 
-           ac_cv_with_memcached=$withval
-           MEMC_BINARY=$withval
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
+int
+main ()
+{
 
-           # Extract the first word of "$ac_cv_with_memcached", so it can be a program name with args.
-set dummy $ac_cv_with_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 test "${ac_cv_path_MEMC_BINARY+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  case $MEMC_BINARY in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_MEMC_BINARY="$MEMC_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_MEMC_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_MEMC_BINARY" && ac_cv_path_MEMC_BINARY=""no""
-  ;;
-esac
+  eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-MEMC_BINARY=$ac_cv_path_MEMC_BINARY
-if test -n "$MEMC_BINARY"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMC_BINARY" >&5
-$as_echo "$MEMC_BINARY" >&6; }
+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
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  CXXFLAGS="$flag"
 fi
 
-
-           if test "x$MEMC_BINARY" = "xno"; then :
-  as_fn_error "\"could not find memcached binary\"" "$LINENO" 5
+else
+  :
 fi
 
-fi
+done
 
-fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define MEMCACHED_BINARY "$MEMC_BINARY"
-_ACEOF
 
+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 ()
+{
 
-  # Check whether --enable-deprecated was given.
-if test "${enable_deprecated+set}" = set; then :
-  enableval=$enable_deprecated; ac_enable_deprecated="$enableval"
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_enable_deprecated="no"
+  eval "$as_CACHEVAR=no"
 fi
-
-
-  if test "$ac_enable_deprecated" = "yes"; then :
-  DEPRECATED="#define MEMCACHED_ENABLE_DEPRECATED 1"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-
-
-
-
-
-
-  # Check whether --enable-libinnodb was given.
-if test "${enable_libinnodb+set}" = set; then :
-  enableval=$enable_libinnodb; ac_enable_libinnodb="$enableval"
+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
-  ac_enable_libinnodb="yes"
+  CXXFLAGS="$flag"
 fi
 
-
-  if test "x$ac_enable_libinnodb" = "xyes"; then :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    use_additional=yes
-  if test "x$GCC" = "xyes" -a "x" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
-
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-libinnodb-prefix was given.
-if test "${with_libinnodb_prefix+set}" = set; then :
-  withval=$with_libinnodb_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
-
+else
+  :
 fi
 
-      LIBINNODB=
-  LTLIBINNODB=
-  INCINNODB=
-  LIBINNODB_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='innodb '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBINNODB; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBINNODB; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBINNODB="${LIBINNODB}${LIBINNODB:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBINNODB="${LIBINNODB}${LIBINNODB:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$found_a"
-              else
-                                                LIBINNODB="${LIBINNODB}${LIBINNODB:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'innodb'; then
-                  LIBINNODB_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'innodb'; then
-                  LIBINNODB_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCINNODB; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCINNODB="${INCINNODB}${INCINNODB:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBINNODB; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBINNODB="${LIBINNODB}${LIBINNODB:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBINNODB; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$dep"
-                    LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBINNODB="${LIBINNODB}${LIBINNODB:+ }-l$name"
-            LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBINNODB="${LIBINNODB}${LIBINNODB:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBINNODB="${LTLIBINNODB}${LTLIBINNODB:+ }-R$found_dir"
-    done
-  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.  */
 
-        ac_save_CPPFLAGS="$CPPFLAGS"
+int
+main ()
+{
 
-  for element in $INCINNODB; do
-    haveit=
-    for x in $CPPFLAGS; do
+  ;
+  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
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+else
+  :
+fi
+
+done
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libinnodb" >&5
-$as_echo_n "checking for libinnodb... " >&6; }
-if test "${ac_cv_libinnodb+set}" = set; then :
+
+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
 
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBINNODB"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-      #include <embedded_innodb-1.0/innodb.h>
-
 int
 main ()
 {
 
-      ib_u64_t
-      ib_api_version(void);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_libinnodb=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_libinnodb=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
-
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libinnodb" >&5
-$as_echo "$ac_cv_libinnodb" >&6; }
-  if test "$ac_cv_libinnodb" = yes; then
-    HAVE_LIBINNODB=yes
-
-$as_echo "#define HAVE_LIBINNODB 1" >>confdefs.h
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libinnodb" >&5
-$as_echo_n "checking how to link with libinnodb... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINNODB" >&5
-$as_echo "$LIBINNODB" >&6; }
-  else
-    HAVE_LIBINNODB=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBINNODB=
-    LTLIBINNODB=
-    LIBINNODB_PREFIX=
-  fi
-
-
-
-
-
-
-
 
 else
+  :
+fi
 
-    ac_cv_libinnodb="no"
+done
 
-fi
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libinnodb is recent enough" >&5
-$as_echo_n "checking if libinnodb is recent enough... " >&6; }
-if test "${ac_cv_recent_innodb_h+set}" = set; then :
+
+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
 
-      save_LIBS=${LIBS}
-      LIBS="${LIBS} ${LTLIBINNODB}"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-      #include <embedded_innodb-1.0/innodb.h>
-
 int
 main ()
 {
 
-      /* Make sure we have the two-arg version */
-      ib_table_drop(NULL, "nothing");
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-        ac_cv_recent_innodb_h=yes
-
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-
-        ac_cv_recent_innodb_h=no
-
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      LIBS="${save_LIBS}"
-
+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: $ac_cv_recent_innodb_h" >&5
-$as_echo "$ac_cv_recent_innodb_h" >&6; }
-  if test "x${ac_cv_recent_innodb_h}" = "xno"; then :
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB" >&5
-$as_echo "$as_me: WARNING: ${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB" >&2;}
-    ac_cv_libinnodb=no
-
+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
 
-   if test "x${ac_cv_libinnodb}" = "xyes"; then
-  HAVE_LIBINNODB_TRUE=
-  HAVE_LIBINNODB_FALSE='#'
 else
-  HAVE_LIBINNODB_TRUE='#'
-  HAVE_LIBINNODB_FALSE=
+  :
 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
 
-  for ac_header in ucontext.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "$ac_includes_default"
-if test "x$ac_cv_header_ucontext_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UCONTEXT_H 1
-_ACEOF
-
-fi
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-done
+int
+main ()
+{
 
-  if test "x$ac_cv_header_ucontext_h" = "xyes"; then :
-   for ac_func in printstack
-do :
-  ac_fn_c_check_func "$LINENO" "printstack" "ac_cv_func_printstack"
-if test "x$ac_cv_func_printstack" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PRINTSTACK 1
+  ;
+  return 0;
+}
 _ACEOF
-
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
-done
-
+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
 
-
-  if  test "x$ac_cv_func_printstack" != "xyes"; then :
-   for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
+else
+  :
 fi
 
 done
 
-          for ac_header in execinfo.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
-if test "x$ac_cv_header_execinfo_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_EXECINFO_H 1
-_ACEOF
 
-fi
 
-done
 
-          for ac_func in backtrace
-do :
-  ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace"
-if test "x$ac_cv_func_backtrace" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BACKTRACE 1
-_ACEOF
+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
 
-fi
-done
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-          for ac_func in backtrace_symbols_fd
-do :
-  ac_fn_c_check_func "$LINENO" "backtrace_symbols_fd" "ac_cv_func_backtrace_symbols_fd"
-if test "x$ac_cv_func_backtrace_symbols_fd" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BACKTRACE_SYMBOLS_FD 1
-_ACEOF
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
+else
+  eval "$as_CACHEVAR=no"
 fi
-done
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-
-
-
-
-
-
-
-        # Check whether --enable-sasl was given.
-if test "${enable_sasl+set}" = set; then :
-  enableval=$enable_sasl; ac_enable_sasl="$enableval"
+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
-  ac_enable_sasl="yes"
+  CXXFLAGS="$flag"
 fi
 
+else
+  :
+fi
 
-  if test "x$ac_enable_sasl" = "xyes"; then :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    use_additional=yes
-  if test "x$GCC" = "xyes" -a "x" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
-
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+done
 
 
-# Check whether --with-libsasl-prefix was given.
-if test "${with_libsasl_prefix+set}" = set; then :
-  withval=$with_libsasl_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
+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
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
+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
 
-      LIBSASL=
-  LTLIBSASL=
-  INCSASL=
-  LIBSASL_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='sasl '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBSASL="${LIBSASL}${LIBSASL:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBSASL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBSASL="${LIBSASL}${LIBSASL:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBSASL="${LIBSASL}${LIBSASL:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBSASL="${LIBSASL}${LIBSASL:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBSASL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBSASL="${LIBSASL}${LIBSASL:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBSASL="${LIBSASL}${LIBSASL:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBSASL="${LIBSASL}${LIBSASL:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBSASL="${LIBSASL}${LIBSASL:+ }$found_a"
-              else
-                                                LIBSASL="${LIBSASL}${LIBSASL:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'sasl'; then
-                  LIBSASL_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'sasl'; then
-                  LIBSASL_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCSASL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCSASL="${INCSASL}${INCSASL:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBSASL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBSASL="${LIBSASL}${LIBSASL:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBSASL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBSASL="${LIBSASL}${LIBSASL:+ }$dep"
-                    LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBSASL="${LIBSASL}${LIBSASL:+ }-l$name"
-            LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBSASL="${LIBSASL}${LIBSASL:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBSASL="${LIBSASL}${LIBSASL:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBSASL="${LTLIBSASL}${LTLIBSASL:+ }-R$found_dir"
-    done
-  fi
-
-
-
-
-
-
-
-        ac_save_CPPFLAGS="$CPPFLAGS"
+else
+  :
+fi
 
-  for element in $INCSASL; do
-    haveit=
-    for x in $CPPFLAGS; do
+done
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsasl" >&5
-$as_echo_n "checking for libsasl... " >&6; }
-if test "${ac_cv_libsasl+set}" = set; then :
+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
 
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBSASL"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-        #include <stdlib.h>
-        #include <sasl/sasl.h>
-
 int
 main ()
 {
 
-        sasl_server_init(NULL, NULL);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_libsasl=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_libsasl=no
+  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
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
 
+else
+  :
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsasl" >&5
-$as_echo "$ac_cv_libsasl" >&6; }
-  if test "$ac_cv_libsasl" = yes; then
-    HAVE_LIBSASL=yes
 
-$as_echo "#define HAVE_LIBSASL 1" >>confdefs.h
+done
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsasl" >&5
-$as_echo_n "checking how to link with libsasl... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSASL" >&5
-$as_echo "$LIBSASL" >&6; }
-  else
-    HAVE_LIBSASL=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBSASL=
-    LTLIBSASL=
-    LIBSASL_PREFIX=
-  fi
 
 
 
+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
 
-      if test "x${ac_cv_libsasl}" != "xyes" ; then :
 
 
 
+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.  */
 
-    use_additional=yes
-  if test "x$GCC" = "xyes" -a "x" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
+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
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+else
+  :
+fi
 
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
+done
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
 
-# Check whether --with-libsasl2-prefix was given.
-if test "${with_libsasl2_prefix+set}" = set; then :
-  withval=$with_libsasl2_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+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
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+int
+main ()
+{
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
+  ;
+  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
 
-      LIBSASL2=
-  LTLIBSASL2=
-  INCSASL2=
-  LIBSASL2_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='sasl2 '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBSASL2; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBSASL2; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBSASL2="${LIBSASL2}${LIBSASL2:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBSASL2="${LIBSASL2}${LIBSASL2:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$found_a"
-              else
-                                                LIBSASL2="${LIBSASL2}${LIBSASL2:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'sasl2'; then
-                  LIBSASL2_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'sasl2'; then
-                  LIBSASL2_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCSASL2; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCSASL2="${INCSASL2}${INCSASL2:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBSASL2; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBSASL2="${LIBSASL2}${LIBSASL2:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBSASL2; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$dep"
-                    LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBSASL2="${LIBSASL2}${LIBSASL2:+ }-l$name"
-            LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBSASL2="${LIBSASL2}${LIBSASL2:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBSASL2="${LTLIBSASL2}${LTLIBSASL2:+ }-R$found_dir"
-    done
-  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
 
-        ac_save_CPPFLAGS="$CPPFLAGS"
+else
+  :
+fi
 
-  for element in $INCSASL2; do
-    haveit=
-    for x in $CPPFLAGS; do
+done
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsasl2" >&5
-$as_echo_n "checking for libsasl2... " >&6; }
-if test "${ac_cv_libsasl2+set}" = set; then :
+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
 
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIBSASL2"
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                #include <stdlib.h>
-                #include <sasl/sasl.h>
-
 int
 main ()
 {
 
-                sasl_server_init(NULL, NULL);
-
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_libsasl2=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_libsasl2=no
+  eval "$as_CACHEVAR=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
-
+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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsasl2" >&5
-$as_echo "$ac_cv_libsasl2" >&6; }
-  if test "$ac_cv_libsasl2" = yes; then
-    HAVE_LIBSASL2=yes
-
-$as_echo "#define HAVE_LIBSASL2 1" >>confdefs.h
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libsasl2" >&5
-$as_echo_n "checking how to link with libsasl2... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSASL2" >&5
-$as_echo "$LIBSASL2" >&6; }
-  else
-    HAVE_LIBSASL2=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBSASL2=
-    LTLIBSASL2=
-    LIBSASL2_PREFIX=
-  fi
-
 
+else
+  :
+fi
 
+done
 
 
 
 
-              HAVE_LIBSASL="$HAVE_LIBSASL2"
-              LIBSASL="$LIBSASL2"
-              LIBSASL_PREFIX="$LIBSASL2_PREFIX"
-	      LTLIBSASL="$LT_LIBSASL2"
+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
 
-fi
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
+int
+main ()
+{
 
-  if test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"; then :
-  ac_cv_sasl=yes
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_CACHEVAR=yes"
 else
-  ac_cv_sasl=no
+  eval "$as_CACHEVAR=no"
 fi
-
-   if test "x${ac_cv_libsasl}" = "xyes"; then
-  HAVE_LIBSASL_TRUE=
-  HAVE_LIBSASL_FALSE='#'
-else
-  HAVE_LIBSASL_TRUE='#'
-  HAVE_LIBSASL_FALSE=
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CXXFLAGS=$ax_check_save_flags
 fi
-
-   if test "x${ac_cv_libsasl2}" = "xyes"; then
-  HAVE_LIBSASL2_TRUE=
-  HAVE_LIBSASL2_FALSE='#'
+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
-  HAVE_LIBSASL2_TRUE='#'
-  HAVE_LIBSASL2_FALSE=
+  CXXFLAGS="$flag"
 fi
 
-   if test "x${ac_cv_sasl}" = "xyes"; then
-  HAVE_SASL_TRUE=
-  HAVE_SASL_FALSE='#'
 else
-  HAVE_SASL_TRUE='#'
-  HAVE_SASL_FALSE=
+  :
 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
 
-if test "x$ac_cv_sasl" = "xyes"; then :
-  LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"
-fi
+  ax_check_save_flags=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS -Werror $flag"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-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" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ATOMIC_H 1
+  ;
+  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$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" = x""yes; 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" = x""yes; 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 :
+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.  */
 
-$as_echo "#define USE_ATOMIC_H 1" >>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
-
-
-# Check whether --with-docs was given.
-if test "${with_docs+set}" = set; then :
-  withval=$with_docs; with_docs=$withval
+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
-  with_docs=yes
+  CXXFLAGS="$flag"
 fi
 
-
-if test "$with_docs" = "yes"; then :
-
-
-  # Extract the first word of "pod2man", so it can be a program name with args.
-set dummy pod2man; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_POD2MAN+set}" = set; then :
-  $as_echo_n "(cached) " >&6
 else
-  case $POD2MAN in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_POD2MAN="$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
+  :
+fi
+
 done
-  done
-IFS=$as_save_IFS
 
-  test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN=""no""
-  ;;
+          ;; #(
+  *) :
+     ;;
 esac
-fi
-POD2MAN=$ac_cv_path_POD2MAN
-if test -n "$POD2MAN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5
-$as_echo "$POD2MAN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
-
-  if test "x$POD2MAN" = "xno"; then :
-  as_fn_error "\"Could not find pod2man anywhere in path\"" "$LINENO" 5
 fi
 
+fi
 
 
-  # Extract the first word of "podchecker", so it can be a program name with args.
-set dummy podchecker; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PODCHECKER+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+          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
-  case $PODCHECKER in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PODCHECKER="$PODCHECKER" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PODCHECKER="$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_PODCHECKER" && ac_cv_path_PODCHECKER=""no""
-  ;;
-esac
+  CXXFLAGS="-Werror"
 fi
-PODCHECKER=$ac_cv_path_PODCHECKER
-if test -n "$PODCHECKER"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PODCHECKER" >&5
-$as_echo "$PODCHECKER" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&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
 
 
-  if test "x$PODCHECKER" = "xno"; then :
-  as_fn_error "\"Could not find podchecker anywhere in path\"" "$LINENO" 5
-fi
 
 
 
-fi
- if test "$with_docs" = "yes"; then
-  BUILD_DOCS_TRUE=
-  BUILD_DOCS_FALSE='#'
-else
-  BUILD_DOCS_TRUE='#'
-  BUILD_DOCS_FALSE=
-fi
 
 
+      { $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*) :
 
-  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
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+        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
 
-done
+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; }
 
- 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 if EWOULDBLOCK == EAGAIN" >&5
-$as_echo_n "checking if EWOULDBLOCK == EAGAIN... " >&6; }
-if test "${av_cv_eagain_ewouldblock+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+    # Check whether --enable-jobserver was given.
+if test "${enable_jobserver+set}" = set; then :
+  enableval=$enable_jobserver;
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  enable_jobserver=yes
+fi
 
-#include <errno.h>
+    if test "x$enable_jobserver" = "xyes"; then
+        enable_jobserver=$CPU_COUNT
+        ((enable_jobserver++))
+    fi
 
-int
-main ()
-{
+    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;}
 
-int error = EAGAIN;
-switch (error)
-{
-  case EAGAIN:
-  case EWOULDBLOCK:
-       error = 1;
-       break;
-  default:
-       error = 0;
-}
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-   av_cv_eagain_ewouldblock=no
-else
-   av_cv_eagain_ewouldblock=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $av_cv_eagain_ewouldblock" >&5
-$as_echo "$av_cv_eagain_ewouldblock" >&6; }
-    if test "x$ac_cv_eagain_ewouldblock" = "xyes"; then :
 
+printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE"
 
-$as_echo "#define USE_EAGAIN 1" >>confdefs.h
 
-fi
+    fi
 
 
-ac_config_files="$ac_config_files Makefile docs/Makefile libhashkit/configure.h libmemcached/configure.h support/libmemcached.pc support/libmemcached.spec support/libmemcached-fc.spec"
+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
@@ -23888,10 +36781,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    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;}
-    cat confcache >$cache_file
+      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;}
@@ -23907,6 +36811,7 @@ 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$//'
@@ -23921,6 +36826,26 @@ 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='#'
@@ -23929,85 +36854,110 @@ else
   am__EXEEXT_FALSE=
 fi
 
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
+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 "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+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 "${HAVE_DTRACE_TRUE}" && test -z "${HAVE_DTRACE_FALSE}"; then
-  as_fn_error "conditional \"HAVE_DTRACE\" was never defined.
+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 "${DTRACE_NEEDS_OBJECTS_TRUE}" && test -z "${DTRACE_NEEDS_OBJECTS_FALSE}"; then
-  as_fn_error "conditional \"DTRACE_NEEDS_OBJECTS\" was never defined.
+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 "${HAVE_DPKG_GENSYMBOLS_TRUE}" && test -z "${HAVE_DPKG_GENSYMBOLS_FALSE}"; then
-  as_fn_error "conditional \"HAVE_DPKG_GENSYMBOLS\" was never defined.
+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_LIBGTEST_TRUE}" && test -z "${HAVE_LIBGTEST_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBGTEST\" was never defined.
+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 "${HAVE_LIBEVENT_TRUE}" && test -z "${HAVE_LIBEVENT_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBEVENT\" was never defined.
+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 "${BUILD_BYTEORDER_TRUE}" && test -z "${BUILD_BYTEORDER_FALSE}"; then
-  as_fn_error "conditional \"BUILD_BYTEORDER\" was never defined.
+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 "${BUILD_LIBMEMCACHEDUTIL_TRUE}" && test -z "${BUILD_LIBMEMCACHEDUTIL_FALSE}"; then
-  as_fn_error "conditional \"BUILD_LIBMEMCACHEDUTIL\" was never defined.
+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 "${INCLUDE_HSIEH_SRC_TRUE}" && test -z "${INCLUDE_HSIEH_SRC_FALSE}"; then
-  as_fn_error "conditional \"INCLUDE_HSIEH_SRC\" was never defined.
+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 "${HAVE_LIBINNODB_TRUE}" && test -z "${HAVE_LIBINNODB_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBINNODB\" was never defined.
+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 "${HAVE_LIBSASL_TRUE}" && test -z "${HAVE_LIBSASL_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBSASL\" was never defined.
+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 "${HAVE_LIBSASL2_TRUE}" && test -z "${HAVE_LIBSASL2_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBSASL2\" was never defined.
+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 "${HAVE_SASL_TRUE}" && test -z "${HAVE_SASL_FALSE}"; then
-  as_fn_error "conditional \"HAVE_SASL\" was never defined.
+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 "${BUILD_DOCS_TRUE}" && test -z "${BUILD_DOCS_FALSE}"; then
-  as_fn_error "conditional \"BUILD_DOCS\" was never defined.
+
+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.
+  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.
+  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}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -24108,6 +37058,7 @@ fi
 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
@@ -24153,19 +37104,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  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: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -24303,16 +37254,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... 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 -p'.
+    # 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 -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -24361,7 +37312,7 @@ $as_echo X"$as_dir" |
       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"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -24372,28 +37323,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-	test -d "$1/.";
-      else
-	case $1 in #(
-	-*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# 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'"
@@ -24414,8 +37353,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # 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 0.44, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+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
@@ -24480,11 +37419,11 @@ _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 0.44
-configured by $0, generated by GNU Autoconf 2.65,
+libmemcached config.status 1.0.18
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+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."
 
@@ -24502,11 +37441,16 @@ 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
@@ -24528,6 +37472,7 @@ do
     $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;;
@@ -24540,7 +37485,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -24549,7 +37494,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -24569,7 +37514,7 @@ 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
+  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'
@@ -24603,184 +37548,208 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_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 SED \
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
 GREP \
 EGREP \
 FGREP \
@@ -24793,8 +37762,13 @@ 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 \
@@ -24804,14 +37778,14 @@ 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 \
-SHELL \
-ECHO \
+nm_file_list_spec \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 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 \
@@ -24825,9 +37799,7 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
-fix_srcfile_path \
 exclude_expsyms \
 include_expsyms \
 file_list_spec \
@@ -24835,6 +37807,7 @@ variables_saved_for_relink \
 libname_spec \
 library_names_spec \
 soname_spec \
+install_override_mode \
 finish_eval \
 old_striplib \
 striplib \
@@ -24845,10 +37818,11 @@ predeps \
 postdeps \
 compiler_lib_search_path \
 LD_CXX \
+reload_flag_CXX \
 compiler_CXX \
 lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_wl_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 \
@@ -24858,9 +37832,7 @@ with_gnu_ld_CXX \
 allow_undefined_flag_CXX \
 no_undefined_flag_CXX \
 hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
 hardcode_libdir_separator_CXX \
-fix_srcfile_path_CXX \
 exclude_expsyms_CXX \
 include_expsyms_CXX \
 file_list_spec_CXX \
@@ -24870,9 +37842,9 @@ postdep_objects_CXX \
 predeps_CXX \
 postdeps_CXX \
 compiler_lib_search_path_CXX; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -24894,11 +37866,13 @@ 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 \
@@ -24907,10 +37881,11 @@ archive_expsym_cmds_CXX \
 module_cmds_CXX \
 module_expsym_cmds_CXX \
 export_symbols_cmds_CXX \
-prelink_cmds_CXX; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -24918,12 +37893,6 @@ prelink_cmds_CXX; do
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
-  ;;
-esac
-
 ac_aux_dir='$ac_aux_dir'
 xsi_shell='$xsi_shell'
 lt_shell_append='$lt_shell_append'
@@ -24954,18 +37923,20 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
-    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "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/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
-    "libhashkit/configure.h") CONFIG_FILES="$CONFIG_FILES libhashkit/configure.h" ;;
-    "libmemcached/configure.h") CONFIG_FILES="$CONFIG_FILES libmemcached/configure.h" ;;
+    "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" ;;
-    "support/libmemcached-fc.spec") CONFIG_FILES="$CONFIG_FILES support/libmemcached-fc.spec" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -24988,9 +37959,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $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
 }
@@ -24998,12 +37970,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || 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.
@@ -25020,12 +37993,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -25034,18 +38007,18 @@ _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 '$'`
+  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
+    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
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -25053,7 +38026,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -25101,7 +38074,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -25133,21 +38106,29 @@ 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 < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+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 $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# 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[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
+  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
@@ -25159,7 +38140,7 @@ fi # test -n "$CONFIG_FILES"
 # 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -25171,11 +38152,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  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
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -25260,7 +38241,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -25273,7 +38254,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -25292,7 +38273,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) 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 `:'.
@@ -25301,7 +38282,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   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'"
@@ -25327,8 +38308,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -25464,23 +38445,24 @@ 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 "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+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' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { 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
+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;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) 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
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -25489,21 +38471,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && 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 "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+      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 "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && 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"
@@ -25549,7 +38531,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   case $ac_file$ac_mode in
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # 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
@@ -25562,7 +38544,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
     # 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
+    # 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.
@@ -25596,21 +38578,19 @@ $as_echo X"$mf" |
       continue
     fi
     # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running `make'.
+    # 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
+    test -z "$am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # When using ansi2knr, U may be empty or an underscore; expand it
-    U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
       # Make sure the directory exists.
       test -f "$dirpart/$file" && continue
       fdir=`$as_dirname -- "$file" ||
@@ -25664,7 +38644,8 @@ $as_echo X"$file" |
 # 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 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -25696,9 +38677,6 @@ available_tags="CXX "
 
 # ### BEGIN LIBTOOL CONFIG
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
 # Which release of libtool.m4 was used?
 macro_version=$macro_version
 macro_revision=$macro_revision
@@ -25706,12 +38684,24 @@ 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
@@ -25761,9 +38751,11 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# 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
@@ -25771,13 +38763,30 @@ 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".
+# 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
 
@@ -25786,6 +38795,9 @@ 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
 
@@ -25804,14 +38816,14 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
 
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
+# 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
@@ -25819,6 +38831,9 @@ 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
 
@@ -25875,6 +38890,9 @@ 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
 
@@ -25914,6 +38932,10 @@ 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
 
@@ -25926,12 +38948,12 @@ with_gcc=$GCC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
 # 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
 
@@ -25981,10 +39003,6 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
@@ -26018,9 +39036,6 @@ inherit_rpath=$inherit_rpath
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols
 
@@ -26036,6 +39051,9 @@ 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
 
@@ -26082,212 +39100,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
   # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# 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 ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# 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 ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# 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_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}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# 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 ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -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 file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# 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 "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1+=\$2"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1=\$$1\$2"
-}
-
-_LT_EOF
-    ;;
-  esac
-
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+  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"
 
@@ -26299,6 +39274,10 @@ _LT_EOF
 # 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
 
@@ -26311,12 +39290,12 @@ with_gcc=$GCC_CXX
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_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
 
@@ -26366,10 +39345,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
@@ -26403,9 +39378,6 @@ inherit_rpath=$inherit_rpath_CXX
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs_CXX
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_CXX
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols_CXX
 
@@ -26421,6 +39393,9 @@ 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
 
@@ -26455,7 +39430,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -26476,7 +39451,7 @@ if test "$no_create" != yes; then
   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 $?
+  $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
@@ -26491,9 +39466,18 @@ echo "   * Installation prefix:       $prefix"
 echo "   * System type:               $host_vendor-$host_os"
 echo "   * Host CPU:                  $host_cpu"
 echo "   * C Compiler:                $CC_VERSION"
-echo "   * Assertions enabled:        $ac_cv_assert"
-echo "   * Debug enabled:             $with_debug"
+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 "---"
 
@@ -26509,14 +39493,3 @@ case "$host_os" in
   ;;
 esac
 
-if test "$with_docs" = "no"; then :
-
-    echo "*****"
-    echo "*"
-    echo "*  WARNING: You are not generating any documentation."
-    echo "*           Please don't ship libmemcached to an end user"
-    echo "*           without documentation..."
-    echo "*"
-    echo "*****"
-
-fi
@@ -1,22 +1,39 @@
-#!/usr/bin/env bash
-# libmemcached
+# 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.
 
-AC_PREREQ(2.59)
-AC_INIT([libmemcached],[0.44],[http://libmemcached.org/])
-AC_CONFIG_SRCDIR([libmemcached/memcached.c])
-AC_CONFIG_AUX_DIR(config)
+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])
 
-PANDORA_CANONICAL_TARGET
+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=1:0:0
+MEMCACHED_UTIL_LIBRARY_VERSION=2:0:0
 MEMCACHED_PROTOCAL_LIBRARY_VERSION=0:0:0
-MEMCACHED_LIBRARY_VERSION=6:0:0
+MEMCACHED_LIBRARY_VERSION=11:0:0
 #                         | | |
 #                  +------+ | +---+
 #                  |        |     |
@@ -27,133 +44,302 @@ MEMCACHED_LIBRARY_VERSION=6:0:0
 #                  |        +- 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)
-
-
-HASHKIT_LIBRARY_VERSION=0:0:0
-AC_SUBST(HASHKIT_LIBRARY_VERSION)
-
-AH_TOP([
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#ifdef _SYS_FEATURE_TESTS_H
-#error "You should include config.h as your first include file"
-#endif
-
-#ifdef WIN32
-#define _WIN32_WINNT 0x0501
-#endif
-])
-
-AH_BOTTOM([
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-#ifdef HAVE_FNMATCH_H
-#include <fnmatch.h>
-#endif
-
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#else
-#include "poll/poll.h"
-#endif
-
-/* 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 ;-)
- */
-#ifdef WIN32
-#include "win32/wrappers.h"
-#define get_socket_errno() WSAGetLastError()
-#else
-#define INVALID_SOCKET -1
-#define SOCKET_ERROR -1
-#define closesocket(a) close(a)
-#define get_socket_errno() errno
-#endif
-
-#endif
-])
-
-AC_SEARCH_LIBS(getopt_long, gnugetopt)
-AC_SEARCH_LIBS(gethostbyname, nsl)
+AC_SUBST([MEMCACHED_UTIL_LIBRARY_VERSION])
+AC_SUBST([MEMCACHED_PROTOCAL_LIBRARY_VERSION])
+AC_SUBST([MEMCACHED_LIBRARY_VERSION])
 
-AC_CHECK_FUNCS([getline])
+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
 
-PANDORA_HAVE_LIBGTEST
-PANDORA_HAVE_LIBEVENT
-my_saved_libs="$LIBS"
-LIBS=
-PANDORA_REQUIRE_PTHREAD
-LIBS="$my_saved_libs"
-PANDORA_CXX_DEMANGLE
+AX_ASSERT
 
-dnl Specialty checks
+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
-ENABLE_UTILLIB
 SETSOCKOPT_SANITY
 ENABLE_HSIEH_HASH
+ENABLE_MURMUR_HASH
+ENABLE_FNV64_HASH
+ENABLE_MEMASLAP
 PROTOCOL_BINARY_TEST
-WITH_MEMCACHED
 ENABLE_DEPRECATED
-PANDORA_HAVE_LIBINNODB
-PANDORA_PRINT_CALLSTACK
-PANDORA_HAVE_SASL
 
-dnl The sasl functions should only be visible if we build with sasl support
-AS_IF([test "x$ac_cv_sasl" = "xyes"],
-      [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"])
-AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT)
+# 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 <sys/types.h>
+                #endif
+                #ifdef HAVE_NETINET_IN_H
+                # include <netinet/in.h>
+                #endif
+                #ifdef HAVE_NETDB_H
+                # include <netdb.h>
+                #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_ARG_WITH([docs],
-  [AS_HELP_STRING([--with-docs],
-    [Generate documentation (yes|no) @<:@default=yes@:>@])],
-  [with_docs=$withval],
-  [with_docs=yes])
-
-AS_IF([test "$with_docs" = "yes"],
-  [
-    REQUIRE_POD2MAN
-    REQUIRE_PODCHECKER
-  ])
-AM_CONDITIONAL(BUILD_DOCS, test "$with_docs" = "yes")
-
-AC_CHECK_HEADERS_ONCE(winsock2.h poll.h sys/wait.h fnmatch.h)
-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",
+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"
-      ])
-DETECT_EAGAIN
-
-AC_CONFIG_FILES([
-  Makefile
-  docs/Makefile
-  libhashkit/configure.h
-  libmemcached/configure.h
-  support/libmemcached.pc
-  support/libmemcached.spec
-  support/libmemcached-fc.spec
-  ])
+       ])
+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 "---"
@@ -163,9 +349,18 @@ echo "   * Installation prefix:       $prefix"
 echo "   * System type:               $host_vendor-$host_os"
 echo "   * Host CPU:                  $host_cpu"
 echo "   * C Compiler:                $CC_VERSION"
-echo "   * Assertions enabled:        $ac_cv_assert"
-echo "   * Debug enabled:             $with_debug"
+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 "---"
 
@@ -181,13 +376,3 @@ case "$host_os" in
   ;;
 esac
 
-AS_IF(test "$with_docs" = "no",
-  [
-    echo "*****"
-    echo "*"
-    echo "*  WARNING: You are not generating any documentation."
-    echo "*           Please don't ship libmemcached to an end user"
-    echo "*           without documentation..."
-    echo "*"
-    echo "*****"
-  ])
@@ -1,562 +0,0 @@
-# This file generates all of man/html pages that we use for documentation.
-#
-# When hacking this file you need to know that we take .pod files and turn
-# them into .pop files. .pop files are 1=1 for man pages, but one .pod
-# file may generate many .pop files.
-#
-#    -Brian
-#
-#
-CLEANFILES= *.1 *.3 *.html *.pop *.tmp
-
-BUILT_SOURCES=
-
-EXTRA_DIST= make_index.pl
-
-AUTO_PAGES= \
-	    memcached_increment.pop \
-	    memcached_increment_with_initial.pop \
-	    memcached_decrement.pop \
-	    memcached_decrement_with_initial.pop
-BUILT_SOURCES += ${AUTO_PAGES}
-
-BEHAVIOR_PAGES= \
-		memcached_behavior_get.pop \
-		memcached_behavior_set.pop
-BUILT_SOURCES += ${BEHAVIOR_PAGES}
-
-CALLBACK_PAGES= \
-		memcached_callback_get.pop \
-		memcached_callback_set.pop
-BUILT_SOURCES += ${CALLBACK_PAGES}
-
-CREATE_PAGES= \
-	      memcached_clone.pop \
-	      memcached_create.pop \
-	      memcached_free.pop \
-	      memcached_servers_reset.pop
-BUILT_SOURCES += ${CREATE_PAGES}
-
-DELETE_PAGES= \
-	      memcached_delete.pop \
-	      memcached_delete_by_key.pop
-BUILT_SOURCES += ${DELETE_PAGES}
-
-GENERIC_PAGES= \
-	       libmemcached.pop \
-	       libmemcached_examples.pop \
-	       libmemcachedutil.pop \
-	       memcached_analyze.pop \
-	       memcached_dump.pop \
-	       memcached_flush.pop \
-	       memcached_flush_buffers.pop \
-	       memcached_generate_hash_value.pop \
-	       memcached_quit.pop \
-	       memcached_strerror.pop \
-	       memcached_verbosity.pop \
-	       memcapable.pop \
-	       memcat.pop \
-	       memcp.pop \
-	       memdump.pop \
-	       memerror.pop \
-	       memflush.pop \
-	       memrm.pop \
-	       memslap.pop \
-	       memstat.pop
-BUILT_SOURCES += ${GENERIC_PAGES}
-
-GET_PAGES= \
-	   memcached_get.pop \
-	   memcached_get_by_key.pop \
-	   memcached_fetch_result.pop \
-	   memcached_fetch_execute.pop \
-	   memcached_mget.pop \
-	   memcached_mget_by_key.pop \
-	   memcached_mget_execute.pop \
-	   memcached_mget_execute_by_key.pop \
-	   memcached_fetch.pop
-BUILT_SOURCES += ${GET_PAGES}
-
-MEMORY_ALLOCATORS_PAGES= \
-			 memcached_get_memory_allocators.pop \
-			 memcached_set_memory_allocators.pop \
-			 memcached_set_memory_allocators_context.pop
-BUILT_SOURCES += ${MEMORY_ALLOCATORS_PAGES}
-
-POOL_PAGES= \
-	    memcached_pool_behavior_get.pop \
-	    memcached_pool_behavior_set.pop \
-	    memcached_pool_create.pop \
-	    memcached_pool_destroy.pop \
-	    memcached_pool_pop.pop \
-	    memcached_pool_push.pop
-BUILT_SOURCES += ${POOL_PAGES}
-
-RESULT_PAGES= \
-	      memcached_result_cas.pop \
-	      memcached_result_create.pop \
-	      memcached_result_flags.pop \
-	      memcached_result_free.pop \
-	      memcached_result_key_length.pop \
-	      memcached_result_key_value.pop \
-	      memcached_result_length.pop \
-	      memcached_result_st.pop \
-	      memcached_result_value.pop
-BUILT_SOURCES += ${RESULT_PAGES}
-
-
-SERVER_PAGES= \
-	      memcached_server_count.pop \
-	      memcached_server_cursor.pop \
-	      memcached_server_list.pop \
-	      memcached_server_add.pop \
-	      memcached_server_add_unix_socket.pop \
-	      memcached_server_push.pop
-BUILT_SOURCES += ${SERVER_PAGES}
-
-SERVER_ST_PAGES= \
-		 memcached_server_list_free.pop \
-		 memcached_server_list_count.pop \
-		 memcached_server_list_append.pop \
-		 memcached_servers_parse.pop
-BUILT_SOURCES += ${SERVER_ST_PAGES}
-
-SET_PAGES= \
-	   memcached_set.pop \
-	   memcached_set_by_key.pop \
-	   memcached_cas.pop \
-	   memcached_cas_by_key.pop \
-	   memcached_replace.pop \
-	   memcached_replace_by_key.pop \
-	   memcached_add.pop \
-	   memcached_add_by_key.pop \
-	   memcached_prepend.pop \
-	   memcached_prepend_by_key.pop \
-	   memcached_append.pop \
-	   memcached_append_by_key.pop
-BUILT_SOURCES += ${SET_PAGES}
-
-STATS_PAGES= \
-	     memcached_stat.pop \
-	     memcached_stat_execute.pop\
-	     memcached_stat_get_keys.pop\
-	     memcached_stat_get_value.pop \
-	     memcached_stat_servername.pop
-BUILT_SOURCES += ${STATS_PAGES}
-
-USER_DATA_PAGES= \
-		 memcached_get_user_data.pop \
-		 memcached_set_user_data.pop
-BUILT_SOURCES += ${USER_DATA_PAGES}
-
-VERSION_PAGES= \
-	       memcached_version.pop \
-	       memcached_lib_version.pop
-BUILT_SOURCES += ${VERSION_PAGES}
-
-
-#
-# These are for libhashkit
-#
-HASHKIT_CREATE_PAGES= \
-		      hashkit_is_allocated.pop \
-		      hashkit_create.pop \
-		      hashkit_clone.pop \
-		      hashkit_free.pop
-BUILT_SOURCES += ${HASHKIT_CREATE_PAGES}
-
-HASHKIT_FUNCTIONS_PAGES= \
-			 hashkit_crc32.pop \
-			 hashkit_fnv1_32.pop \
-			 hashkit_fnv1_64.pop \
-			 hashkit_fnv1a_32.pop \
-			 hashkit_fnv1a_64.pop \
-			 hashkit_functions.pop \
-			 hashkit_hsieh.pop \
-			 hashkit_jenkins.pop \
-			 hashkit_md5.pop \
-			 hashkit_murmur.pop
-BUILT_SOURCES += ${HASHKIT_FUNCTIONS_PAGES}
-
-HASHKIT_ST_PAGES= \
-		  hashkit_value.pop
-BUILT_SOURCES += ${HASHKIT_ST_PAGES}
-
-
-HTML_FILES= \
-	    hashkit_clone.html \
-	    hashkit_crc32.html \
-	    hashkit_create.html \
-	    hashkit_fnv1_32.html \
-	    hashkit_fnv1_64.html \
-	    hashkit_fnv1a_32.html \
-	    hashkit_fnv1a_64.html \
-	    hashkit_free.html \
-	    hashkit_functions.html \
-	    hashkit_hsieh.html \
-	    hashkit_is_allocated.html \
-	    hashkit_jenkins.html \
-	    hashkit_md5.html \
-	    hashkit_murmur.html \
-	    hashkit_value.html \
-	    libmemcached_examples.html \
-	    libmemcached.html \
-	    libmemcachedutil.html \
-	    memcached_add_by_key.html \
-	    memcached_add.html \
-	    memcached_analyze.html \
-	    memcached_append_by_key.html \
-	    memcached_append.html \
-	    memcached_behavior_get.html \
-	    memcached_behavior_set.html \
-	    memcached_callback_get.html \
-	    memcached_callback_set.html \
-	    memcached_cas_by_key.html \
-	    memcached_cas.html \
-	    memcached_clone.html \
-	    memcached_create.html \
-	    memcached_decrement.html \
-	    memcached_decrement_with_initial.html \
-	    memcached_delete_by_key.html \
-	    memcached_delete.html \
-	    memcached_dump.html \
-	    memcached_fetch_execute.html \
-	    memcached_fetch.html \
-	    memcached_fetch_result.html \
-	    memcached_flush_buffers.html \
-	    memcached_flush.html \
-	    memcached_free.html \
-	    memcached_generate_hash_value.html \
-	    memcached_get_by_key.html \
-	    memcached_get_memory_allocators.html \
-	    memcached_get.html \
-	    memcached_get_user_data.html \
-	    memcached_increment.html \
-	    memcached_increment_with_initial.html \
-	    memcached_lib_version.html \
-	    memcached_mget_by_key.html \
-	    memcached_mget_execute_by_key.html \
-	    memcached_mget_execute.html \
-	    memcached_mget.html \
-	    memcached_pool_behavior_get.html \
-	    memcached_pool_behavior_set.html \
-	    memcached_pool_create.html \
-	    memcached_pool_destroy.html \
-	    memcached_pool_pop.html \
-	    memcached_pool_push.html \
-	    memcached_prepend_by_key.html \
-	    memcached_prepend.html \
-	    memcached_quit.html \
-	    memcached_replace_by_key.html \
-	    memcached_replace.html \
-	    memcached_result_cas.html \
-	    memcached_result_create.html \
-	    memcached_result_flags.html \
-	    memcached_result_free.html \
-	    memcached_result_key_length.html \
-	    memcached_result_key_value.html \
-	    memcached_result_length.html \
-	    memcached_result_st.html \
-	    memcached_result_value.html \
-	    memcached_server_add.html \
-	    memcached_server_add_unix_socket.html \
-	    memcached_server_count.html \
-	    memcached_server_cursor.html \
-	    memcached_server_list_append.html \
-	    memcached_server_list_count.html \
-	    memcached_server_list_free.html \
-	    memcached_server_list.html \
-	    memcached_server_push.html \
-	    memcached_servers_parse.html \
-	    memcached_set_by_key.html \
-	    memcached_set_memory_allocators.html \
-	    memcached_set.html \
-	    memcached_set_user_data.html \
-	    memcached_stat_execute.html \
-	    memcached_stat_get_keys.html \
-	    memcached_stat_get_value.html \
-	    memcached_stat.html \
-	    memcached_stat_servername.html \
-	    memcached_strerror.html \
-	    memcached_verbosity.html \
-	    memcached_version.html \
-	    memcapable.html \
-	    memcat.html \
-	    memcp.html \
-	    memdump.html \
-	    memerror.html \
-	    memflush.html \
-	    memrm.html \
-	    memslap.html \
-	    memstat.html
-
-POD_FILES= \
-	   hashkit_create.pod \
-	   hashkit_functions.pod \
-	   hashkit_value.pod \
-	   libmemcached.pod \
-	   libmemcached_examples.pod \
-	   libmemcachedutil.pod \
-	   memcached_analyze.pod \
-	   memcached_auto.pod \
-	   memcached_behavior.pod \
-	   memcached_callback.pod \
-	   memcached_create.pod \
-	   memcached_delete.pod \
-	   memcached_dump.pod \
-	   memcached_flush.pod \
-	   memcached_flush_buffers.pod \
-	   memcached_generate_hash_value.pod \
-	   memcached_get.pod \
-	   memcached_memory_allocators.pod \
-	   memcached_pool.pod \
-	   memcached_quit.pod \
-	   memcached_result_st.pod \
-	   memcached_sasl.pod \
-	   memcached_server_st.pod \
-	   memcached_servers.pod \
-	   memcached_set.pod \
-	   memcached_stats.pod \
-	   memcached_strerror.pod \
-	   memcached_user_data.pod \
-	   memcached_verbosity.pod \
-	   memcached_version.pod \
-	   memcapable.pod \
-	   memcat.pod \
-	   memcp.pod \
-	   memdump.pod \
-	   memerror.pod \
-	   memflush.pod \
-	   memrm.pod \
-	   memslap.pod \
-	   memstat.pod
-EXTRA_DIST+= $(POD_FILES)
-
-man_MANS = \
-	   hashkit_clone.3 \
-	   hashkit_crc32.3 \
-	   hashkit_create.3 \
-	   hashkit_fnv1_32.3 \
-	   hashkit_fnv1_64.3 \
-	   hashkit_fnv1a_32.3 \
-	   hashkit_fnv1a_64.3 \
-	   hashkit_free.3 \
-	   hashkit_functions.3 \
-	   hashkit_hsieh.3 \
-	   hashkit_is_allocated.3 \
-	   hashkit_jenkins.3 \
-	   hashkit_md5.3 \
-	   hashkit_murmur.3 \
-	   hashkit_value.3 \
-	   libmemcached.3 \
-	   libmemcached_examples.3 \
-	   memcached_add.3 \
-	   memcached_add_by_key.3 \
-	   memcached_analyze.3 \
-	   memcached_append.3 \
-	   memcached_append_by_key.3 \
-	   memcached_behavior_get.3 \
-	   memcached_behavior_set.3 \
-	   memcached_callback_get.3 \
-	   memcached_callback_set.3 \
-	   memcached_cas.3 \
-	   memcached_cas_by_key.3 \
-	   memcached_clone.3 \
-	   memcached_create.3 \
-	   memcached_decrement.3 \
-	   memcached_decrement_with_initial.3 \
-	   memcached_delete.3 \
-	   memcached_delete_by_key.3 \
-	   memcached_dump.3 \
-	   memcached_fetch.3 \
-	   memcached_fetch_execute.3 \
-	   memcached_fetch_result.3 \
-	   memcached_flush_buffers.3 \
-	   memcached_free.3 \
-	   memcached_generate_hash_value.3 \
-	   memcached_get.3 \
-	   memcached_get_by_key.3 \
-	   memcached_get_memory_allocators.3 \
-	   memcached_get_user_data.3 \
-	   memcached_increment.3 \
-	   memcached_increment_with_initial.3 \
-	   memcached_lib_version.3 \
-	   memcached_mget.3 \
-	   memcached_mget_by_key.3 \
-	   memcached_mget_execute.3  \
-	   memcached_mget_execute_by_key.3  \
-	   memcached_prepend.3 \
-	   memcached_prepend_by_key.3 \
-	   memcached_quit.3 \
-	   memcached_replace.3 \
-	   memcached_replace_by_key.3 \
-	   memcached_server_add.3 \
-	   memcached_server_count.3 \
-	   memcached_server_cursor.3 \
-	   memcached_server_list.3 \
-	   memcached_server_list_append.3 \
-	   memcached_server_list_count.3 \
-	   memcached_server_list_free.3 \
-	   memcached_server_push.3 \
-	   memcached_servers_parse.3 \
-	   memcached_set.3 \
-	   memcached_set_by_key.3 \
-	   memcached_set_memory_allocators.3 \
-	   memcached_set_user_data.3 \
-	   memcached_stat.3 \
-	   memcached_stat_execute.3 \
-	   memcached_stat_get_keys.3 \
-	   memcached_stat_get_value.3 \
-	   memcached_stat_servername.3 \
-	   memcached_strerror.3 \
-	   memcached_verbosity.3 \
-	   memcached_version.3 \
-	   memcapable.1 \
-	   memcat.1 \
-	   memcp.1 \
-	   memdump.1 \
-	   memerror.1 \
-	   memflush.1 \
-	   memrm.1 \
-	   memslap.1 \
-	   memstat.1
-
-if HAVE_SASL
-POD_FILES+= memcached_sasl.pod
-man_MANS+= \
-           memcached_destroy_sasl_auth_data.3 \
-           memcached_get_sasl_callbacks.3 \
-           memcached_sasl_set_auth_data.3 \
-           memcached_set_sasl_callbacks.3
-
-HTML_FILES+= \
-           memcached_destroy_sasl_auth_data.html \
-           memcached_get_sasl_callbacks.html \
-           memcached_sasl_set_auth_data.html \
-           memcached_set_sasl_callbacks.html
-
-
-SASL_PAGES= \
-           memcached_destroy_sasl_auth_data.pop \
-           memcached_get_sasl_callbacks.pop \
-           memcached_sasl_set_auth_data.pop \
-           memcached_set_sasl_callbacks.pop
-BUILT_SOURCES += ${SASL_PAGES}
-
-${SASL_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_sasl.pod ${top_builddir}/docs/$@
-
-endif
-
-if BUILD_LIBMEMCACHEDUTIL
-man_MANS+= \
-	  libmemcachedutil.3 \
-	  memcached_pool_behavior_set.3 \
-	  memcached_pool_behavior_get.3 \
-	  memcached_pool_create.3 \
-	  memcached_pool_destroy.3 \
-	  memcached_pool_push.3 \
-	  memcached_pool_pop.3
-endif
-
-
-${CREATE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_create.pod ${top_builddir}/docs/$@
-
-${SET_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_set.pod ${top_builddir}/docs/$@
-
-${DELETE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_delete.pod ${top_builddir}/docs/$@
-
-${AUTO_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_auto.pod ${top_builddir}/docs/$@
-
-${GET_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_get.pod ${top_builddir}/docs/$@
-
-${SERVER_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_servers.pod ${top_builddir}/docs/$@
-
-${SERVER_ST_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_server_st.pod ${top_builddir}/docs/$@
-
-${GENERIC_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/$*.pod ${top_builddir}/docs/$@
-
-${BEHAVIOR_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_behavior.pod ${top_builddir}/docs/$@
-
-${CALLBACK_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_callback.pod ${top_builddir}/docs/$@
-
-${STATS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_stats.pod ${top_builddir}/docs/$@
-
-${RESULT_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_result_st.pod ${top_builddir}/docs/$@
-
-${VERSION_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_version.pod ${top_builddir}/docs/$@
-
-${MEMORY_ALLOCATORS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_memory_allocators.pod ${top_builddir}/docs/$@
-
-${USER_DATA_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_user_data.pod ${top_builddir}/docs/$@
-
-${POOL_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_pool.pod ${top_builddir}/docs/$@
-
-${HASHKIT_CREATE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_create.pod ${top_builddir}/docs/$@
-
-
-${HASHKIT_FUNCTIONS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_functions.pod ${top_builddir}/docs/$@
-
-${HASHKIT_ST_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_value.pod ${top_builddir}/docs/$@
-
-test-docs: $(POD_FILES)
-	${PODCHECKER} $(top_srcdir)/docs/$?
-
-html-local: html-pages html-index
-
-html-pages: $(HTML_FILES)
-
-html-index: html-pages
-	perl make_index.pl *.html > index.html
-
-SUFFIXES= .pop .pod .html .1 .3
-
-.pop: ${_set}
-
-.pop.html:
-	pod2html --infile=$< >  $@
-
-.pop.1:
-	${POD2MAN} -c "$*" -r "" -s 1 $< >  $@
-
-.pop.3:
-	${POD2MAN} -c "$*" -r "" -s 3 $< >  $@
@@ -1,1000 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  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@
-VPATH = @srcdir@
-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@
-target_triplet = @target@
-@HAVE_SASL_TRUE@am__append_1 = memcached_sasl.pod
-@HAVE_SASL_TRUE@am__append_2 = \
-@HAVE_SASL_TRUE@           memcached_destroy_sasl_auth_data.3 \
-@HAVE_SASL_TRUE@           memcached_get_sasl_callbacks.3 \
-@HAVE_SASL_TRUE@           memcached_sasl_set_auth_data.3 \
-@HAVE_SASL_TRUE@           memcached_set_sasl_callbacks.3
-
-@HAVE_SASL_TRUE@am__append_3 = \
-@HAVE_SASL_TRUE@           memcached_destroy_sasl_auth_data.html \
-@HAVE_SASL_TRUE@           memcached_get_sasl_callbacks.html \
-@HAVE_SASL_TRUE@           memcached_sasl_set_auth_data.html \
-@HAVE_SASL_TRUE@           memcached_set_sasl_callbacks.html
-
-@HAVE_SASL_TRUE@am__append_4 = ${SASL_PAGES}
-@BUILD_LIBMEMCACHEDUTIL_TRUE@am__append_5 = \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  libmemcachedutil.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_behavior_set.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_behavior_get.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_create.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_destroy.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_push.3 \
-@BUILD_LIBMEMCACHEDUTIL_TRUE@	  memcached_pool_pop.3
-
-subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_cxx_compile_stdcxx_0x.m4 \
-	$(top_srcdir)/m4/ac_cxx_header_stdcxx_98.m4 \
-	$(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/byteorder.m4 \
-	$(top_srcdir)/m4/deprecated.m4 $(top_srcdir)/m4/eagain.m4 \
-	$(top_srcdir)/m4/enable_utillib.m4 $(top_srcdir)/m4/hsieh.m4 \
-	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-	$(top_srcdir)/m4/lib-prefix.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/memcached.m4 \
-	$(top_srcdir)/m4/pandora_64bit.m4 \
-	$(top_srcdir)/m4/pandora_canonical.m4 \
-	$(top_srcdir)/m4/pandora_check_compiler_version.m4 \
-	$(top_srcdir)/m4/pandora_check_cxx_standard.m4 \
-	$(top_srcdir)/m4/pandora_clock_gettime.m4 \
-	$(top_srcdir)/m4/pandora_cxx_demangle.m4 \
-	$(top_srcdir)/m4/pandora_enable_dtrace.m4 \
-	$(top_srcdir)/m4/pandora_extensions.m4 \
-	$(top_srcdir)/m4/pandora_have_better_malloc.m4 \
-	$(top_srcdir)/m4/pandora_have_gcc_atomics.m4 \
-	$(top_srcdir)/m4/pandora_have_libevent.m4 \
-	$(top_srcdir)/m4/pandora_have_libgtest.m4 \
-	$(top_srcdir)/m4/pandora_have_libinnodb.m4 \
-	$(top_srcdir)/m4/pandora_header_assert.m4 \
-	$(top_srcdir)/m4/pandora_libtool.m4 \
-	$(top_srcdir)/m4/pandora_optimize.m4 \
-	$(top_srcdir)/m4/pandora_platform.m4 \
-	$(top_srcdir)/m4/pandora_print_callstack.m4 \
-	$(top_srcdir)/m4/pandora_pthread.m4 \
-	$(top_srcdir)/m4/pandora_sasl.m4 \
-	$(top_srcdir)/m4/pandora_use_pipe.m4 \
-	$(top_srcdir)/m4/pandora_vc_build.m4 \
-	$(top_srcdir)/m4/pandora_version.m4 \
-	$(top_srcdir)/m4/pandora_visibility.m4 \
-	$(top_srcdir)/m4/pandora_warnings.m4 \
-	$(top_srcdir)/m4/pandora_with_gettext.m4 \
-	$(top_srcdir)/m4/pod2man.m4 $(top_srcdir)/m4/podchecker.m4 \
-	$(top_srcdir)/m4/protocol_binary.m4 \
-	$(top_srcdir)/m4/setsockopt.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-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'
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"
-man3dir = $(mandir)/man3
-NROFF = nroff
-MANS = $(man_MANS)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CPPFLAGS = @AM_CPPFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AM_LDFLAGS = @AM_LDFLAGS@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BETTER_MALLOC_LIBS = @BETTER_MALLOC_LIBS@
-BOOSTSKIP_WARNINGS = @BOOSTSKIP_WARNINGS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CC_VERSION = @CC_VERSION@
-CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CXX_STANDARD = @CXX_STANDARD@
-CXX_VERSION = @CXX_VERSION@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DEPRECATED = @DEPRECATED@
-DOXYGEN = @DOXYGEN@
-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@
-GCOV_LIBS = @GCOV_LIBS@
-GREP = @GREP@
-HASHKIT_LIBRARY_VERSION = @HASHKIT_LIBRARY_VERSION@
-HAVE_LIBEVENT = @HAVE_LIBEVENT@
-HAVE_LIBGTEST = @HAVE_LIBGTEST@
-HAVE_LIBINNODB = @HAVE_LIBINNODB@
-HAVE_LIBSASL = @HAVE_LIBSASL@
-HAVE_LIBSASL2 = @HAVE_LIBSASL2@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
-INNOBASE_SKIP_WARNINGS = @INNOBASE_SKIP_WARNINGS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-ISAINFO = @ISAINFO@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBC_P = @LIBC_P@
-LIBEVENT = @LIBEVENT@
-LIBEVENT_PREFIX = @LIBEVENT_PREFIX@
-LIBGTEST = @LIBGTEST@
-LIBGTEST_PREFIX = @LIBGTEST_PREFIX@
-LIBINNODB = @LIBINNODB@
-LIBINNODB_PREFIX = @LIBINNODB_PREFIX@
-LIBM = @LIBM@
-LIBMEMCACHED_WITH_SASL_SUPPORT = @LIBMEMCACHED_WITH_SASL_SUPPORT@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBSASL = @LIBSASL@
-LIBSASL2 = @LIBSASL2@
-LIBSASL2_PREFIX = @LIBSASL2_PREFIX@
-LIBSASL_PREFIX = @LIBSASL_PREFIX@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBEVENT = @LTLIBEVENT@
-LTLIBGTEST = @LTLIBGTEST@
-LTLIBINNODB = @LTLIBINNODB@
-LTLIBOBJS = @LTLIBOBJS@
-LTLIBSASL = @LTLIBSASL@
-LTLIBSASL2 = @LTLIBSASL2@
-MAKEINFO = @MAKEINFO@
-MEMCACHED_LIBRARY_VERSION = @MEMCACHED_LIBRARY_VERSION@
-MEMCACHED_PROTOCAL_LIBRARY_VERSION = @MEMCACHED_PROTOCAL_LIBRARY_VERSION@
-MEMCACHED_UTIL_LIBRARY_VERSION = @MEMCACHED_UTIL_LIBRARY_VERSION@
-MEMC_BINARY = @MEMC_BINARY@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_CONVERSION = @NO_CONVERSION@
-NO_EFF_CXX = @NO_EFF_CXX@
-NO_OLD_STYLE_CAST = @NO_OLD_STYLE_CAST@
-NO_REDUNDANT_DECLS = @NO_REDUNDANT_DECLS@
-NO_SHADOW = @NO_SHADOW@
-NO_STRICT_ALIASING = @NO_STRICT_ALIASING@
-NO_UNREACHED = @NO_UNREACHED@
-NO_WERROR = @NO_WERROR@
-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@
-PANDORA_HEX_VERSION = @PANDORA_HEX_VERSION@
-PANDORA_OPTIMIZE_BITFIELD = @PANDORA_OPTIMIZE_BITFIELD@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-POD2MAN = @POD2MAN@
-PODCHECKER = @PODCHECKER@
-PROTOSKIP_WARNINGS = @PROTOSKIP_WARNINGS@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-TARGET_FREEBSD = @TARGET_FREEBSD@
-TARGET_LINUX = @TARGET_LINUX@
-TARGET_OSX = @TARGET_OSX@
-TARGET_SOLARIS = @TARGET_SOLARIS@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acx_pthread_config = @acx_pthread_config@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-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_ECHO = @lt_ECHO@
-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 = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-
-# This file generates all of man/html pages that we use for documentation.
-#
-# When hacking this file you need to know that we take .pod files and turn
-# them into .pop files. .pop files are 1=1 for man pages, but one .pod
-# file may generate many .pop files.
-#
-#    -Brian
-#
-#
-CLEANFILES = *.1 *.3 *.html *.pop *.tmp
-BUILT_SOURCES = ${AUTO_PAGES} ${BEHAVIOR_PAGES} ${CALLBACK_PAGES} \
-	${CREATE_PAGES} ${DELETE_PAGES} ${GENERIC_PAGES} ${GET_PAGES} \
-	${MEMORY_ALLOCATORS_PAGES} ${POOL_PAGES} ${RESULT_PAGES} \
-	${SERVER_PAGES} ${SERVER_ST_PAGES} ${SET_PAGES} ${STATS_PAGES} \
-	${USER_DATA_PAGES} ${VERSION_PAGES} ${HASHKIT_CREATE_PAGES} \
-	${HASHKIT_FUNCTIONS_PAGES} ${HASHKIT_ST_PAGES} $(am__append_4)
-EXTRA_DIST = make_index.pl $(POD_FILES)
-AUTO_PAGES = \
-	    memcached_increment.pop \
-	    memcached_increment_with_initial.pop \
-	    memcached_decrement.pop \
-	    memcached_decrement_with_initial.pop
-
-BEHAVIOR_PAGES = \
-		memcached_behavior_get.pop \
-		memcached_behavior_set.pop
-
-CALLBACK_PAGES = \
-		memcached_callback_get.pop \
-		memcached_callback_set.pop
-
-CREATE_PAGES = \
-	      memcached_clone.pop \
-	      memcached_create.pop \
-	      memcached_free.pop \
-	      memcached_servers_reset.pop
-
-DELETE_PAGES = \
-	      memcached_delete.pop \
-	      memcached_delete_by_key.pop
-
-GENERIC_PAGES = \
-	       libmemcached.pop \
-	       libmemcached_examples.pop \
-	       libmemcachedutil.pop \
-	       memcached_analyze.pop \
-	       memcached_dump.pop \
-	       memcached_flush.pop \
-	       memcached_flush_buffers.pop \
-	       memcached_generate_hash_value.pop \
-	       memcached_quit.pop \
-	       memcached_strerror.pop \
-	       memcached_verbosity.pop \
-	       memcapable.pop \
-	       memcat.pop \
-	       memcp.pop \
-	       memdump.pop \
-	       memerror.pop \
-	       memflush.pop \
-	       memrm.pop \
-	       memslap.pop \
-	       memstat.pop
-
-GET_PAGES = \
-	   memcached_get.pop \
-	   memcached_get_by_key.pop \
-	   memcached_fetch_result.pop \
-	   memcached_fetch_execute.pop \
-	   memcached_mget.pop \
-	   memcached_mget_by_key.pop \
-	   memcached_mget_execute.pop \
-	   memcached_mget_execute_by_key.pop \
-	   memcached_fetch.pop
-
-MEMORY_ALLOCATORS_PAGES = \
-			 memcached_get_memory_allocators.pop \
-			 memcached_set_memory_allocators.pop \
-			 memcached_set_memory_allocators_context.pop
-
-POOL_PAGES = \
-	    memcached_pool_behavior_get.pop \
-	    memcached_pool_behavior_set.pop \
-	    memcached_pool_create.pop \
-	    memcached_pool_destroy.pop \
-	    memcached_pool_pop.pop \
-	    memcached_pool_push.pop
-
-RESULT_PAGES = \
-	      memcached_result_cas.pop \
-	      memcached_result_create.pop \
-	      memcached_result_flags.pop \
-	      memcached_result_free.pop \
-	      memcached_result_key_length.pop \
-	      memcached_result_key_value.pop \
-	      memcached_result_length.pop \
-	      memcached_result_st.pop \
-	      memcached_result_value.pop
-
-SERVER_PAGES = \
-	      memcached_server_count.pop \
-	      memcached_server_cursor.pop \
-	      memcached_server_list.pop \
-	      memcached_server_add.pop \
-	      memcached_server_add_unix_socket.pop \
-	      memcached_server_push.pop
-
-SERVER_ST_PAGES = \
-		 memcached_server_list_free.pop \
-		 memcached_server_list_count.pop \
-		 memcached_server_list_append.pop \
-		 memcached_servers_parse.pop
-
-SET_PAGES = \
-	   memcached_set.pop \
-	   memcached_set_by_key.pop \
-	   memcached_cas.pop \
-	   memcached_cas_by_key.pop \
-	   memcached_replace.pop \
-	   memcached_replace_by_key.pop \
-	   memcached_add.pop \
-	   memcached_add_by_key.pop \
-	   memcached_prepend.pop \
-	   memcached_prepend_by_key.pop \
-	   memcached_append.pop \
-	   memcached_append_by_key.pop
-
-STATS_PAGES = \
-	     memcached_stat.pop \
-	     memcached_stat_execute.pop\
-	     memcached_stat_get_keys.pop\
-	     memcached_stat_get_value.pop \
-	     memcached_stat_servername.pop
-
-USER_DATA_PAGES = \
-		 memcached_get_user_data.pop \
-		 memcached_set_user_data.pop
-
-VERSION_PAGES = \
-	       memcached_version.pop \
-	       memcached_lib_version.pop
-
-
-#
-# These are for libhashkit
-#
-HASHKIT_CREATE_PAGES = \
-		      hashkit_is_allocated.pop \
-		      hashkit_create.pop \
-		      hashkit_clone.pop \
-		      hashkit_free.pop
-
-HASHKIT_FUNCTIONS_PAGES = \
-			 hashkit_crc32.pop \
-			 hashkit_fnv1_32.pop \
-			 hashkit_fnv1_64.pop \
-			 hashkit_fnv1a_32.pop \
-			 hashkit_fnv1a_64.pop \
-			 hashkit_functions.pop \
-			 hashkit_hsieh.pop \
-			 hashkit_jenkins.pop \
-			 hashkit_md5.pop \
-			 hashkit_murmur.pop
-
-HASHKIT_ST_PAGES = \
-		  hashkit_value.pop
-
-HTML_FILES = hashkit_clone.html hashkit_crc32.html hashkit_create.html \
-	hashkit_fnv1_32.html hashkit_fnv1_64.html \
-	hashkit_fnv1a_32.html hashkit_fnv1a_64.html hashkit_free.html \
-	hashkit_functions.html hashkit_hsieh.html \
-	hashkit_is_allocated.html hashkit_jenkins.html \
-	hashkit_md5.html hashkit_murmur.html hashkit_value.html \
-	libmemcached_examples.html libmemcached.html \
-	libmemcachedutil.html memcached_add_by_key.html \
-	memcached_add.html memcached_analyze.html \
-	memcached_append_by_key.html memcached_append.html \
-	memcached_behavior_get.html memcached_behavior_set.html \
-	memcached_callback_get.html memcached_callback_set.html \
-	memcached_cas_by_key.html memcached_cas.html \
-	memcached_clone.html memcached_create.html \
-	memcached_decrement.html memcached_decrement_with_initial.html \
-	memcached_delete_by_key.html memcached_delete.html \
-	memcached_dump.html memcached_fetch_execute.html \
-	memcached_fetch.html memcached_fetch_result.html \
-	memcached_flush_buffers.html memcached_flush.html \
-	memcached_free.html memcached_generate_hash_value.html \
-	memcached_get_by_key.html memcached_get_memory_allocators.html \
-	memcached_get.html memcached_get_user_data.html \
-	memcached_increment.html memcached_increment_with_initial.html \
-	memcached_lib_version.html memcached_mget_by_key.html \
-	memcached_mget_execute_by_key.html memcached_mget_execute.html \
-	memcached_mget.html memcached_pool_behavior_get.html \
-	memcached_pool_behavior_set.html memcached_pool_create.html \
-	memcached_pool_destroy.html memcached_pool_pop.html \
-	memcached_pool_push.html memcached_prepend_by_key.html \
-	memcached_prepend.html memcached_quit.html \
-	memcached_replace_by_key.html memcached_replace.html \
-	memcached_result_cas.html memcached_result_create.html \
-	memcached_result_flags.html memcached_result_free.html \
-	memcached_result_key_length.html \
-	memcached_result_key_value.html memcached_result_length.html \
-	memcached_result_st.html memcached_result_value.html \
-	memcached_server_add.html \
-	memcached_server_add_unix_socket.html \
-	memcached_server_count.html memcached_server_cursor.html \
-	memcached_server_list_append.html \
-	memcached_server_list_count.html \
-	memcached_server_list_free.html memcached_server_list.html \
-	memcached_server_push.html memcached_servers_parse.html \
-	memcached_set_by_key.html memcached_set_memory_allocators.html \
-	memcached_set.html memcached_set_user_data.html \
-	memcached_stat_execute.html memcached_stat_get_keys.html \
-	memcached_stat_get_value.html memcached_stat.html \
-	memcached_stat_servername.html memcached_strerror.html \
-	memcached_verbosity.html memcached_version.html \
-	memcapable.html memcat.html memcp.html memdump.html \
-	memerror.html memflush.html memrm.html memslap.html \
-	memstat.html $(am__append_3)
-POD_FILES = hashkit_create.pod hashkit_functions.pod hashkit_value.pod \
-	libmemcached.pod libmemcached_examples.pod \
-	libmemcachedutil.pod memcached_analyze.pod memcached_auto.pod \
-	memcached_behavior.pod memcached_callback.pod \
-	memcached_create.pod memcached_delete.pod memcached_dump.pod \
-	memcached_flush.pod memcached_flush_buffers.pod \
-	memcached_generate_hash_value.pod memcached_get.pod \
-	memcached_memory_allocators.pod memcached_pool.pod \
-	memcached_quit.pod memcached_result_st.pod memcached_sasl.pod \
-	memcached_server_st.pod memcached_servers.pod \
-	memcached_set.pod memcached_stats.pod memcached_strerror.pod \
-	memcached_user_data.pod memcached_verbosity.pod \
-	memcached_version.pod memcapable.pod memcat.pod memcp.pod \
-	memdump.pod memerror.pod memflush.pod memrm.pod memslap.pod \
-	memstat.pod $(am__append_1)
-man_MANS = hashkit_clone.3 hashkit_crc32.3 hashkit_create.3 \
-	hashkit_fnv1_32.3 hashkit_fnv1_64.3 hashkit_fnv1a_32.3 \
-	hashkit_fnv1a_64.3 hashkit_free.3 hashkit_functions.3 \
-	hashkit_hsieh.3 hashkit_is_allocated.3 hashkit_jenkins.3 \
-	hashkit_md5.3 hashkit_murmur.3 hashkit_value.3 libmemcached.3 \
-	libmemcached_examples.3 memcached_add.3 memcached_add_by_key.3 \
-	memcached_analyze.3 memcached_append.3 \
-	memcached_append_by_key.3 memcached_behavior_get.3 \
-	memcached_behavior_set.3 memcached_callback_get.3 \
-	memcached_callback_set.3 memcached_cas.3 \
-	memcached_cas_by_key.3 memcached_clone.3 memcached_create.3 \
-	memcached_decrement.3 memcached_decrement_with_initial.3 \
-	memcached_delete.3 memcached_delete_by_key.3 memcached_dump.3 \
-	memcached_fetch.3 memcached_fetch_execute.3 \
-	memcached_fetch_result.3 memcached_flush_buffers.3 \
-	memcached_free.3 memcached_generate_hash_value.3 \
-	memcached_get.3 memcached_get_by_key.3 \
-	memcached_get_memory_allocators.3 memcached_get_user_data.3 \
-	memcached_increment.3 memcached_increment_with_initial.3 \
-	memcached_lib_version.3 memcached_mget.3 \
-	memcached_mget_by_key.3 memcached_mget_execute.3 \
-	memcached_mget_execute_by_key.3 memcached_prepend.3 \
-	memcached_prepend_by_key.3 memcached_quit.3 \
-	memcached_replace.3 memcached_replace_by_key.3 \
-	memcached_server_add.3 memcached_server_count.3 \
-	memcached_server_cursor.3 memcached_server_list.3 \
-	memcached_server_list_append.3 memcached_server_list_count.3 \
-	memcached_server_list_free.3 memcached_server_push.3 \
-	memcached_servers_parse.3 memcached_set.3 \
-	memcached_set_by_key.3 memcached_set_memory_allocators.3 \
-	memcached_set_user_data.3 memcached_stat.3 \
-	memcached_stat_execute.3 memcached_stat_get_keys.3 \
-	memcached_stat_get_value.3 memcached_stat_servername.3 \
-	memcached_strerror.3 memcached_verbosity.3 memcached_version.3 \
-	memcapable.1 memcat.1 memcp.1 memdump.1 memerror.1 memflush.1 \
-	memrm.1 memslap.1 memstat.1 $(am__append_2) $(am__append_5)
-@HAVE_SASL_TRUE@SASL_PAGES = \
-@HAVE_SASL_TRUE@           memcached_destroy_sasl_auth_data.pop \
-@HAVE_SASL_TRUE@           memcached_get_sasl_callbacks.pop \
-@HAVE_SASL_TRUE@           memcached_sasl_set_auth_data.pop \
-@HAVE_SASL_TRUE@           memcached_set_sasl_callbacks.pop
-
-SUFFIXES = .pop .pod .html .1 .3
-all: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .pop .pod .html .1 .3
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign docs/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-man1: $(man_MANS)
-	@$(NORMAL_INSTALL)
-	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-	@list=''; test -n "$(man1dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.1[a-z]*$$/p'; \
-	} | 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='$(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,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
-install-man3: $(man_MANS)
-	@$(NORMAL_INSTALL)
-	test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
-	@list=''; test -n "$(man3dir)" || exit 0; \
-	{ for i in $$list; do echo "$$i"; done; \
-	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-	  sed -n '/\.3[a-z]*$$/p'; \
-	} | 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='$(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,.,'`; \
-	test -z "$$files" || { \
-	  echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
-	  cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-	@list='$(MANS)'; if test -n "$$list"; then \
-	  list=`for p in $$list; do \
-	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
-	  if test -n "$$list" && \
-	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
-	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
-	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
-	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
-	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
-	    exit 1; \
-	  else :; fi; \
-	else :; fi
-	@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
-check-am: all-am
-check: $(BUILT_SOURCES)
-	$(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(MANS)
-installdirs:
-	for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; 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:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-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)
-
-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)
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am: html-local
-
-info: info-am
-
-info-am:
-
-install-data-am: install-man
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-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 Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-man
-
-uninstall-man: uninstall-man1 uninstall-man3
-
-.MAKE: all check install install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	distclean distclean-generic distclean-libtool distdir dvi \
-	dvi-am html html-am html-local info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-man1 \
-	install-man3 install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \
-	uninstall-man3
-
-
-@HAVE_SASL_TRUE@${SASL_PAGES}:
-@HAVE_SASL_TRUE@	@rm -f $@
-@HAVE_SASL_TRUE@	ln -s ${top_srcdir}/docs/memcached_sasl.pod ${top_builddir}/docs/$@
-
-${CREATE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_create.pod ${top_builddir}/docs/$@
-
-${SET_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_set.pod ${top_builddir}/docs/$@
-
-${DELETE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_delete.pod ${top_builddir}/docs/$@
-
-${AUTO_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_auto.pod ${top_builddir}/docs/$@
-
-${GET_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_get.pod ${top_builddir}/docs/$@
-
-${SERVER_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_servers.pod ${top_builddir}/docs/$@
-
-${SERVER_ST_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_server_st.pod ${top_builddir}/docs/$@
-
-${GENERIC_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/$*.pod ${top_builddir}/docs/$@
-
-${BEHAVIOR_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_behavior.pod ${top_builddir}/docs/$@
-
-${CALLBACK_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_callback.pod ${top_builddir}/docs/$@
-
-${STATS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_stats.pod ${top_builddir}/docs/$@
-
-${RESULT_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_result_st.pod ${top_builddir}/docs/$@
-
-${VERSION_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_version.pod ${top_builddir}/docs/$@
-
-${MEMORY_ALLOCATORS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_memory_allocators.pod ${top_builddir}/docs/$@
-
-${USER_DATA_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_user_data.pod ${top_builddir}/docs/$@
-
-${POOL_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/memcached_pool.pod ${top_builddir}/docs/$@
-
-${HASHKIT_CREATE_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_create.pod ${top_builddir}/docs/$@
-
-${HASHKIT_FUNCTIONS_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_functions.pod ${top_builddir}/docs/$@
-
-${HASHKIT_ST_PAGES}:
-	@rm -f $@
-	ln -s ${top_srcdir}/docs/hashkit_value.pod ${top_builddir}/docs/$@
-
-test-docs: $(POD_FILES)
-	${PODCHECKER} $(top_srcdir)/docs/$?
-
-html-local: html-pages html-index
-
-html-pages: $(HTML_FILES)
-
-html-index: html-pages
-	perl make_index.pl *.html > index.html
-
-.pop: ${_set}
-
-.pop.html:
-	pod2html --infile=$< >  $@
-
-.pop.1:
-	${POD2MAN} -c "$*" -r "" -s 1 $< >  $@
-
-.pop.3:
-	${POD2MAN} -c "$*" -r "" -s 3 $< >  $@
-
-# 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:
@@ -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
+# "<project> v<release> 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 <link> 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),
+  ]
@@ -1,57 +0,0 @@
-=head1 NAME
-
-hashkit_create, hashkit_clone, hashkit_free, hashkit_is_allocated -
-Create and destroy hashkit objects
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #include <libhashkit/hashkit.h>
-
-  hashkit_st *hashkit_create(hashkit_st *hash);
-
-  hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr);
-
-  void hashkit_free(hashkit_st *hash);
-
-  bool hashkit_is_allocated(const hashkit_st *hash);
-
-=head1 DESCRIPTION
-
-The hashkit_create() function initializes a hashkit object for use. If
-you pass a NULL argument for hash, then the memory for the object is
-allocated. If you specify a pre-allocated piece of memory, that is
-initialized for use.
-
-The hashkit_clone() function initializes a hashkit object much like
-hashkit_create(), but instead of using default settings it will use
-the settings of the ptr hashkit object.
-
-The hashkit_free() frees any resources being consumed by the hashkit
-objects that were initialized with hashkit_create() or hashkit_clone().
-
-The hashkit_is_allocated() reports where the memory was allocated 
-for a hashkit object.
-
-=head1 RETURN VALUE
-
-hashkit_create() and hashkit_clone() will return NULL on failure or
-non-NULL on success.
-
-hashkit_is_allocated() returns true if the memory for the hashkit
-object was allocated inside of hashkit_create() or hashkit_clone(),
-otherwise it is false and was user-supplied memory.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=cut
@@ -1,54 +0,0 @@
-=head1 NAME
-
-hashkit_default, hashkit_fnv1_64, hashkit_fnv1a_64, hashkit_fnv1_32,
-hashkit_fnv1a_32, hashkit_crc32, hashkit_hsieh, hashkit_murmur,
-hashkit_jenkins, hashkit_md5 - Various hash functions to use for
-calculating values for keys
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #include <libhashkit/hashkit.h>
-
-  uint32_t hashkit_default(const char *key, size_t key_length);
-  uint32_t hashkit_fnv1_64(const char *key, size_t key_length);
-  uint32_t hashkit_fnv1a_64(const char *key, size_t key_length);
-  uint32_t hashkit_fnv1_32(const char *key, size_t key_length);
-  uint32_t hashkit_fnv1a_32(const char *key, size_t key_length);
-  uint32_t hashkit_crc32(const char *key, size_t key_length);
-  uint32_t hashkit_hsieh(const char *key, size_t key_length);
-  uint32_t hashkit_murmur(const char *key, size_t key_length);
-  uint32_t hashkit_jenkins(const char *key, size_t key_length);
-  uint32_t hashkit_md5(const char *key, size_t key_length);
-
-=head1 DESCRIPTION
-
-These functions generate hash values from a key using a variety of
-algorithms. These functions can be used standalone, or as arguments
-to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
-
-The hashkit_hsieh() is only available if the library is built with
-the appropriate flag enabled.
-
-=head1 RETURN VALUE
-
-A 32-bit hash value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-hashkit_create(3) hashkit_value(3) hashkit_set_hash_fn(3)
-hashkit_set_continuum_hash_fn(3)
-
-=cut
@@ -1,41 +0,0 @@
-=head1 NAME
-
-hashkit_value - Generate a value for the given key
-
-=head1 LIBRARY
-
-C Library for hashing algorithms (libhashkit, -lhashkit)
-
-=head1 SYNOPSIS
-
-  #include <libhashkit/hashkit.h>
-
-  uint32_t hashkit_value(hashkit_st *hash,
-                         const char *key,
-                         size_t key_length);
-
-=head1 DESCRIPTION
-
-The hashkit_value() function generates a 32-bit hash value from the
-given key and key_length. The hash argument is an initialized hashkit
-object, and distribution type and hash function is used from this
-object while generating the value.
-
-=head1 RETURN VALUE
-
-A 32-bit hash value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-hashkit_create(3) hashkit_set_distribution(3) hashkit_set_hash_fn(3)
-
-=cut
@@ -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 <target>' where <target> 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."
@@ -1,127 +0,0 @@
-=head1 NAME
-
-libmemcached - Client library for memcached
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-=head1 DESCRIPTION
-
-"Memcached is a high-performance, distributed memory object caching
-system, generic in nature, but intended for use in speeding up dynamic web
-applications by alleviating database load." L<http://danga.com/memcached/>
-
-B<libmemcached> is a small, thread-safe client library for the
-memcached protocol. The code has all been written with an eye to allow
-for both web and embedded usage. It handles the work behind routing
-particular keys to specific servers that you specify (and values are
-matched based on server order as supplied by you). It implements both
-a modula and consistent method of object distribution.
-
-There are multiple implemented routing and hashing methods. See the
-memcached_behavior_set() manpage.
-
-All operations are performed against a C<memcached_st> structure.
-These structures can either be dynamically allocated or statically
-allocated and then initialized by memcached_create(). Functions have been
-written in order to encapsulate the C<memcached_st>. It is not
-recommended that you operate directly against the structure.
-
-Nearly all functions return a C<memcached_return_t> value.
-This value can be translated to a printable string with memcached_strerror(3).
-
-Partitioning based on keys is supported in the library. Using the key partioning 
-functions it is possible to group sets of object onto servers.
-
-C<memcached_st> structures are thread-safe, but each thread must
-contain its own structure (that is, if you want to share these among
-threads you must provide your own locking). No global variables are
-used in this library.
-
-If you are working with GNU autotools you will want to add the following to
-your configure.ac to properly include libmemcached in your application. 
-
-PKG_CHECK_MODULES(DEPS, libmemcached >= 0.8.0)
-AC_SUBST(DEPS_CFLAGS)
-AC_SUBST(DEPS_LIBS)
-
-Some features of the library must be enabled through memcached_behavior_set(). 
-
-Hope you enjoy it!
-
-=head1 CONSTANTS
-
-A number of constants have been provided for in the library.
-
-=over 4
-
-=item MEMCACHED_DEFAULT_PORT
-
-The default port used by memcached(3).
-
-=item MEMCACHED_MAX_KEY
-
-Default maximum size of a key (which includes the null pointer). Master keys
-have no limit, this only applies to keys used for storage.
-
-=item MEMCACHED_MAX_KEY
-
-Default size of key (which includes the null pointer).
-
-=item MEMCACHED_STRIDE
-
-This is the "stride" used in the consistent hash used between replicas.
-
-=item MEMCACHED_MAX_HOST_LENGTH
-
-Maximum allowed size of the hostname.
-
-=item MEMCACHED_VERSION_STRING
-
-String value of libmemcached version such as "1.23.4"
-
-=item MEMCACHED_MAJOR_VERSION
-
-Major version value. Such as 1.23.4, would be 1 
-
-=item MEMCACHED_MINOR_VERSION
-
-Major version value. Such as 1.23.4, would be 23 
-
-=item MEMCACHED_MICRO_VERSION
-
-Major version value. Such as 1.23.4, would be 4 
-
-
-=back
-
-
-
-=head1 THREADS AND PROCESSES
-
-When using threads or forked processes it is important to keep an instance
-of C<memcached_st> per process or thread. Without creating your own locking
-structures you can not share a single C<memcached_st>. You can though call
-memcached_quit(3) on a C<memcached_st> and then use the resulting cloned
-structure.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached_examples(3) libmemcached(1) memcat(1) memcp(1) memflush(1) memrm(1) memslap(1) memstat(1) memcached_fetch(3) memcached_replace(3) memcached_server_list_free(3) libmemcached_examples(3) memcached_clone(3) memcached_free(3) memcached_server_add(3) memcached_server_push(3) memcached_add(3) memcached_get(3) memcached_server_count(3) memcached_servers_parse(3) memcached_create(3) memcached_increment(3) memcached_server_list(3) memcached_set(3) memcached_decrement(3) memcached_mget(3) memcached_server_list_append(3) memcached_strerror(3) memcached_delete(3) memcached_quit(3) memcached_server_list_count(3) memcached_verbosity(3) memcached_server_add_unix_socket(3) memcached_result_create(3)  memcached_result_free(3)  memcached_result_key_value(3)  memcached_result_key_length(3)  memcached_result_value(3)  memcached_result_length(3)  memcached_result_flags(3)  memcached_result_cas(3) memcached_result_st(3) memcached_append(3) memcached_prepend(3) memcached_fetch_result(3) memerror(1) memcached_get_by_key(3) memcached_mget_by_key(3) memcached_delete_by_key(3) memcached_fetch_execute(3) memcached_callback_get(3) memcached_callback_set(3) memcached_version(3) memcached_lib_version(3) memcached_result_set_value(3) memcached_dump(3) memdump(1) memcached_set_memory_allocators(3) memcached_get_memory_allocators(3) memcached_get_user_data(3) memcached_set_user_data(3)
-
-=cut
-
@@ -1,115 +0,0 @@
-=head1 NAME
-
-libmemcached_examples - Examples for libmemcached
-
-=head1 DESCRIPTION
-
-For full examples, test cases are found in tests/*.c in the main
-distribution. These are always up to date, and are used for each test run of
-the library.
-
-=head2 Creating and Freeing structure
-
-  memcached_st *memc;
-  memcached_return_t rc;
-
-  memc= memcached_create(NULL);
-  ...do stuff...
-  memcached_free(memc);
-
-The above code would create a connection and then free the connection when
-finished.
-
-=head2 Connecting to servers
-
-  memcached_server_st *servers;
-  memcached_st *memc= memcached_create(NULL);
-  char servername[]= "0.example.com";
-
-  servers= memcached_server_list_append(NULL, servername, 400, &rc);
-
-  for (x= 0; x < 20; x++)
-  {
-    char buffer[SMALL_STRING_LEN];
-
-    snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
-    servers= memcached_server_list_append(servers, buffer, 401, &rc);
-  }
-  rc= memcached_server_push(memc, servers);
-  memcached_server_free(servers);
-  memcached_free(memc);
-
-In the above code you create a C<memcached_st> object that you then feed in a
-single host into. In the for loop you build a C<memcached_server_st>
-pointer that you then later feed via memcached_server_push() into the
-C<memcached_st> structure.
-
-You can reuse the C<memcached_server_st> object with multile C<memcached_st>
-structures.
-
-=head2 Adding a value to the server
-
-  char *key= "foo";
-  char *value;
-  size_t value_length= 8191;
-  unsigned int x;
-
-  value = (char*)malloc(value_length);
-  assert(value);
-
-  for (x= 0; x < value_length; x++)
-  value[x] = (char) (x % 127);
-
-  for (x= 0; x < 1; x++)
-  {
-    rc= memcached_set(memc, key, strlen(key), 
-    value, value_length,
-    (time_t)0, (uint32_t)0);
-    assert(rc == MEMCACHED_SUCCESS);
-  }
-
-  free(value);
-
-It is best practice to always look at the return value of any operation.
-
-=head2 Fetching multiple values
-
-  memcached_return_t rc;
-  char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-  uint32_t flags;
-
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *return_value;
-  size_t return_value_length;
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-
-  x= 0;
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length, 
-                                        &return_value_length, &flags, &rc)))
-  {
-    free(return_value);
-    x++;
-  }
-
-Notice that you freed values returned from memcached_fetch(). The define
-C<MEMCACHED_MAX_KEY> is provided for usage.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1)
-
-=cut
-
@@ -1,40 +0,0 @@
-=head1 NAME
-
-libmemcachedutil - Utility library for libmemcached
-
-=head1 LIBRARY
-
-C Client Library containing utility functions for libmemcached (libmemcachedutil, -lmemcachedutil)
-
-=head1 SYNOPSIS
-
-  cc [ flag ... ] file ... -lmemcachedutil
-
-  #include <libmemcached/memcached_util.h>
-
-=head1 DESCRIPTION
-
-B<libmemcachedutil> is a small and thread-safe client library that provides
-extra functionality built on top of B<libmemcached>.
-
-=head1 THREADS
-
-Do not try to access an instance of C<memcached_st> from multiple threads
-at the same time. If you want to access memcached from multiple threads
-you should either clone the C<memcached_st>, or use the memcached pool
-implementation. see memcached_pool_create(3).
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-libmemcached(3) memcached_pool_create(3) memcached_pool_destroy(3) memcached_pool_pop(3) memcached_pool_push(3)
-
-=cut
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use CGI;
-
-sub main {
-  my $cgi = new CGI;
-
-  print $cgi->start_html('Libmemcached Documentation') . "\n";
-  print $cgi->h1('Libmemcached Documentation') . "\n";
-
-  print $cgi->a({ href => "libmemcached.html" }, "Introduction to Libmemcached") . $cgi->br() . "\n";
-  print $cgi->a({ href => "libmemcached_examples.html" }, "Libmemcached Examples") . $cgi->br() . "\n";
-  print $cgi->br() . "\n";
-  print $cgi->br() . "\n";
-
-  foreach (@ARGV)
-  {
-    my $url=  $_;
-    my $name= $_;
-    $name  =~ s/\.html//g;
-    next if $name eq 'index'; 
-    next if $name eq 'libmemcached'; 
-    next if $name eq 'libmemcached_examples'; 
-    print "<li\>" . $cgi->a({ href => $url }, $name) . $cgi->br() . "\n";
-  }
-  print $cgi->end_html; 
-}
-
-main();
@@ -1,53 +0,0 @@
-=head1 NAME
-
-memcached_analyze - Analyze server information
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_analysis_st *
-    memcached_analyze (memcached_st *ptr,
-                       memcached_stat_st *stat,
-                       memcached_return_t *error);
-
-=head1 DESCRIPTION
-
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-C<memcached_analysis_st> structure. You are responsible for freeing this structure.
-
-memcached_analyze() analyzes useful information based on the provided servers
-and sets the result to the C<memcached_analysis_st> structure. The return value
-must be freed by the calling application.
-
-A command line tool, memstat(1) with the option --analyze, is provided so that
-you do not have to write an application to use this method.
-
-=head1 RETURN
-
-A pointer to the allocated C<memcached_analysis_st> structure on success and
-a NULL pointer on failure. You may inspect the error detail by checking the
-C<memcached_return_t> value.
-
-Any method returning a C<memcached_analysis_st> expects you to free the
-memory allocated for it.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Toru Maesaka, E<lt>dev@torum.netE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
@@ -1,138 +0,0 @@
-=head1 NAME
-
-memcached_increment, memcached_decrement,
-memcached_increment_with_initial, memcached_decrement_with_initial - Manipulate
-counters
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_increment (memcached_st *ptr, 
-                         const char *key, size_t key_length,
-                         unsigned int offset,
-                         uint64_t *value);
-
-  memcached_return_t
-    memcached_decrement (memcached_st *ptr, 
-                         const char *key, size_t key_length,
-                         unsigned int offset,
-                         uint64_t *value);
-
-  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);
-
-  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);
-
-  memcached_return_t
-    memcached_increment_by_key (memcached_st *ptr, 
-                                const char *master_key, size_t master_key_length,
-                                const char *key, size_t key_length,
-                                unsigned int offset,
-                                uint64_t *value);
-
-  memcached_return_t
-    memcached_decrement_by_key (memcached_st *ptr, 
-                                const char *master_key, size_t master_key_length,
-                                const char *key, size_t key_length,
-                                unsigned int offset,
-                                uint64_t *value);
-
-  memcached_return_t
-    memcached_increment_with_initial_by_key (memcached_st *ptr,
-                                             const char *master_key,
-                                             size_t master_key_length,
-                                             const char *key,
-                                             size_t key_length,
-                                             uint64_t offset,
-                                             uint64_t initial,
-                                             time_t expiration,
-                                             uint64_t *value);
-
-  memcached_return_t
-    memcached_decrement_with_initial_by_key (memcached_st *ptr,
-                                             const char *master_key,
-                                             size_t master_key_length,
-                                             const char *key,
-                                             size_t key_length,
-                                             uint64_t offset,
-                                             uint64_t initial,
-                                             time_t expiration,
-                                             uint64_t *value);
-
-=head1 DESCRIPTION
-
-memcached(1) servers have the ability to increment and decrement keys
-(overflow and underflow are not detected). This gives you the ability to use
-memcached to generate shared sequences of values.  
-
-memcached_increment() takes a key and keylength and increments the value by
-the offset passed to it. The value is then returned via the unsigned int
-value pointer you pass to it.
-
-memcached_decrement() takes a key and keylength and decrements the value by
-the offset passed to it. The value is then returned via the unsigned int
-value pointer you pass to it.
-
-memcached_increment_with_initial() takes a key and keylength and increments
-the value by the offset passed to it. If the object specified by key does
-not exist, one of two things may happen: If the expiration value is
-MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
-expiration values, the operation will succeed by seeding the value for that
-key with a initial value to expire with the provided expiration time. The
-flags will be set to zero.The value is then returned via the unsigned int
-value pointer you pass to it.
-
-memcached_decrement_with_initial() takes a key and keylength and decrements
-the value by the offset passed to it. If the object specified by key does
-not exist, one of two things may happen: If the expiration value is
-MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
-expiration values, the operation will succeed by seeding the value for that
-key with a initial value to expire with the provided expiration time. The
-flags will be set to zero.The value is then returned via the unsigned int
-value pointer you pass to it.
-
-memcached_increment_by_key(), memcached_decrement_by_key(),
-memcached_increment_with_initial_by_key(), and
-memcached_decrement_with_initial_by_key() are master key equivalents of the
-above.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned.
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,292 +0,0 @@
-=head1 NAME
-
-memcached_behavior_get, memcached_behavior_set - Manipulate behavior
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  uint64_t
-    memcached_behavior_get (memcached_st *ptr,
-                            memcached_behavior flag);
-
-  memcached_return_t
-    memcached_behavior_set (memcached_st *ptr,
-                            memcached_behavior flag,
-                            uint64_t data);
-
-=head1 DESCRIPTION
-
-libmemcached(3) behavior can be modified by use memcached_behavior_set().
-Default behavior is the library strives to be quick and accurate. Some
-behavior, while being faster, can also result in not entirely accurate
-behavior (for instance, memcached_set() will always respond with
-C<MEMCACHED_SUCCESS>).
-
-memcached_behavior_get() takes a behavior flag and returns whether or not
-that behavior is currently enabled in the client.
-
-memcached_behavior_set() changes the value of a particular option of the
-client. It takes both a flag (listed below) and a value. For simple on or
-off options you just need to pass in a value of 1. Calls to
-memcached_behavior_set() will flush and reset all connections.
-
-=over 4
-
-=item MEMCACHED_BEHAVIOR_USE_UDP
-
-Causes libmemcached(3) to use the UDP transport when communicating
-with a memcached server. Not all I/O operations are supported
-when this behavior is enababled. The following operations will return
-C<MEMCACHED_NOT_SUPPORTED> when executed with the MEMCACHED_BEHAVIOR_USE_UDP
-enabled: memcached_version(), memcached_stat(), memcached_get(),
-memcached_get_by_key(), memcached_mget(), memcached_mget_by_key(),
-memcached_fetch(), memcached_fetch_result(), memcached_value_fetch().
-
-All other operations are supported but are executed in a 'fire-and-forget'
-mode, in which once the client has executed the operation, no attempt
-will be made to ensure the operation has been received and acted on by the
-server.
-
-libmemcached(3) does not allow TCP and UDP servers to be shared within
-the same libmemached(3) client 'instance'. An attempt to add a TCP server
-when this behavior is enabled will result in a C<MEMCACHED_INVALID_HOST_PROTOCOL>,
-as will attempting to add a UDP server when this behavior has not been enabled.
-
-=item MEMCACHED_BEHAVIOR_NO_BLOCK
-
-Causes libmemcached(3) to use asychronous IO. This is the fastest transport
-available for storage functions.
-
-=item MEMCACHED_BEHAVIOR_SND_TIMEOUT
-
-This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.
-In cases where you cannot use non-blocking IO this will allow you to still have
-timeouts on the sending of data.
-
-=item MEMCACHED_BEHAVIOR_RCV_TIMEOUT
-
-This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
-In cases where you cannot use non-blocking IO this will allow you to still have
-timeouts on the reading of data.
-
-=item MEMCACHED_BEHAVIOR_TCP_NODELAY
-
-Turns on the no-delay feature for connecting sockets (may be faster in some
-environments).
-
-=item MEMCACHED_BEHAVIOR_HASH
-
-Makes the default hashing algorithm for keys use MD5. The value can be set
-to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, MEMCACHED_HASH_FNV1A_32, MEMCACHED_HASH_JENKINS, MEMCACHED_HASH_HSIEH, and MEMCACHED_HASH_MURMUR.
-Each hash has it's advantages and it's weaknesses. If you don't know or don't care, just go with the default.
-Support for MEMCACHED_HASH_HSIEH is a compile time option that is disabled by default. To enable support for this hashing algorithm, configure and build libmemcached with the --enable-hash_hsieh.
-
-=item MEMCACHED_BEHAVIOR_DISTRIBUTION
-
-Using this you can enable different means of distributing values to servers.
-The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable
-consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.
-Consistent hashing delivers better distribution and allows servers to be
-added to the cluster with minimal cache losses. Currently
-MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value
-MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
-
-=item MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
-
-Memcached can cache named lookups so that DNS lookups are made only once.
-
-=item MEMCACHED_BEHAVIOR_SUPPORT_CAS
-
-Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
-
-=item MEMCACHED_BEHAVIOR_KETAMA
-
-Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA
-and the hash to MEMCACHED_HASH_MD5.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
-
-Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted support.
-and the hash to MEMCACHED_HASH_MD5.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_HASH
-
-Sets the hashing algorithm for host mapping on continuum. The value can be set
-to either MEMCACHED_HASH_DEFAULT, MEMCACHED_HASH_MD5, MEMCACHED_HASH_CRC, MEMCACHED_HASH_FNV1_64, MEMCACHED_HASH_FNV1A_64, MEMCACHED_HASH_FNV1_32, and MEMCACHED_HASH_FNV1A_32.
-
-=item MEMCACHED_BEHAVIOR_KETAMA_COMPAT
-
-Sets the compatibility mode. The value can be set to either
-MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or
-MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client
-for Java.
-
-=item MEMCACHED_BEHAVIOR_POLL_TIMEOUT
-
-Modify the timeout value that is used by poll(). The default value is -1. An signed int pointer must be passed to memcached_behavior_set() to change this value. For memcached_behavior_get() a signed int value will be cast and returned as the unsigned long long.
-
-=item MEMCACHED_BEHAVIOR_USER_DATA
-
-This allows you to store a pointer to a specifc piece of data. This can be
-retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
-
-will copy the pointer to the clone. This was deprecated in 0.14 in favor
-of memcached_callback_set(3). This will be removed in 0.15.
-
-=item MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
-
-Enabling buffered IO causes commands to "buffer" instead of being sent. Any
-action that gets data causes this buffer to be be sent to the remote
-connection. Quiting the connection or closing down the connection will also
-cause the buffered data to be pushed to the remote connection.
-
-=item MEMCACHED_BEHAVIOR_VERIFY_KEY
-
-Enabling this will cause libmemcached(3) to test all keys to verify that they
-are valid keys.
-
-=item MEMCACHED_BEHAVIOR_SORT_HOSTS
-
-Enabling this will cause hosts that are added to be placed in the host list in
-sorted order. This will defeat consisten hashing.
-
-=item MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
-
-In non-blocking mode this changes the value of the timeout during socket
-connection.
-
-=item MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
-
-Enable the use of the binary protocol. Please note that you cannot toggle
-this flag on an open connection.
-
-=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-
-Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-times connection failure.
-
-=item MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
-
-Set this value to tune the number of messages that may be sent before
-libmemcached should start to automatically drain the input queue. Setting
-this value to high, may cause libmemcached to deadlock (trying to send data,
-but the send will block because the input buffer in the kernel is full).
-
-=item MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
-
-Set this value to tune the number of bytes that may be sent before
-libmemcached should start to automatically drain the input queue (need
-at least 10 IO requests sent without reading the input buffer). Setting
-this value to high, may cause libmemcached to deadlock (trying to send
-data, but the send will block because the input buffer in the kernel is full).
-
-=item MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
-
-The binary protocol works a bit different than the textual protocol in
-that a multiget is implemented as a pipe of single get-operations which
-are sent to the server in a chunk. If you are using large multigets from
-your application, you may improve the latency of the gets by setting
-this value so you send out the first chunk of requests when you hit the
-specified limit.  It allows the servers to start processing the requests
-to send the data back while the rest of the requests are created and
-sent to the server.
-
-=item MEMCACHED_BEHAVIOR_NOREPLY
-
-Set this value to specify that you really don't care about the result
-from your storage commands (set, add, replace, append, prepend).
-
-=item MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
-
-If you just want "a poor mans HA", you may specify the numbers of
-replicas libmemcached should store of each item (on different servers).
-This replication does not dedicate certain memcached servers to store the
-replicas in, but instead it will store the replicas together with all of the
-other objects (on the 'n' next servers specified in your server list).
-
-=item MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
-
-Allows randomizing the replica reads starting point. Normally the read is
-done from primary server and in case of miss the read is done from primary
-+ 1, then primary + 2 all the way to 'n' replicas. If this option is set
-on the starting point of the replica reads is randomized between the servers.
-This allows distributing read load to multiple servers with the expense of
-more write traffic.
-
-=item MEMCACHED_BEHAVIOR_CORK
-
-Enable TCP_CORK behavior. This is only available as an option Linux.
-MEMCACHED_NO_SERVERS is returned if no servers are available to test with.
-MEMCACHED_NOT_SUPPORTED is returned if we were not able to determine
-if support was available. All other responses then MEMCACHED_SUCCESS
-report an error of some sort. This behavior also enables
-MEMCACHED_BEHAVIOR_TCP_NODELAY when set.
-
-=item MEMCACHED_BEHAVIOR_KEEPALIVE
-
-Enable TCP_KEEPALIVE behavior.
-
-=item MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
-
-Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
-
-=item MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
-
-Find the current size of SO_SNDBUF. A value of 0 means either an error
-occured or no hosts were available. It is safe to assume system default
-if this occurs.
-
-=item MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
-
-Find the current size of SO_RCVBUF. A value of 0 means either an error
-occured or no hosts were available. It is safe to assume system default
-if this occurs.
-
-=item MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
-
-This number of times a host can have an error before it is disabled.
-
-=item MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
-
-If enabled any hosts which have been flagged as disabled will be removed
-from the list of servers in the memcached_st structure. This must be used
-in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
-
-=item MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
-
-When enabled a host which is problematic will only be checked for usage
-based on the amount of time set by this behavior.
-
-=back
-
-=head1 RETURN
-
-memcached_behavior_get() returns either the current value of the get, or 0
-or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set()
-returns failure or success.
-
-=head1 NOTES
-
-memcached_behavior_set() in version .17 was changed from taking a pointer
-to data value, to taking a uin64_t.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,123 +0,0 @@
-=head1 NAME
-
-memcached_callback_get, memcached_callback_set - Get and set a callback
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t 
-    memcached_callback_set (memcached_st *ptr, 
-                            memcached_callback_t flag, 
-                            void *data);
-
-  void *
-    memcached_callback_get (memcached_st *ptr, 
-                            memcached_callback_t flag,
-                            memcached_return_t *error);
-
-=head1 DESCRIPTION
-
-libmemcached(3) can have callbacks set key execution points. These either
-provide function calls at points in the code, or return pointers to
-structures for particular usages.
-
-memcached_callback_get() takes a callback flag and returns the structure or
-function set by memcached_callback_set().
-
-memcached_callback_set() changes the function/structure assigned by a
-callback flag. No connections are reset. 
-
-You can use MEMCACHED_CALLBACK_USER_DATA to provide custom context if required for any 
-of the callbacks
-
-=over 4
-
-=item MEMCACHED_CALLBACK_CLEANUP_FUNCTION
-
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections have been closed.
-
-=item MEMCACHED_CALLBACK_CLONE_FUNCTION
-
-When memcached_delete() is called this function will be excuted. At the
-point of its execution all connections have been closed.
-
-=item MEMCACHED_CALLBACK_PREFIX_KEY
-
-You can set a value which will be used to create a domain for your keys.
-The value specified here will be prefixed to each of your keys. The value can not
-be greater then MEMCACHED_PREFIX_KEY_MAX_SIZE - 1 and will reduce MEMCACHED_MAX_KEY by
-the value of your key. The prefix key is only applied to the primary key,
-not the master key. MEMCACHED_FAILURE will be returned if no key is set. In the case
-of a key which is too long MEMCACHED_BAD_KEY_PROVIDED will be returned.
-
-=item MEMCACHED_CALLBACK_USER_DATA
-
-This allows you to store a pointer to a specifc piece of data. This can be
-retrieved from inside of memcached_fetch_execute(). Cloning a memcached_st
-will copy the pointer to the clone.
-
-=item  MEMCACHED_CALLBACK_MALLOC_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_REALLOC_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_FREE_FUNCTION
-
-DEPRECATED: use memcached_set_memory_allocators instead.
-
-=item  MEMCACHED_CALLBACK_GET_FAILURE
-
-This function implements the read through cache behavior. On failure of retrieval this callback will be called. 
-You are responsible for populating the result object provided. This result object will then be stored in the server and
-returned to the calling process. You must clone the memcached_st in order to
-make use of it. The value will be stored only if you return
-MEMCACHED_SUCCESS or MEMCACHED_BUFFERED. Returning MEMCACHED_BUFFERED will
-cause the object to be buffered and not sent immediatly (if this is the default behavior based on your connection setup this will happen automatically).
-
-The prototype for this is:
-memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
-
-=item  MEMCACHED_CALLBACK_DELETE_TRIGGER
-
-This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned
-in order to make use of it.
-
-The prototype for this is:
-typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
-
-
-=back
-
-=head1 RETURN
-
-memcached_callback_get() return the function or structure that was provided.
-Upon error, nothing is set, null is returned, and the memcached_return_t
-argument is set to MEMCACHED_FAILURE.
-
-memcached_callback_set() returns MEMCACHED_SUCCESS upon successful setting,
-otherwise MEMCACHED_FAILURE on error.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,67 +0,0 @@
-=head1 NAME
-
-memcached_create, memcached_free, memcached_clone, memcached_servers_reset- Create a memcached_st structure
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_st *memcached_create (memcached_st *ptr);
-
-  void memcached_free (memcached_st *ptr);
-
-  memcached_st *memcached_clone (memcached_st *destination, memcached_st *source);
-
-  void memcached_servers_reset(memcached_st);
-
-=head1 DESCRIPTION
-
-memcached_create() is used to create a C<memcached_st> structure that will then
-be used by other libmemcached(3) functions to communicate with the server. You
-should either pass a statically declared C<memcached_st> to memcached_create() or
-a NULL. If a NULL passed in then a structure is allocated for you.
-
-memcached_clone() is similar to memcached_create(3) but it copies the
-defaults and list of servers from the source C<memcached_st>. If you pass a null as
-the argument for the source to clone, it is the same as a call to memcached_create().
-If the destination argument is NULL a C<memcached_st> will be allocated for you.
-
-memcached_servers_reset() allows you to zero out the list of servers that
-the memcached_st has.
-
-To clean up memory associated with a C<memcached_st> structure you should pass
-it to memcached_free() when you are finished using it. memcached_free() is
-the only way to make sure all memory is deallocated when you finish using
-the structure.
-
-You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
-stack based allocation. The most common issues related to ABI safety involve
-heap allocated structures.
-
-=head1 RETURN
-
-memcached_create() returns a pointer to the memcached_st that was created
-(or initialized). On an allocation failure, it returns NULL.
-
-memcached_clone() returns a pointer to the memcached_st that was created
-(or initialized). On an allocation failure, it returns NULL.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,61 +0,0 @@
-=head1 NAME
-
-memcached_delete - Delete a key
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_delete (memcached_st *ptr,
-                      const char *key, size_t key_length,
-                      time_t expiration);
-
-  memcached_return_t
-  memcached_delete_by_key (memcached_st *ptr,
-                           const char *master_key, size_t master_key_length,
-                           const char *key, size_t key_length,
-                           time_t expiration);
-
-=head1 DESCRIPTION
-
-memcached_delete() is used to delete a particular key. 
-memcached_delete_by_key() works the same, but it takes a master key to
-find the given value.
-
-Expiration works by placing the item into a delete queue, which means that
-it won't possible to retrieve it by the "get" command, but "add" and 
-"replace" command with this key will also fail (the "set" command will 
-succeed, however). After the time passes, the item is finally deleted from server memory.
-
-Please note the the Danga memcached server removed support for expiration in
-the 1.4 version.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-If you are using the non-blocking mode of the library, success only
-means that the message was queued for delivery.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,53 +0,0 @@
-=head1 NAME
-
-memcached_dump - get a list of keys found on memcached servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_dump (memcached_st *ptr, 
-                    memcached_dump_fn *function, 
-                    void *context, 
-                    uint32_t number_of_callbacks);
-
-  typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr,  
-                                                  const char *key, 
-                                                  size_t key_length, 
-                                                  void *context);
-
-=head1 DESCRIPTION
-
-memcached_dump() is used to get a list of keys found  memcached(1) servers.
-Because memcached(1) does not guarentee to dump all keys you can not assume
-you have fetched all keys from the server. The function takes an array
-of callbacks that it will use to execute on keys as they are found.
-
-Currently the binar protocol is not supported.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,46 +0,0 @@
-=head1 NAME
-
-memcached_flush - wipe contents of memcached servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_flush (memcached_st *ptr,
-                     time_t expiration);
-
-=head1 DESCRIPTION
-
-memcached_flush() is used to wipe clean the contents of memcached(1) servers.
-It will either do this immediately or expire the content based on the
-expiration time passed to the method (a value of zero causes an immediate
-flush). The operation is not atomic to multiple servers, just atomic to a
-single server. That is, it will flush the servers in the order that they were
-added.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,42 +0,0 @@
-=head1 NAME
-
-memcached_flush_buffers - Flush buffers and send buffered commands
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t
-    memcached_flush_buffers (memcached_st *ptr);
-
-=head1 DESCRIPTION
-
-memcached_flush_buffers() is used in conjunction with 
-MEMCACHED_BEHAVIOR_BUFFER_REQUESTS (see memcached_behavior(3)) to flush
-all buffers by sending the buffered commands to the server for processing.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3) memcached_behavior(3)
-
-=cut
-
@@ -1,60 +0,0 @@
-=head1 NAME
-
-memcached_generate_hash_value - Hash a key value
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  uint32_t
-    memcached_generate_hash_value (const char *key,
-                                   size_t key_length,
-                                   memcached_hash_t hash_algorithm);
-
-  uint32_t 
-    memcached_generate_hash (memcached_st *ptr,
-                             const char *key, 
-                             size_t key_length);
-
-=head1 DESCRIPTION
-
-memcached_generate_hash_value() allows you to hash a key using one of
-the hash functions defined in the library. This method is provided for
-the convenience of higher-level language bindings and is not necessary
-for normal memcache operations.
-
-The allowed hash algorithm constants are listed in the manpage for
-memcached_behavior_set().
-
-memcached_generate_hash() takes a memcached_st struture and produces
-the hash value that would have been generated based on the defaults
-of the memcached_st structure.
-
-As of version 0.36 all hash methods have been placed into the library
-libhashkit(3) which is linked with libmemcached(3).
-
-=head1 RETURN
-
-A 32-bit integer which is the result of hashing the given key.
-For 64-bit hash algorithms, only the least-significant 32 bits are
-returned.
-
-=head1 HOME
-
-To find out more information please check: 
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_behavior_set(3) libhashkit(3)
-
-=cut
-
@@ -1,177 +0,0 @@
-=head1 NAME
-
-memcached_get, memcached_mget, memcached_fetch, memcached_mget_execute,
-memcached_mget_execute_by_key - Get a value
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_result_st *
-    memcached_fetch_result (memcached_st *ptr,
-                            memcached_result_st *result,
-                            memcached_return_t *error);
-
-  char *
-    memcached_get (memcached_st *ptr,
-                   const char *key, size_t key_length,
-                   size_t *value_length,
-                   uint32_t *flags,
-                   memcached_return_t *error);
-
-  memcached_return_t
-    memcached_mget (memcached_st *ptr,
-                  const char * const *keys,
-                  const size_t *key_length,
-                  size_t number_of_keys);
-  char *
-    memcached_get_by_key (memcached_st *ptr,
-                          const char *master_key, size_t master_key_length,
-                          const char *key, size_t key_length,
-                          size_t *value_length,
-                          uint32_t *flags,
-                          memcached_return_t *error);
-
-  memcached_return_t
-    memcached_mget_by_key (memcached_st *ptr,
-                           const char *master_key, size_t master_key_length,
-                           const char * const *keys,
-                           const size_t *key_length,
-                           size_t number_of_keys);
-
-  char *
-    memcached_fetch (memcached_st *ptr,
-                     char *key, size_t *key_length,
-                     size_t *value_length,
-                     uint32_t *flags,
-                     memcached_return_t *error);
-
-  memcached_return_t
-    memcached_fetch_execute (memcached_st *ptr,
-                             memcached_execute_fn *callback,
-                             void *context,
-                             uint32_t number_of_callbacks);
-
-
-  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,
-                            uint32_t number_of_callbacks);
-
-  memcached_return_t
-    memcached_mget_execute_by_key (memcached_st *ptr,
-                                   const char *master_key,
-                                   size_t master_key_length,
-                                   const char * const *keys,
-                                   const size_t *key_length,
-                                   size_t number_of_keys,
-                                   memcached_execute_fn *callback,
-                                   void *context,
-                                   uint32_t number_of_callbacks);
-
-
-=head1 DESCRIPTION
-
-memcached_get() is used to fetch an individual value from the server. You
-must pass in a key and its length to fetch the object. You must supply
-three pointer variables which will give you the state of the returned
-object.  A uint32_t pointer to contain whatever flags you stored with the value,
-a size_t pointer which will be filled with size of of the object, and a
-memcached_return_t pointer to hold any error. The object will be returned
-upon success and NULL will be returned on failure. Any object returned by
-memcached_get() must be released by the caller application.
-
-memcached_mget() is used to select multiple keys at once. For multiple key
-operations it is always faster to use this function. This function always
-works asynchronously. memcached_fetch() is then used to retrieve any keys
-found. No error is given on keys that are not found. You must call either
-memcached_fetch() or memcached_fetch_result() after a successful call to
-memcached_mget(). You should continue to call these functions until they
-return NULL (aka no more values). If you need to quit in the middle of a
-memcached_get() call, execute a memcached_quit(). After you do this, you can
-issue new queries against the server.
-
-memcached_fetch() is used to fetch an individual value from the server.
-memcached_mget() must always be called before using this method.  You
-must pass in a key and its length to fetch the object. You must supply
-three pointer variables which will give you the state of the returned
-object.  A uint32_t pointer to contain whatever flags you stored with the value,
-a size_t pointer which will be filled with size of of the object, and a
-memcached_return_t pointer to hold any error. The object will be returned
-upon success and NULL will be returned on failure. MEMCACHD_END is returned
-by the *error value when all objects that have been found are returned.
-The final value upon MEMCACHED_END is null. Values returned by
-memcached_fetch() musted be free'ed by the caller. memcached_fetch() will
-be DEPRECATED in the near future, memcached_fetch_result() should be used
-instead.
-
-memcached_fetch_result() is used to return a memcached_result_st(3) structure
-from a memcached server. The result object is forward compatible with changes
-to the server. For more information please refer to the memcached_result_st(3)
-help. This function will dynamically allocate a result structure for you
-if you do not pass one to the function.
-
-memcached_fetch_execute() is a callback function for result sets. Instead
-of returning the results to you for processing, it passes each of the
-result sets to the list of functions you provide. It passes to the function
-a memcached_st that can be cloned for use in the called function (it can not
-be used directly). It also passes a result set which does not need to be freed.
-Finally it passes a "context". This is just a pointer to a memory reference
-you supply the calling function. Currently only one value is being passed
-to each function call. In the future there will be an option to allow this
-to be an array.
-
-memcached_mget_execute() and memcached_mget_execute_by_key() is
-similar to memcached_mget(), but it may trigger the supplied callbacks
-with result sets while sending out the queries. If you try to perform
-a really large multiget with memcached_mget() you may encounter a
-deadlock in the OS kernel (we fail to write data to the socket because
-the input buffer is full). memcached_mget_execute() solves this
-problem by processing some of the results before continuing sending
-out requests. Please note that this function is only available in the
-binary protocol.
-
-memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature
-as memcached_get() and memcached_mget(). The difference is that they take
-a master key that is used for determining which server an object was stored
-if key partitioning was used for storage.
-
-All of the above functions are not supported when the C<MEMCACHED_BEHAVIOR_USE_UDP>
-has been set. Executing any of these functions with this behavior on will result in
-C<MEMCACHED_NOT_SUPPORTED> being returned or, for those functions which do not return
-a C<memcached_return_t>, the error function parameter will be set to
-C<MEMCACHED_NOT_SUPPORTED>.
-
-=head1 RETURN
-
-All objects returned must be freed by the calling application.
-memcached_get() and memcached_fetch() will return NULL on error. You must
-look at the value of error to determine what the actual error was.
-
-MEMCACHED_KEY_TOO_BIG is set to error whenever memcached_fetch() was used
-and the key was set larger then MEMCACHED_MAX_KEY, which was the largest
-key allowed for the original memcached ascii server.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,99 +0,0 @@
-=head1 NAME
-
-memcached_set_memory_allocators, memcached_get_memory_allocators, memcached_set_memory_allocators_context - Manage memory allocator functions
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  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);
-
-  void
-    memcached_get_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 * 
-    memcached_get_memory_allocators_context(const memcached_st *ptr);
-
-  void *
-    (*memcached_malloc_fn) (memcached_st *ptr, const size_t size,
-    			    void *context);
-
-  void *
-    (*memcached_realloc_fn) (memcached_st *ptr, void *mem,
-                             const size_t size,
-			     void *context);
-
-  void
-    (*memcached_free_fn) (memcached_st *ptr, void *mem,
-    			  void *context);
-
-  void *
-  (*memcached_calloc_fn) (memcached_st *ptr,
-  			  size_t nelem,
-                          const size_t elsize,
-			  void *context);
-
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to specify your own memory allocators optimized
-for your application.
-
-memcached_set_memory_allocators() is used to set the memory allocators used
-by the memcached instance specified by ptr. Please note that you cannot
-override only one of the memory allocators, you have to specify a complete
-new set if you want to override one of them. All of the memory allocation
-functions should behave as specified in the C99 standard. Specify NULL as
-all functions to reset them to the default values.
-
-memcached_get_memory_allocators() is used to get the currently used memory
-allocators by a mamcached handle.
-
-memcached_get_memory_allocators_context() returns the void * that was
-passed in during the call to memcached_set_memory_allocators().
-
-The first argument to the memory allocator functions is a pointer to a
-memcached structure, the is passed as const and you will need to clone
-it in order to make use of any operation which would modify it.
-
-=head1 NOTES
-
-In version 0.38 all functions were modified to have a context void pointer
-passed to them. This was so that customer allocators could have their
-own space for memory.
-
-=head1 RETURN
-
-memcached_set_memory_allocators() return MEMCACHED_SUCCESS upon success,
-and MEMCACHED_FAILURE if you don't pass a complete set of function pointers.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-Brian Aker, E<lt>brian@tangent.orf<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_get_user_data(3) memcached_set_user_data(3)
-
-=cut
-
@@ -1,99 +0,0 @@
-=head1 NAME
-
-memcached_pool_create, memcached_pool_destroy, memcached_pool_push, memcached_pool_pop - Manage pools
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcachedutil, -lmemcachedutil)
-
-=head1 SYNOPSIS
-
-  #include <libmemcached/memcached_pool.h>
-
-  memcached_pool_st *
-    memcached_pool_create(memcached_st* mmc, int initial, int max);
-
-  memcached_st *
-    memcached_pool_destroy(memcached_pool_st* pool);
-
-  memcached_st *
-    memcached_pool_pop (memcached_pool_st* pool, bool block, memcached_return_t *rc);
-
-  memcached_return_t
-    memcached_pool_push(memcached_pool_st* pool, memcached_st *mmc);
-
-  memcached_st *memcached_create (memcached_st *ptr);
-
-  memcached_return_t
-    memcached_pool_behavior_set(memcached_pool_st *pool,
-                                memcached_behavior_t flag,
-                                uint64_t data)
-
-  memcached_return_t
-    memcached_pool_behavior_get(memcached_pool_st *pool,
-                                memcached_behavior_t flag,
-                                uint64_t *value)
-
-=head1 DESCRIPTION
-
-memcached_pool_create() is used to create a connection pool of objects you
-may use to remove the overhead of using memcached_clone for short
-lived C<memcached_st> objects. The mmc argument should be an
-initialised C<memcached_st> structure, and a successfull invocation of
-memcached_pool_create takes full ownership of the variable (until it
-is released by memcached_pool_destroy). The C<initial> argument
-specifies the initial size of the connection pool, and the C<max>
-argument specifies the maximum size the connection pool should grow
-to. Please note that the library will allocate a fixed size buffer
-scaled to the max size of the connection pool, so you should not pass
-MAXINT or some other large number here.
-
-memcached_pool_destroy() is used to destroy the connection pool
-created with memcached_pool_create() and release all allocated
-resources. It will return the pointer to the C<memcached_st> structure
-passed as an argument to memcached_pool_create(), and returns the
-ownership of the pointer to the caller.
-
-memcached_pool_pop() is used to grab a connection structure from the
-connection pool. The block argument specifies if the function should
-block and wait for a connection structure to be available if we try
-to exceed the maximum size.
-
-memcached_pool_push() is used to return a connection structure back to the pool.
-
-memcached_pool_behavior_set() and memcached_pool_behagior_get() is
-used to get/set behavior flags on all connections in the pool.
-
-
-=head1 RETURN
-
-memcached_pool_create() returns a pointer to the newly created
-memcached_pool_st structure. On an allocation failure, it returns
-NULL.
-
-memcached_pool_destroy() returns the pointer (and ownership) to the
-memcached_st structure used to create the pool. If connections are in
-use it returns NULL.
-
-memcached_pool_pop() returns a pointer to a memcached_st structure
-from the pool (or NULL if an allocation cannot be satisfied).
-
-memcached_pool_push() returns MEMCACHED_SUCCESS upon success.
-
-memcached_pool_behavior_get() and memcached_pool_behavior_get()
-returns MEMCACHED_SUCCESS upon success.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_create(3) memcached_free(3) libmemcachedutil(3) memcached_behavior_get(3) memcached_behavior_set(3)
-
-=cut
@@ -1,47 +0,0 @@
-=head1 NAME
-
-memcached_quit - Disconnect from all servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  void memcached_quit (memcached_st *ptr);
-
-=head1 DESCRIPTION
-
-memcached_quit() will disconnect you from all currently connected servers.
-It will also reset the state of the connection (ie, any memcached_fetch() you
-are in the middle of will be terminated). This function is called
-automatically when you call memcached_free() on the C<memcached_st> structure.
-
-You do not need to call this on your own. All operations to change server
-hashes and parameters will handle connections to the server for you. This
-function is provided mainly so that you can timeout your connections or
-reset connections during the middle of a memcached_fetch().
-
-=head1 RETURN
-
-A value of type C<memcached_return> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,115 +0,0 @@
-=head1 NAME
-
-memcached_result_create, memcached_result_free,
-memcached_result_key_value, memcached_result_key_length,
-memcached_result_value, memcached_result_length,
-memcached_result_flags, memcached_result_cas - Work with memcached_result_st
-
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_result_st *
-    memcached_result_create (memcached_st *ptr,
-                             memcached_result_st *result);
-
-  void memcached_result_free (memcached_result_st *result);
-
-  const char * memcached_result_key_value (memcached_result_st *result);
-
-  size_t memcached_result_key_length (const memcached_result_st *result);
-
-  const char *memcached_result_value (memcached_result_st *ptr);
-
-  size_t memcached_result_length (const memcached_result_st *ptr);
-
-  uint32_t memcached_result_flags (const memcached_result_st *result)
-
-  uint64_t memcached_result_cas (const memcached_result_st *result);
-
-  memcached_return_t
-    memcached_result_set_value (memcached_result_st *ptr,
-                                const char *value, size_t length)
-
-  void memcached_result_set_flags (memcached_result_st *ptr, uint32_t flags)
-
-  void memcached_result_set_expiration (memcached_result_st *ptr, time_t)
-
-=head1 DESCRIPTION
-
-libmemcached(3) can optionally return a memcached_result_st which acts as a
-result object. The result objects have added benefits over the character
-pointer returns in that they are forward compatible with new return items
-that future memcached servers may implement (the best current example of
-this is the CAS return item). The structures can also be reused which will
-save on calls to malloc(3). It is suggested that you use result objects over
-char * return functions.
-
-The structure of memcached_result_st has been encapsulated, you should not
-write code to directly access members of the structure.
-
-memcached_result_create() will either allocate memory for a
-memcached_result_st or will initialize a structure passed to it.
-
-memcached_result_free() will deallocate any memory attached to the
-structure. If the structure was also alloacted, it will deallocate it.
-
-memcached_result_key_value() returns the key value associated with the
-current result object.
-
-memcached_result_key_length() returns the key length associated with the
-current result object.
-
-memcached_result_value() returns the result value associated with the
-current result object.
-
-memcached_result_length() returns the result length associated with the
-current result object.
-
-memcached_result_flags() returns the flags associated with the
-current result object.
-
-memcached_result_cas() returns the cas associated with the
-current result object. This value will only be available if the server
-supports it.
-
-memcached_result_set_value() takes a byte array and a size and sets
-the result to this value. This function is used for trigger responses.
-
-void memcached_result_set_flags() takes a result structure and stores
-a new value for the flags field.
-
-void memcached_result_set_expiration(A) takes a result structure and stores
-a new value for the expiration field (this is only used by read through
-triggers).
-
-You may wish to avoid using memcached_result_create(3) with a
-stack based allocation. The most common issues related to ABI safety involve
-heap allocated structures.
-
-=head1 RETURN
-
-Varies, see particular functions. All structures must have
-memcached_result_free() called on them for cleanup purposes. Failure to
-do this will result in leaked memory.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,64 +0,0 @@
-=head1 NAME
-
-memcached_set_sasl_callbacks, memcached_get_sasl_callbacks,
-memcached_sasl_set_auth_data, memcached_destroy_sasl_auth_data - SASL support
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  void memcached_set_sasl_callbacks(memcached_st *ptr,
-                                    const sasl_callback_t *callbacks)
-
-  const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
-
-  memcached_return memcached_set_sasl_auth_data(memcached_st *ptr,
-                                                const char *username,
-                                                const char *password)
-  memcached_return memcached_destroy_sasl_auth_data(memcached_st *ptr)
-
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to plug in your own callbacks function used by
-libsasl to perform SASL authentication.
-
-Please note that SASL requires the memcached binary protocol, and you have
-to specify the callbacks before you connect to the server.
-
-memcached_set_sasl_auth_data() is a helper function for you defining
-the basic functionality for you, but it will store the username and password
-in memory. If you choose to use this method you have to call
-memcached_destroy_sasl_auth_data before calling memcached_free to avoid
-a memory leak. You should NOT call memcached_destroy_sasl_auth_data if you
-specify your own callback function with memcached_set_sasl_callbacks().
-
-You as a client user have to initialize libsasl by using sasl_client_init
-before enabling it in libmemcached, and you have to shut down libsasl by
-calling sasl_done() when you are done using SASL from libmemcached.
-
-
-=head1 RETURN
-
-memcached_get_sasl_callbacks() returns the callbacks currently used
-by this memcached handle.
-memcached_get_sasl_set_auth_data() returns MEMCACHED_SUCCESS upon success.
-
-=head1 HOME
-
-To find out more information please check:
-L<http://libmemcached.org/>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
@@ -1,84 +0,0 @@
-=head1 NAME
-
-memcached_server_list_free, memcached_server_list_append,
-memcached_server_list_count, memcached_servers_parse - Manage server list
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  const memcached_server_instance_st
-    memcached_server_list (memcached_st *ptr);
-
-  void memcached_server_list_free (memcached_server_list_st list);
-
-  memcached_server_list_st
-    memcached_server_list_append (memcached_server_list_st list, 
-                                  const char *hostname,
-                                  unsigned int port, 
-                                  memcached_return_t *error);
-
-  uint32_t memcached_server_list_count (memcached_server_list_st list);
-
-  memcached_server_list_st memcached_servers_parse (const char *server_strings);
-
-  const char *memcached_server_error (memcached_server_instance_st instance);
-
-  DEPRECATED
-  void memcached_server_error_reset (memcached_server_instance_st list);
-
-=head1 DESCRIPTION
-
-libmemcached(3) operates on a list of hosts which are stored in
-memcached_server_st structures. You should not modify these structures
-directly. Functions are provided to modify these structures (and more can be
-added, just ask!).
-
-memcached_server_list() is used to provide an array of all defined hosts.
-This was incorrectly documented as "requiring free()" up till version 0.39.
-
-memcached_server_list_free() deallocates all memory associated with the array
-of memcached_server_st that you passed to it. 
-
-memcached_server_list_append() adds a server to the end of a
-memcached_server_st array. On error null will be returned and the
-memcached_return_t pointer you passed into the function will be set with the
-appropriate error. If the value of port is zero, it is set to the default
-port of a memcached server.
-
-memcached_servers_parse() takes a string, the type that is used for the
-command line applications, and parse it to an array of memcached_server_st.
-The example is "localhost, foo:555, foo, bar". All hosts except foo:555 will
-be set to the default port, while that host will have a port of 555.
-
-memcached_server_error() can be used to look at the text of the last error 
-message sent by the server to to the client.
-
-Before version 0.39 theses functions used a memcache_server_st *. In 0.39
-memcached_server_st * was aliased to memcached_server_list_st. This was
-done for a style reason/to help clean up some concepts in the code. 
-
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,118 +0,0 @@
-=head1 NAME
-
-memcached_server_count, memcached_server_list, memcached_server_add, memcached_server_push, memcached_server_get_last_disconnect, memcached_server_cursor - Manage server list
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  uint32_t memcached_server_count (memcached_st *ptr);
-
-  memcached_return_t
-    memcached_server_add (memcached_st *ptr,
-                          const char *hostname,
-                          in_port_t port);
-
-  memcached_return_t
-    memcached_server_add_udp (memcached_st *ptr,
-			      const char *hostname,
-			      in_port_t port);
-
-  memcached_return_t
-    memcached_server_add_unix_socket (memcached_st *ptr,
-                                      const char *socket);
-
-  memcached_return_t
-    memcached_server_push (memcached_st *ptr,
-                           const memcached_server_st *list);
-
-  memcached_server_instance_st
-    memcached_server_by_key (const memcached_st *ptr,
-                             const char *key,
-			     size_t key_length,
-                             memcached_return_t *error);
-
-  memcached_server_instance_st
-    memcached_server_get_last_disconnect (const memcached_st *ptr)
-
-  memcached_return_t
-    memcached_server_cursor(const memcached_st *ptr,
-			    const memcached_server_fn *callback,
-			    void *context,
-			    uint32_t number_of_callbacks);
-
-
-=head1 DESCRIPTION
-
-libmemcached(3) performs operations on a list of hosts. The order of these
-hosts determine routing to keys. Functions are provided to add keys to
-memcached_st structures. To manipulate lists of servers see
-memcached_server_st(3).
-
-memcached_server_count() provides you a count of the current number of
-servers being used by a C<memcached_st> structure.
-
-memcached_server_add() pushes a single TCP server into the C<memcached_st>
-structure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with the
-C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set will result in a
-C<MEMCACHED_INVALID_HOST_PROTOCOL>.
-
-memcached_server_add_udp() pushes a single UDP server into the C<memcached_st>
-structure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked. Executing this function with out
-setting the C<MEMCACHED_BEHAVIOR_USE_UDP> behavior will result in a
-C<MEMCACHED_INVALID_HOST_PROTOCOL>.
-
-memcached_server_add_unix_socket() pushes a single UNIX socket into the
-C<memcached_st> structure. This UNIX socket will be placed at the end.
-Duplicate servers are allowed, so duplication is not checked. The length
-of the filename must be one character less then MEMCACHED_MAX_HOST_LENGTH.
-
-memcached_server_push() pushes an array of C<memcached_server_st> into
-the C<memcached_st> structure. These servers will be placed at the
-end. Duplicate servers are allowed, so duplication is not checked. A
-copy is made of structure so the list provided (and any operations on
-the list) are not saved.
-
-memcached_server_by_key() allows you to provide a key and retrieve the
-server which would be used for assignment. This structure is cloned
-from its original structure and must be freed. If NULL is returned you
-should consult *error. The returning structure should be freed with
-memcached_server_free().
-
-memcached_server_get_last_disconnect() returns a pointer to the last server
-for which there was a connection problem. It does not mean this particular
-server is currently dead but if the library is reporting a server is,
-the returned server is a very good candidate.
-
-memcached_server_cursor() takes a memcached_st and loops through the 
-list of hosts currently in the cursor calling the list of callback 
-functions provided. You can optionally pass in a value via 
-context which will be provided to each callback function. An error
-return from any callback will terminate the loop. memcached_server_cursor()
-is passed the original caller memcached_st in its current state. 
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,187 +0,0 @@
-=head1 NAME
-
-memcached_set, memcached_add, memcached_replace - Store value on server
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  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
-    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
-    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 
-    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 
-    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 
-    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 
-    memcached_set_by_key(memcached_st *ptr, 
-                         const char *master_key, size_t master_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 
-    memcached_add_by_key(memcached_st *ptr, 
-                         const char *master_key, size_t master_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 
-    memcached_replace_by_key(memcached_st *ptr, 
-                             const char *master_key, size_t master_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 
-    memcached_prepend_by_key(memcached_st *ptr, 
-                             const char *master_key, size_t master_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 
-    memcached_append_by_key(memcached_st *ptr, 
-                            const char *master_key, size_t master_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 
-    memcached_cas_by_key(memcached_st *ptr, 
-                         const char *master_key, size_t master_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);
-
-=head1 DESCRIPTION
-
-memcached_set(), memcached_add(), and memcached_replace() are all used to
-store information on the server. All methods take a key, and its length to
-store the object. Keys are currently limited to 250 characters by the
-memcached(1) server. You must also supply a value and a length. Optionally you
-may support an expiration time for the object and a 16 byte value (it is
-meant to be used as a bitmap).
-
-memcached_set() will write an object to the server. If an object already
-exists it will overwrite what is in the server. If the object does not exist
-it will be written. If you are using the non-blocking mode this function
-will always return true unless a network error occurs. 
-
-memcached_replace() replaces an object on the server. If the object is not
-found on the server an error occurs.
-
-memcached_add() adds an object to the server. If the object is found on the
-server an error occurs, otherwise the value is stored.
-
-memcached_prepend() places a segment of data before the last piece of data 
-stored. Currently expiration and key are not used in the server.
-
-memcached_append() places a segment of data at the end of the last piece of 
-data stored. Currently expiration and key are not used in the server.
-
-memcached_cas() overwrites data in the server as long as the "cas" value is 
-still the same in the server. You can get the cas value of a result by 
-calling memcached_result_cas() on a memcached_result_st(3) structure. At the point 
-that this note was written cas is still buggy in memached. Turning on support
-for it in libmemcached(3) is optional. Please see memcached_set() for 
-information on how to do this.
-
-memcached_set_by_key(), memcached_add_by_key(), memcached_replace_by_key(), 
-memcached_prepend_by_key(), memcached_append_by_key_by_key(), 
-memcached_cas_by_key() methods all behave in a similar method as the non key 
-methods. The difference is that they use their master_key parameter to map
-objects to particular servers.
-
-If you are looking for performance, memcached_set() with non-blocking IO is 
-the fastest way to store data on the server.
-
-All of the above functions are supported with the C<MEMCACHED_BEHAVIOR_USE_UDP>
-behavior enabled. But when using these operations with this behavior on, there 
-are limits to the size of the payload being sent to the server.  The reason for 
-these limits is that the Memcahed Server does not allow multi-datagram requests
-and the current server implementation sets a datagram size to 1400 bytes. Due 
-to protocol overhead, the actual limit of the user supplied data is less than 
-1400 bytes and depends on the protocol in use as well as the operation being 
-executed. When running with the binary protocol, C< MEMCACHED_BEHAVIOR_BINARY_PROTOCOL>, 
-the size of the key,value, flags and expiry combined may not exceed 1368 bytes. 
-When running with the ASCII protocol, the exact limit fluctuates depending on 
-which function is being executed and whether the function is a cas operation 
-or not. For non-cas ASCII set operations, there are at least 1335 bytes available 
-to split among the key, key_prefix, and value; for cas ASCII operations there are 
-at least 1318 bytes available to split among the key, key_prefix and value. If the
-total size of the command, including overhead, exceeds 1400 bytes, a C<MEMCACHED_WRITE_FAILURE>
-will be returned.
-
-
-=head1 RETURN
-
-All methods return a value of type C<memcached_return_t>.
-On success the value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-For memcached_replace() and memcached_add(), C<MEMCACHED_NOTSTORED> is a
-legitmate error in the case of a collision.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,96 +0,0 @@
-=head1 NAME
-
-memcached_stat, memcached_stat_servername, memcached_stat_get_value, memcached_stat_get_keys - Get memcached statistics
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_stat_st *memcached_stat (memcached_st *ptr,
-                                     char *args,
-                                     memcached_return_t *error);
-
-  memcached_return_t memcached_stat_servername (memcached_stat_st *stat,
-                                                char *args, 
-                                                const char *hostname,
-                                                unsigned int port);
-
-  char *
-    memcached_stat_get_value (memcached_st *ptr,
-                              memcached_stat_st *stat, 
-                              const char *key,
-                              memcached_return_t *error);
-
-  char ** 
-    memcached_stat_get_keys (memcached_st *ptr,
-                             memcached_stat_st *stat, 
-                             memcached_return_t *error);
-
-  memcached_return_t
-    memcached_stat_execute (memcached_st *memc,
-                            const char *args,
-                            memcached_stat_fn func,
-                            void *context);
-
-=head1 DESCRIPTION
-
-libmemcached(3) has the ability to query a memcached server (or collection
-of servers) for their current state. Queries to find state return a
-C<memcached_stat_st> structure. You are responsible for freeing this structure.
-While it is possible to access the structure directly it is not advisable.
-<memcached_stat_get_value() has been provided to query the structure.
-
-memcached_stat_execute() uses the servers found in C<memcached_stat_st> and 
-executes a "stat" command on each server. args is an optional argument that 
-can be passed in to modify the behavior of "stats". You will need to supply
-a callback function that will be supplied each pair of values returned by
-the memcached server.
-
-memcached_stat() fetches an array of C<memcached_stat_st> structures containing
-the state of all available memcached servers. The return value must be freed
-by the calling application. If called with the C<MEMCACHED_BEHAVIOR_USE_UDP>
-behavior set, a NULL value is returned and the error parameter is set to 
-C<MEMCACHED_NOT_SUPPORTED>.
-
-memcached_stat_servername() can be used standalone without a C<memcached_st> to
-obtain the state of a particular server.  "args" is used to define a
-particular state object (a list of these are not provided for by either
-the memcached_stat_get_keys() call nor are they defined in the memcached
-protocol). You must specify the hostname and port of the server you want to
-obtain information on.
-
-memcached_stat_get_value() returns the value of a particular state key. You
-specify the key you wish to obtain.  The key must be null terminated.
-
-memcached_stat_get_keys() returns a list of keys that the server has state
-objects on. You are responsible for freeing this list.
-
-A command line tool, memstat(1), is provided so that you do not have to write
-an application to do this.
-
-=head1 RETURN
-
-Varies, see particular functions.
-
-Any method returning a C<memcached_stat_st> expects you to free the
-memory allocated for it.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,47 +0,0 @@
-=head1 NAME
-
-memcached_strerror - Get error string
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  const char *
-    memcached_strerror (memcached_st *ptr,
-                        memcached_return_t rc);
-
-=head1 DESCRIPTION
-
-memcached_strerror() takes a C<memcached_return_t> value and returns a string
-describing the error.
-
-This string must not be modified by the application.
-
-C<memcached_return_t> values are returned from nearly all libmemcached(3) functions.
-
-C<memcached_return_t> values are of an enum type so that you can set up responses
-with switch/case and know that you are capturing all possible return values.
-
-=head1 RETURN
-
-memcached_strerror() returns a string describing a C<memcached_return_t> value.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,50 +0,0 @@
-=head1 NAME
-
-memcached_set_user_data, memcached_get_user_data - Manage user specific data
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  void *memcached_get_user_data (memcached_st *ptr);
-
-  void *memcached_set_user_data (memcached_st *ptr, void *data);
-
-=head1 DESCRIPTION
-
-libmemcached(3) allows you to store a pointer to a user specific data inside
-the memcached_st structure. 
-
-memcached_set_user_data() is used to set the user specific data in the
-memcached_st structure.
-
-memcached_get_user_data() is used to retrieve the user specific data in
-the memcached_st structure.
-
-=head1 RETURN
-
-memcached_set_user_data() returns the previous value of the user specific 
-data.
-
-memcached_get_user_data() returns the current value uf the user specific
-data.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,42 +0,0 @@
-=head1 NAME
-
-memcached_verbosity - Modifiy verbosity of servers
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  memcached_return_t 
-    memcached_verbosity (memcached_st *ptr,
-                         unsigned int verbosity);
-
-=head1 DESCRIPTION
-
-memcached_verbosity() modifies the "verbosity" of the
-memcached(1) servers referenced in the C<memcached_st> parameter.
-
-=head1 RETURN
-
-A value of type C<memcached_return_t> is returned
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,56 +0,0 @@
-=head1 NAME
-
-memcached_lib_version, memcached_version - Get library version
-
-=head1 LIBRARY
-
-C Client Library for memcached (libmemcached, -lmemcached)
-
-=head1 SYNOPSIS
-
-  #include <memcached.h>
-
-  const char *
-    memcached_lib_version (void) 
-
-
-  memcached_return_t
-    memcached_version (memcached_st *ptr)
-
-
-=head1 DESCRIPTION
-
-memcached_lib_version() is used to return a simple version string representing
-the libmemcached version (version of the client library, not server)
-
-
-memcached_version() is used to set the major, minor, and micro versions of each
-memcached server being used by the memcached_st connection structure. It returns the 
-memcached server return code. 
-
-=head1 RETURN
-
-A string with the version of libmemcached driver is returned from
-memcached_lib_version()
-
-A value of type C<memcached_return_t> is returned from memcached_version()
-On success that value will be C<MEMCACHED_SUCCESS>. If called with the
-C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set, the value C<MEMCACHED_NOT_SUPPORTED> 
-will be returned. Use memcached_strerror() to translate this value to 
-a printable string.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3) memcached_strerror(3)
-
-=cut
-
@@ -1,61 +0,0 @@
-=head1 NAME
-
-memcapable - Check memcached server capabilities
-
-=head1 SYNOPSIS
-
-  memcat [-h hostname] [-p port] [-c] [-v] [-t n]
-
-=head1 DESCRIPTION
-
-B<memcapable> connects to the specified memcached server and tries to
-determine its capabilities by running the various commands and verifying
-the response.
-
-=head1 OPTIONS
-
-The following options are supported:
-
-=over 3
-
-=item -h hostname
-
-Specify the hostname to connect to. The default is I<localhost>
-
-=item -p port
-
-Specify the port number to connect to. The default is I<11211>
-
-=item -c
-
-Generate a coredump when it detects an error from the server.
-
-=item -v
-
-Print out the comparison when it detects an error from the server.
-
-=item -t n
-
-Set the timeout from an IO operation to/from the server to I<n> seconds.
-
-=back
-
-=head1 LIMITATIONS
-
-The current version of memcapable will only verify the binary protocol.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Trond Norbye, E<lt>trond.norbye@gmail.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,37 +0,0 @@
-=head1 NAME
-
-memcat - Copy a set of keys to stdout
-
-=head1 SYNOPSIS
-
-  memcat [options] key key ...
-
-=head1 DESCRIPTION
-
-B<memcat> outputs to stdout the value a single or multiple set of keys
-stored in a memcached(1) server. If any key is not found an error is returned.
-
-It is similar to the standard UNIX cat(1) utility. 
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,40 +0,0 @@
-=head1 NAME
-
-memcp - Copies files to a collection of memcached servers
-
-=head1 SYNOPSIS
-
-  memcp [options] file file <servers>
-
-=head1 DESCRIPTION
-
-B<memcp> copies one or more files into memcached(1) servers.
-It is similar to the standard UNIX cp(1) command.
-
-The key names will be the names of the files,
-without any directory path part.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>. If you specify neither of
-these, the final value in the command line list is the name of a
-server(s).
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,31 +0,0 @@
-=head1 NAME
-
-memdump - Dump a list of keys from a server.
-
-=head1 SYNOPSIS
-
-  memdump [options]
-
-=head1 DESCRIPTION
-
-B<memdump> currently dumps a list of "keys" from all servers that 
-it is told to fetch from. Because memcached does not guarentee to
-provide all keys it is not possible to get a complete "dump".
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,30 +0,0 @@
-=head1 NAME
-
-memerror - Translate a memcached error code to a string
-
-=head1 SYNOPSIS
-
-  memerror [options] error_code
-
-=head1 DESCRIPTION
-
-B<memerror> translate an error code from libmemcached(3) to  a human
-readable string.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more infoerroration please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,35 +0,0 @@
-=head1 NAME
-
-memflush - Reset a server or list of servers
-
-=head1 SYNOPSIS
-
-  memflush [options]
-
-=head1 DESCRIPTION
-
-B<memflush> resets the contents of memcached(1) servers.
-This means all data in these servers will be deleted.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,34 +0,0 @@
-=head1 NAME
-
-memrm - Remove a key(s) from a collection of memcached servers
-
-=head1 SYNOPSIS
-
-  memrm [options] key key ...
-
-=head1 DESCRIPTION
-
-B<memrm> removes items, specified by key, from memcached(1) servers. 
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<https://launchpad.net/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,1007 +0,0 @@
-=head1 NAME
-
-memslap - Load testing and benchmarking tool for memcached
-
-=head1 SYNOPSIS
-
-  memslap [options]
-
-=head1 DESCRIPTION
-
-B<memslap> is a load generation and benchmark tool for memcached(1)
-servers. It generates configurable workload such as threads, concurrencies, connections,
-run time, overwrite, miss rate, key size, value size, get/set proportion,
-expected throughput, and so on. Furthermore, it also supports data
-verification, expire-time verification, UDP, binary protocol, facebook test,
-replication test, multi-get and reconnection, etc.
-
-Memslap manages network connections like memcached with
-libevent. Each thread of memslap is bound with a CPU core, all
-the threads don't communicate with each other, and there are several socket
-connections in each thread. Each connection keeps key size distribution,
-value size distribution, and command distribution by itself.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>.
-
-
-=head1 FEATURES
-
-Memslap is developed to for the following purposes:
-
-=over
-
-=item Manages network connections with libevent asynchronously.
-
-=item Set both TCP and UDP up to use non-blocking IO.
-
-=item Improves parallelism: higher performance in multi-threads environments.
-
-=item Improves time efficiency: faster processing speed.
-
-=item Generates key and value more efficiently; key size distribution and value size distribution are configurable.
-
-=item Supports get, multi-get, and set commands; command distribution is configurable.
-
-=item Supports controllable miss rate and overwrite rate.
-
-=item Supports data and expire-time verification.
-
-=item Supports dumping statistic information periodically. 
-
-=item Supports thousands of TCP connections.
-
-=item Supports binary protocol.
-
-=item Supports facebook test (set with TCP and multi-get with UDP) and replication test.
-
-=back
-
-=head1 DETAILS
-
-=head2 Effective implementation of network.
-
-For memslap, both TCP and UDP use non-blocking network IO. All
-the network events are managed by libevent as memcached. The network module
-of memslap is similar to memcached. Libevent can ensure
-memslap can handle network very efficiently.
-
-=head2 Effective implementation of multi-threads and concurrency
-
-Memslap has the similar implementation of multi-threads to
-memcached. Memslap creates one or more self-governed threads;
-each thread is bound with one CPU core if the system supports setting CPU
-core affinity. 
-
-In addition, each thread has a libevent to manage the events of the network;
-each thread has one or more self-governed concurrencies; and 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.
-
-Memslap can create thousands of socket connections, and each
-concurrency has tens of socket connections. Each concurrency randomly or
-sequentially selects one socket connection from its socket connection pool
-to run, so memslap can ensure each concurrency handles one
-socket connection at any given time. Users can specify the number of
-concurrency and socket connections of each concurrency according to their
-expected workload. 
-
-=head2 Effective implementation of generating key and value
-
-In order to improve time efficiency and space efficiency, 
-memslap creates a random characters table with 10M characters. All the
-suffixes of keys and values are generated from this random characters table.
-
-Memslap uses the offset in the character table and the length
-of the string to identify a string. It can save much memory.
-Each key contains two parts, a prefix and a suffix. The prefix is an
-uint64_t, 8 bytes. In order to verify the data set before, 
-memslap need to ensure each key is unique, so it uses the prefix to identify
-a key. The prefix cannot include illegal characters, such as ‘\r’, ‘\n’,
-‘\0’ and ‘ ‘. And memslap has an algorithm to ensure that. 
-
-Memslap doesn’t generate all the objects (key-value pairs) at
-the beginning. It only generates enough objects to fill the task window
-(default 10K objects) of each concurrency. Each object has the following
-basic information, key prefix, key suffix offset in the character table, key
-length, value offset in the character table, and value length.
-
-In the work process, each concurrency sequentially or randomly selects an
-object from the window to do set operation or get operation. At the same
-time, each concurrency kicks objects out of its window and adds new object
-into it. 
-
-=head2 Simple but useful task scheduling
-
-Memslap uses libevent to schedule all the concurrencies of
-threads, and each concurrency schedules tasks based on the local task
-window. Memslap assumes that if each concurrency keeps the same
-key distribution, value distribution and commands distribution, from
-outside, memslap keeps all the distribution as a whole. 
-Each task window includes a lot of objects, each object stores its basic
-information, such as key, value, expire time, and so on. At any time, all
-the objects in the window keep the same and fixed key and value
-distribution. If an object is overwritten, the value of the object will be
-updated. Memslap verifies the data or expire-time according to
-the object information stored in the task window.
-
-Libevent selects which concurrency to handle based on a specific network
-event. Then the concurrency selects which command (get or set) to operate
-based on the command distribution. If it needs to kick out an old object and
-add a new object, in order to keep the same key and value distribution, the
-new object must have the same key length and value length. 
-
-If memcached server has two cache layers (memory and SSD), running
-memslap with different window sizes can get different cache
-miss rates. If memslap adds enough objects into the windows at
-the beginning, and the cache of memcached cannot store all the objects
-initialized, then memslap will get some objects from the second
-cache layer. It causes the first cache layer to miss. So the user can
-specify the window size to get the expected miss rate of the first cache
-layer. 
-
-=head2 Useful implementation of multi-servers , UDP, TCP, multi-get and binary protocol
-
-Because each thread is self-governed, memslap can assign
-different threads to handle different memcached servers. This is just one of
-the ways in which memslap supports multiple servers. The only
-limitation is that the number of servers cannot be greater than the number
-of threads. The other way to support multiple servers is for replication
-test. Each concurrency has one socket connection to each memcached server.
-For the implementation, memslap can set some objects to one
-memcached server, and get these objects from the other servers.
-
-By default, Memslap does single get. If the user specifies
-multi-get option, memslap will collect enough get commands and
-pack and send the commands together. 
-
-Memslap supports both the ASCII protocol and binary protocol,
-but it runs on the ASCII protocol by default. 
-Memslap by default runs on the TCP protocol, but it also
-supports UDP. Because UDP is unreliable, dropped packages and out-of-order
-packages may occur. Memslap creates a memory buffer to handle
-these problems. Memslap tries to read all the response data of
-one command from the server and reorders the response data. If some packages
-get lost, the waiting timeout mechanism can ensure half-baked packages will
-be discarded and the next command will be sent.
-
-
-=head1 USAGE
-
-Below are some usage samples:
-
-=over 4
-
-=item memslap -s 127.0.0.1:11211 -S 5s
-
-=item memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
-
-=item memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
-
-=item memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
-
-=item memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
-
-=item memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
-
-=item memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
-
-=back
-
-The user must specify one server at least to run memslap. The
-rest of the parameters have default values, as shown below:
-
-Thread number = 1                    Concurrency = 16
-
-Run time = 600 seconds                Configuration file = NULL
-
-Key size = 64                         Value size = 1024
-
-Get/set = 9:1                         Window size = 10k
-
-Execute number = 0                   Single get = true
-
-Multi-get = false                      Number of sockets of each concurrency = 1
-
-Reconnect = false                     Data verification = false
-
-Expire-time verification = false           ASCII protocol = true
-
-Binary protocol = false                 Dumping statistic information
-
-periodically = false
-
-Overwrite proportion = 0%             UDP = false
-
-TCP = true                           Limit throughput = false
-
-Facebook test = false                  Replication test = false
-
-=head2 Key size, value size and command distribution.
-
-All the distributions are read from the configuration file specified by user
-with “—cfg_cmd” option. If the user does not specify a configuration file,
-memslap will run with the default distribution (key size = 64,
-value size = 1024, get/set = 9:1). For information on how to edit the
-configuration file, refer to the “Configuration File” section.
-
-The minimum key size is 16 bytes; the maximum key size is 250 bytes. The
-precision of proportion is 0.001. The proportion of distribution will be
-rounded to 3 decimal places.
-
-The minimum value size is 1 bytes; the maximum value size is 1M bytes. The
-precision of proportion is 0.001. The proportion of distribution will be
-rounded to 3 decimal places.
-Currently, memslap only supports set and get commands. And it
-supports 100% set and 100% get. For 100% get, it will preset some objects to
-the server.
-
-=head2 Multi-thread and concurrency
-
-The high performance of memslap benefits from the special
-schedule of thread and concurrency. It’s important to specify the proper
-number of them. The default number of threads is 1; the default number of
-concurrency is 16. The user can use “—threads” and “--concurrency” to
-specify these variables.
-
-If the system supports setting CPU affinity and the number of threads
-specified by the user is greater than 1, memslap will try to
-bind each thread to a different CPU core. So if you want to get the best
-performance memslap, it is better to specify the number of
-thread equal to the number of CPU cores. The number of threads specified by
-the user can also be less or greater than the number of CPU cores. Because
-of the limitation of implementation, the number of concurrencies could be
-the multiple of the number of threads.
-
-1. For 8 CPU cores system
-
-For example:
-
---threads=2 --concurrency=128
-
---threads=8 --concurrency=128
-
---threads=8 --concurrency=256
-
---threads=12 --concurrency=144
-
-2. For 16 CPU cores system
-
-For example:
-
---threads=8 --concurrency=128
-
---threads=16 --concurrency=256
-
---threads=16 --concurrency=512
-
---threads=24 --concurrency=288
-
-The memslap performs very well, when
-used to test the performance of memcached servers.
-Most of the time, the bottleneck is the network or
-the server. If for some reason the user wants to
-limit the performance of memslap, there
-are two ways to do this:
-
-Decrease the number of threads and concurrencies.
-Use the option “--tps” that memslap
-provides to limit the throughput. This option allows
-the user to get the expected throughput. For
-example, assume that the maximum throughput is 50
-kops/s for a specific configuration, you can specify
-the throughput equal to or less than the maximum
-throughput using “--tps” option.
-
-=head2 Window size
-
-Most of the time, the user does not need to specify the window size. The
-default window size is 10k. For Schooner Memcached, the user can specify
-different window sizes to get different cache miss rates based on the test
-case. Memslap supports cache miss rate between 0% and 100%.
-If you use this utility to test the performance of Schooner Memcached, you
-can specify a proper window size to get the expected cache miss rate. The
-formula for calculating window size is as follows:
-
-Assume that the key size is 128 bytes, and the value size is 2048 bytes, and
-concurrency=128.
-
-1. Small cache cache_size=1M, 100% cache miss (all data get from SSD).
-win_size=10k
-
-2. cache_size=4G
-
-(1). cache miss rate 0%
-
-win_size=8k
-
-(2). cache miss rate 5%
-
-win_size=11k
-
-3. cache_size=16G
-
-(1). cache miss rate 0%
-
-win_size=32k
-
-(2). cache miss
-
-rate 5%
-
-win_size=46k
-
-The formula for calculating window size for cache miss rate 0%: 
-
-cache_size / concurrency / (key_size + value_size) * 0.5
-
-The formula for calculating window size for cache miss rate 5%: 
-
-cache_size / concurrency / (key_size + value_size) * 0.7
-
-=head2 Verification
-
-Memslap supports both data verification and expire-time
-verification. The user can use "--verify=" or "-v" to specify the proportion
-of data verification. In theory, it supports 100% data verification. The
-user can use "--exp_verify=" or "-e" to specify the proportion of
-expire-time verification. In theory, it supports 100% expire-time
-verification. Specify the "--verbose" options to get more detailed error
-information.
-
-For example: --exp_verify=0.01 –verify=0.1 , it means that 1% of the objects 
-set with expire-time, 10% of the objects gotten will be verified. If the
-objects are gotten, memslap will verify the expire-time and
-value. 
-
-=head2 multi-servers and multi-clients
-
-Memslap supports multi-servers based on self-governed thread.
-There is a limitation that the number of servers cannot be greater than the
-number of threads. Memslap assigns one thread to handle one
-server at least. The user can use the "--servers=" or "-s" option to specify
-multi-servers. 
-
-For example:
-
---servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 --threads=6 --concurrency=36
-
-The above command means that there are 6 threads, with each thread having 6
-concurrencies and that threads 0 and 3 handle server 0 (10.1.1.1); threads 1
-and 4 handle server 1 (10.1.1.2); and thread 2 and 5 handle server 2
-(10.1.1.3).  
-
-All the threads and concurrencies in memslap are self-governed.
-
-So is memslap. The user can start up several 
-memslap instances. The user can run memslap on different client
-machines to communicate with the same memcached server at the same. It is
-recommended that the user start different memslap on different
-machines using the same configuration. 
-
-=head2 Run with execute number mode or time mode
-
-The default memslap runs with time mode. The default run time
-is 10 minutes. If it times out, memslap will exit. Do not
-specify both execute number mode and time mode at the same time; just
-specify one instead. 
-
-For example:
-
---time=30s (It means the test will run 30 seconds.)
-
---execute_number=100000 (It means that after running 100000 commands, the test will exit.)
-
-=head2 Dump statistic information periodically.
-
-The user can use "--stat_freq=" or "-S" to specify the frequency.
-
-For example:
-
---stat_freq=20s
-
-Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
-seconds. 
-
-For more information on the format of dumping statistic information, refer to “Format of Output” section.
-
-=head2 Multi-get
-
-The user can use "--division=" or "-d" to specify multi-get keys count.
-Memslap by default does single get with TCP. Memslap also supports data 
-verification and expire-time verification for multi-get. 
-
-Memslap supports multi-get with both TCP and UDP. Because of
-the different implementation of the ASCII protocol and binary protocol,
-there are some differences between the two. For the ASCII protocol,
-memslap sends one “multi-get” to the server once. For the
-binary protocol, memslap sends several single get commands
-together as “multi-get” to the server.
-
-=head2 UDP and TCP
-
-Memslap supports both UDP and TCP. For TCP,
-memslap does not reconnect the memcached server if socket connections are
-lost. If all the socket connections are lost or memcached server crashes,
-memslap will exit. If the user specifies the “--reconnect”
-option when socket connections are lost, it will reconnect them. 
-
-User can use “--udp” to enable the UDP feature, but UDP comes with some
-limitations: 
-
-UDP cannot set data more than 1400 bytes. 
-
-UDP is not supported by the binary protocol because the binary protocol of
-memcached does not support that.
-
-UDP doesn’t support reconnection.
-
-=head2 Facebook test
-
-Set data with TCP and multi-get with UDP. Specify the following options: 
-
-"--facebook --division=50"
-
-If you want to create thousands of TCP connections, specify the
-
-"--conn_sock=" option. 
-
-For example: --facebook --division=50 --conn_sock=200
-
-The above command means that memslap will do facebook test,
-each concurrency has 200 socket TCP connections and one UDP socket.
-
-Memslap sets objects with the TCP socket, and multi-gets 50
-objects once with the UDP socket.
-
-If you specify "--division=50", the key size must be less that 25 bytes
-because the UDP packet size is 1400 bytes.
-
-=head2 Replication test
-
-For replication test, the user must specify at least two memcached servers.
-The user can use “—rep_write=” option to enable feature. 
-
-For example:
-
---servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
-
-The above command means that there are 2 replication memcached servers,
-memslap will set objects to both server 0 and server 1, get
-objects which are set to server 0 before from server 1, and also get objects
-which are set to server 1 before from server 0. If server 0 crashes,
-memslap will only get objects from server 1. If server 0 comes
-back to life again, memslap will reconnect server 0. If both
-server 0 and server 1 crash, memslap will exit.
-
-=head2  Supports thousands of TCP connections
-
-Start memslap with "--conn_sock=" or "-n" to enable this
-feature. Make sure that your system can support opening thousands of files
-and creating thousands of sockets. However, this feature does not support
-reconnection if sockets disconnect. 
-
-For example: 
-
---threads=8 --concurrency=128 --conn_sock=128
-
-The above command means that memslap starts up 8 threads, each
-thread has 16 concurrencies, each concurrency has 128 TCP socket
-connections, and the total number of TCP socket connections is 128 * 128 =
-16384.
-
-=head2 Supports binary protocol
-
-Start memslap with "--binary" or "-B" options to enable this
-feature. It supports all the above features except UDP, because the latest
-memcached 1.3.3 does not implement binary UDP protocol.
-
-For example:
-
---binary
-
-Since memcached 1.3.3 doesn't implement binary UDP protocol,
-memslap does not support UDP. In addition, memcached 1.3.3 does not support
-multi-get. If you specify "--division=50" option, it just sends 50 get
-commands together as “mulit-get” to the server.
-
-=head1 Configuration file
-
-This section describes the format of the configuration file.  By default
-when no configuration file is specified memslap reads the default
-one located at ~/.memslap.cnf.
-
-Below is a sample configuration file:
-
- ***************************************************************************
- #comments should start with '#'
- #key 
- #start_len end_len proportion
- #
- #key length range from start_len to end_len
- #start_len must be equal to or greater than 16
- #end_len must be equal to or less than 250
- #start_len must be equal to or greater than end_len
- #memslap will generate keys according to the key range
- #proportion: indicates keys generated from one range accounts for the total
- generated keys  
- #
- #example1: key range 16~100 accounts for 80%
- #          key range 101~200 accounts for 10%
- #          key range 201~250 accounts for 10%
- #          total should be 1 (0.8+0.1+0.1 = 1)
- #
- #          16 100 0.8  
- #          101 200 0.1
- #          201 249 0.1
- #
- #example2: all keys length are 128 bytes
- #
- #          128 128 1 
- key
- 128 128 1  
- #value 
- #start_len end_len proportion
- #
- #value length range from start_len to end_len
- #start_len must be equal to or greater than 1
- #end_len must be equal to or less than 1M
- #start_len must be equal to or greater than end_len
- #memslap will generate values according to the value range
- #proportion: indicates values generated from one range accounts for the
- total generated values  
- #
- #example1: value range 1~1000 accounts for 80%
- #          value range 1001~10000 accounts for 10%
- #          value range 10001~100000 accounts for 10%
- #          total should be 1 (0.8+0.1+0.1 = 1)
- #
- #          1 1000 0.8  
- #          1001 10000 0.1
- #          10001 100000 0.1
- #
- #example2: all value length are 128 bytes
- #
- #          128 128 1 
- value
- 2048 2048 1
- #cmd
- #cmd_type cmd_proportion
- #
- #currently memslap only supports get and set command.
- #
- #cmd_type
- #set     0
- #get     1
- #
- #example: set command accounts for 50%
- #         get command accounts for 50%
- #         total should be 1 (0.5+0.5 = 1)
- #
- #         cmd
- #         0    0.5
- #         1    0.5
- cmd
- 0    0.1
- 1.0 0.9
-
-
-
-=head1 Format of output
-
-At the beginning, memslap displays some configuration information as follows:
-
-=over 4
-
-=item servers : 127.0.0.1:11211
-
-=item threads count: 1
-
-=item concurrency: 16
-
-=item run time: 20s
-
-=item windows size: 10k
-
-=item set proportion: set_prop=0.10
-
-=item get proportion: get_prop=0.90
-
-=back
-
-=head2 Where
-
-=over 4
-
-=item servers : "servers"
-
-The servers used by memslap.
-
-=item threads count
-
-The number of threads memslap runs with.
-
-=item concurrency
-
-The number of concurrencies memslap runs with.
-
-=item run time
-
-How long to run memslap.
-
-=item windows size
-
-The task window size of each concurrency.
-
-=item set proportion
-
-The proportion of set command.
-
-=item get proportion
-
-The proportion of get command.
-
-=back
-
-The output of dynamic statistics is something like this:
-
- ---------------------------------------------------------------------------------------------------------------------------------
- Get Statistics
- Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
- Avg(us)  Std_dev    Geo_dist  
- Period   5   345826  69165     65.3      0         27      2198     203
- 95.43      177.29
- Global  20  1257935  62896     71.8      0         26      3791     224
- 117.79     192.60
- 
-  
- Set Statistics
- Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
- Avg(us)  Std_dev    Geo_dist  
- Period   5    38425   7685      7.3       0         42      628     240
- 88.05      220.21
- Global   20   139780  6989      8.0       0         37      3790    253
- 117.93     224.83
- 
-  
- Total Statistics
- Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
- Avg(us)  Std_dev    Geo_dist 
- Period   5   384252   76850     72.5      0        27      2198     207
- 94.72      181.18
- Global  20  1397720   69886     79.7      0        26      3791     227
- 117.93     195.60
- ---------------------------------------------------------------------------------------------------------------------------------
-
-=head2 Where
-
-=over 4
-
-=item Get Statistics
-
-Statistics information of get command
-
-=item Set Statistics
-
-Statistics information of set command
-
-=item Total Statistics
-
-Statistics information of both get and set command
-
-=item Period
-
-Result within a period
-
-=item Global
-
-Accumulated results
-
-=item Ops
-
-Total operations
-
-=item TPS
-
-Throughput, operations/second
-
-=item Net
-
-The rate of network
-
-=item Get_miss
-
-How many objects can’t be gotten
-
-=item Min
-
-The minimum response time
-
-=item Max
-
-The maximum response time
-
-=item Avg: 
-
-The average response time
-
-=item Std_dev
-
-Standard deviation of response time
-
-=item Geo_dist
-
-Geometric distribution based on natural exponential function
-
-=back
-
-At the end, memslap will output something like this:
-
-  ---------------------------------------------------------------------------------------------------------------------------------
-  Get Statistics (1257956 events)
-    Min:        26
-    Max:      3791
-    Avg:       224
-    Geo:    192.60
-    Std:    116.23
-                    Log2 Dist:
-                      4:        0       10    84490   215345
-                      8:   484890   459823    12543      824
-                     12:       31
-
-   Set Statistics (139782 events)
-      Min:        37
-      Max:      3790
-      Avg:       253
-      Geo:    224.84
-      Std:    116.83
-      Log2 Dist: 
-        4:        0        0     4200 16988
-        8:    50784    65574 2064      167
-        12:        5
-   
-    Total Statistics (1397738 events)
-        Min:        26
-        Max:      3791
-        Avg:       227
-        Geo:    195.60
-        Std:    116.60
-        Log2 Dist:
-          4:        0       10    88690   232333
-          8:   535674   525397    14607      991
-          12:       36
-
-  cmd_get: 1257969
-  cmd_set: 139785
-  get_misses: 0
-  verify_misses: 0
-  verify_failed: 0
-  expired_get: 0
-  unexpired_unget: 0
-  written_bytes: 242516030
-  read_bytes: 1003702556
-  object_bytes: 152086080
-  packet_disorder: 0
-  packet_drop: 0
-  udp_timeout: 0
-
-  Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
-  ---------------------------------------------------------------------------------------------------------------------------------
-
-=head2 Where
-
-=over 4
-
-=item Get Statistics
-
-Get statistics of response time
-
-=item Set Statistics
-
-Set statistics of response time
-
-=item Total Statistics
-
-Both get and set statistics of response time
-
-=item Min
-
-The accumulated and minimum response time
-
-=item Max
-
-The accumulated and maximum response time
-
-=item Avg
-
-The accumulated and average response time
-
-=item Std
-
-Standard deviation of response time
-
-=item Log2 Dist
-
-Geometric distribution based on logarithm 2
-
-=item cmd_get
-
-Total get commands done
-
-=item cmd_set
-
-Total set commands done
-
-=item get_misses
-
-How many objects can’t be gotten from server
-
-=item verify_misses
-
-How many objects need to verify but can’t get them
-
-=item verify_failed
-
-How many objects with insistent value
-
-=item expired_get
-
-How many objects are expired but we get them
-
-=item unexpired_unget
-
-How many objects are unexpired but we can’t get them
-
-=item written_bytes
-
-Total written bytes
-
-=item read_bytes
-
-Total read bytes
-
-=item object_bytes
-
-Total object bytes
-
-=item packet_disorder
-
-How many UDP packages are disorder
-
-=item packet_drop
-
-How many UDP packages are lost
-
-=item udp_timeout
-
-How many times UDP time out happen
-
-=item Run time
-
-Total run time
-
-=item Ops
-
-Total operations 
-
-=item TPS
-
-Throughput, operations/second
-
-=item Net_rate
-
-The average rate of network
-
-=back
-
-=head1 OPTIONS
-
--s, --servers=
-    List one or more servers to connect. Servers count must be less than
-    threads count. e.g.: --servers=localhost:1234,localhost:11211
-
--T, --threads=
-    Number of threads to startup, better equal to CPU numbers. Default 8.
-
--c, --concurrency=
-    Number of concurrency to simulate with load. Default 128.
-
--n, --conn_sock=
-    Number of TCP socks per concurrency. Default 1.
-
--x, --execute_number=
-    Number of operations(get and set) to execute for the
-    given test. Default 1000000.
-
--t, --time=
-    How long the test to run, suffix: s-seconds, m-minutes, h-hours,
-    d-days e.g.: --time=2h.
-
--F, --cfg_cmd=
-    Load the configure file to get command,key and value distribution list.
-
--w, --win_size=
-    Task window size of each concurrency, suffix: K, M e.g.: --win_size=10k.
-    Default 10k.
-
--X, --fixed_size=
-    Fixed length of value.
-
--v, --verify=
-    The proportion of date verification, e.g.: --verify=0.01
-
--d, --division=
-    Number of keys to multi-get once. Default 1, means single get.
-
--S, --stat_freq=
-    Frequency of dumping statistic information. suffix: s-seconds,
-    m-minutes, e.g.: --resp_freq=10s.
-
--e, --exp_verify=
-    The proportion of objects with expire time, e.g.: --exp_verify=0.01.
-    Default no object with expire time
-
--o, --overwrite=
-    The proportion of objects need overwrite, e.g.: --overwrite=0.01.
-    Default never overwrite object.
-
--R, --reconnect 
-    Reconnect support, when connection is closed it will be reconnected.
-
--U, --udp 
-    UDP support, default memslap uses TCP, TCP port and UDP port of
-    server must be same.
-
--a, --facebook 
-    Whether it enables facebook test feature, set with TCP and multi-get with UDP.
-
--B, --binary 
-    Whether it enables binary protocol. Default with ASCII protocol.
-
--P, --tps=
-    Expected throughput, suffix: K, e.g.: --tps=10k.
-
--p, --rep_write=
-    The first nth servers can write data, e.g.: --rep_write=2.
-
--b, --verbose 
-    Whether it outputs detailed information when verification fails.
-
--h, --help 
-    Display this message and then exit.
-
--V, --version 
-    Display the version of the application and then exit.
-
-=head1 EXAMPLES
-
-memslap -s 127.0.0.1:11211 -S 5s
-
-memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b
-
-memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2
-
-memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k
-
-memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40
-
-memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m
-
-memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2
-
-=head1 HOME
-
-To find out more information please check:
-L<http://launchpad.org/libmemcached>
-
-=head1 AUTHORS
-
-Mingqiang Zhuang E<lt>mingqiangzhuang@hengtiansoft.comE<gt> (Schooner Technolgy)
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -1,37 +0,0 @@
-=head1 NAME
-
-memstat - Display the operating status of a single or group of memcached servers
-
-=head1 SYNOPSIS
-
-  memstat [options]
-
-=head1 DESCRIPTION
-
-B<memstat> dumps the state of memcached(1) servers.
-It displays all data to stdout.
-
-You can specify servers via the B<--servers> option or via the
-environment variable C<MEMCACHED_SERVERS>. B<--args> can be used
-to specify the "argument" sent to the stats command (ie slab, size, items,
-etc..).
-
-For a full list of operations run the tool with the B<--help> option.
-
-=head1 HOME
-
-To find out more information please check:
-L<http://launchpad.org/libmemcached>
-
-=head1 AUTHOR
-
-Brian Aker, E<lt>brian@tangent.orgE<gt>
-
-Mark Atwood, E<lt>mark@fallenpegasus.comE<gt>
-
-=head1 SEE ALSO
-
-memcached(1) libmemcached(3)
-
-=cut
-
@@ -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 <mem_config.h>
+
+#include <sys/types.h>
+
+#include <example/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
+
+#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
@@ -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
@@ -3,25 +3,24 @@
 # All paths should be given relative to the root
 
 if HAVE_LIBEVENT
-noinst_PROGRAMS += example/memcached_light
+noinst_PROGRAMS+= example/memcached_light
 endif
 
-example_memcached_light_SOURCES= \
-				 example/interface_v0.c \
-				 example/interface_v1.c \
-				 example/memcached_light.c \
-				 example/memcached_light.h \
-				 example/storage.h
+noinst_HEADERS+= example/byteorder.h
+noinst_HEADERS+= example/memcached_light.h
+noinst_HEADERS+= example/storage.h
 
-example_memcached_light_LDADD= libmemcached/libmemcachedprotocol.la \
-                               $(LIBINNODB) $(LTLIBEVENT)
+example_memcached_light_SOURCES=
+example_memcached_light_LDADD= 
+example_memcached_light_LDFLAGS=
 
-if BUILD_BYTEORDER
-example_memcached_light_LDADD+= libmemcached/libbyteorder.la
-endif
+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
 
-if HAVE_LIBINNODB
-example_memcached_light_SOURCES+= example/storage_innodb.c
-else
-example_memcached_light_SOURCES+= example/storage.c
-endif
+example_memcached_light_LDADD+= libmemcached/libmemcachedprotocol.la
+example_memcached_light_LDADD+= @LIBEVENT_LIB@
@@ -1,588 +0,0 @@
-/* -*- 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 "config.h"
-#include <assert.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libmemcached/protocol_handler.h>
-#include <libmemcached/byteorder.h>
-#include "storage.h"
-#include "memcached_light.h"
-
-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= {
-    .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);
-}
-
-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= {
-    .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_EIO;
-}
-
-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 response;
-    char buffer[4096];
-  } msg= {
-    .response.message.header.response= {
-      .magic= PROTOCOL_BINARY_RES,
-      .opcode= opcode,
-      .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-      .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= 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, (void*)&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, (void*)&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= {
-    .message.header.response= {
-      .magic= PROTOCOL_BINARY_RES,
-      .opcode= header->request.opcode,
-      .opaque= header->request.opaque
-    }
-  };
-
-  if (!delete_item(key, keylen))
-  {
-    response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_ENOENT);
-    return response_handler(cookie, header, (void*)&response);
-  }
-  else if (header->request.opcode == PROTOCOL_BINARY_CMD_DELETE)
-  {
-    /* DELETEQ doesn't want success response */
-    response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS);
-    return response_handler(cookie, header, (void*)&response);
-  }
-
-  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= {
-      .message.header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= opcode,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-        .opaque= header->request.opaque
-      }
-    };
-    return response_handler(cookie, header, (void*)&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= (void*)header;
-  protocol_binary_response_incr response= {
-    .message.header.response= {
-      .magic= PROTOCOL_BINARY_RES,
-      .opcode= header->request.opcode,
-      .opaque= header->request.opaque,
-    },
-  };
-
-  uint16_t keylen= ntohs(header->request.keylen);
-  uint64_t initial= ntohll(req->message.body.initial);
-  uint64_t delta= 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= ntohll((*(uint64_t*)item->data));
-    response.message.header.response.cas= 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, (void*)&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 packet;
-    char buffer[256];
-  } response= {
-    .packet.response= {
-      .magic= PROTOCOL_BINARY_RES,
-      .opcode= PROTOCOL_BINARY_CMD_VERSION,
-      .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-      .opaque= header->request.opaque,
-      .bodylen= htonl((uint32_t)strlen(versionstring))
-    }
-  };
-
-  memcpy(response.buffer + sizeof(response.packet), versionstring, strlen(versionstring));
-
-  return response_handler(cookie, header, (void*)&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= 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= {
-        .message= {
-          .header.response= {
-            .magic= PROTOCOL_BINARY_RES,
-            .opcode= header->request.opcode,
-            .status= htons(rval),
-            .opaque= header->request.opaque,
-            .cas= htonll(cas),
-          }
-        }
-      };
-      return response_handler(cookie, header, (void*)&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= (void*)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= {
-    .message= {
-      .header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= header->request.opcode,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-        .opaque= header->request.opaque
-      }
-    }
-  };
-
-  if (header->request.cas != 0)
-  {
-    /* validate cas */
-    struct item* item= get_item(key, keylen);
-    if (item != NULL)
-    {
-      if (item->cas != ntohll(header->request.cas))
-      {
-        release_item(item);
-        response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS);
-        return response_handler(cookie, header, (void*)&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= htonll(item->cas);
-      release_item(item);
-      return response_handler(cookie, header, (void*)&response);
-    }
-    release_item(item);
-
-    return PROTOCOL_BINARY_RESPONSE_SUCCESS;
-  }
-
-  return response_handler(cookie, header, (void*)&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= (void*)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= {
-    .message= {
-      .header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= header->request.opcode,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-        .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= htonll(item->cas);
-        release_item(item);
-        return response_handler(cookie, header, (void*)&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, (void*)&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= (void*)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= {
-    .message= {
-      .header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= header->request.opcode,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-        .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 || 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= htonll(item->cas);
-        release_item(item);
-        return response_handler(cookie, header, (void*)&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, (void*)&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= {
-    .message= {
-      .header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= PROTOCOL_BINARY_CMD_STAT,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS),
-        .opaque= header->request.opaque
-      }
-    }
-  };
-
-  return response_handler(cookie, header, (void*)&response);
-}
-
-memcached_binary_protocol_callback_st interface_v0_impl= {
-  .interface_version= MEMCACHED_PROTOCOL_HANDLER_V0,
-#ifdef FUTURE
-  /*
-  ** There is a number of bugs in the extra options for gcc causing
-  ** warning on these struct initializers. It hurts my heart to remove
-  ** it so I'll just leave it in here so that we can enable it when
-  ** we can drop support for the broken compilers
-  */
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_GET]= get_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_SET]= set_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_ADD]= add_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_REPLACE]= replace_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_DELETE]= delete_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_INCREMENT]= arithmetic_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_DECREMENT]= arithmetic_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_QUIT]= quit_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_FLUSH]= flush_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_GETQ]= get_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_NOOP]= noop_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_VERSION]= version_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_GETK]= get_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_GETKQ]= get_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_APPEND]= concat_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_PREPEND]= concat_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_STAT]= stat_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_SETQ]= set_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_ADDQ]= add_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_REPLACEQ]= replace_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_DELETEQ]= delete_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_INCREMENTQ]= arithmetic_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_DECREMENTQ]= arithmetic_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_QUITQ]= quit_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_FLUSHQ]= flush_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_APPENDQ]= concat_command_handler,
-  .interface.v0.comcode[PROTOCOL_BINARY_CMD_PREPENDQ]= concat_command_handler,
-#endif
-};
-
-void initialize_interface_v0_handler(void)
-{
-  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;
-}
@@ -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 <cassert>
+#include <sys/types.h>
+#include <cstdio>
+#include <unistd.h>
+#include <fcntl.h>
+#include <cerrno>
+#include <cstdlib>
+#include <cstring>
+
+#include <libmemcachedprotocol-0.0/handler.h>
+#include <example/byteorder.h>
+#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;
+}
@@ -1,411 +0,0 @@
-/* -*- 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.c 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 "config.h"
-#include <assert.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libmemcached/protocol_handler.h>
-#include <libmemcached/byteorder.h>
-#include "storage.h"
-
-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) {
-  (void)cookie;
-  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) {
-
-  (void)cookie;
-  flush(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) {
-  (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) {
-  (void)cookie;
-  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) {
-  (void)key;
-  (void)keylen;
-  /* 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= {
-  .interface_version= MEMCACHED_PROTOCOL_HANDLER_V1,
-  .interface.v1= {
-    .add= add_handler,
-    .append= append_handler,
-    .decrement= decrement_handler,
-    .delete= delete_handler,
-    .flush= flush_handler,
-    .get= get_handler,
-    .increment= increment_handler,
-    .noop= noop_handler,
-    .prepend= prepend_handler,
-    .quit= quit_handler,
-    .replace= replace_handler,
-    .set= set_handler,
-    .stat= stat_handler,
-    .version= version_handler
-  }
-};
@@ -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 <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <libmemcachedprotocol-0.0/handler.h>
+#include <example/byteorder.h>
+#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;
+}
@@ -1,474 +0,0 @@
-/* -*- 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.c    - Shows an implementation of the memcached server by using
- *                       the "raw" access to the packets as they arrive
- *   interface_v1.c    - Shows an implementation of the memcached server by using
- *                       the more "logical" interface.
- *   memcached_light.c - 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 "config.h"
-#include <assert.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <event.h>
-
-#include <libmemcached/protocol_handler.h>
-#include <libmemcached/byteorder.h>
-#include "storage.h"
-#include "memcached_light.h"
-
-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 bool verbose= false;
-static struct event_base *event_base;
-
-struct options_st {
-  char *pid_file;
-  bool has_port;
-  in_port_t port;
-} global_options;
-
-typedef struct options_st options_st;
-
-/**
- * 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 which, void *arg)
-{
-  (void)which;
-  struct connection *client= arg;
-  struct memcached_protocol_client_st* c= client->userdata;
-  assert(c != NULL);
-
-  memcached_protocol_event_t events= memcached_protocol_client_work(c);
-  if (events & MEMCACHED_PROTOCOL_ERROR_EVENT)
-  {
-    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, (intptr_t)fd, flags, drive_client, client);
-    event_base_set(event_base, &client->event);
-
-    if (event_add(&client->event, 0) == -1)
-    {
-      (void)fprintf(stderr, "Failed to add event for %d\n", fd);
-      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 which, void *arg)
-{
-  (void)which;
-  struct connection *server= 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");
-    return ;
-  }
-
-#ifndef WIN32
-  if (sock >= maxconns)
-  {
-    (void)fprintf(stderr, "Client outside socket range (specified with -c)\n");
-    closesocket(sock);
-    return ;
-  }
-#endif
-
-  struct memcached_protocol_client_st* c;
-  c= memcached_protocol_create_client(server->userdata, sock);
-  if (c == NULL)
-  {
-    (void)fprintf(stderr, "Failed to create client\n");
-    closesocket(sock);
-  }
-  else
-  {
-    struct connection *client = &socket_userdata_map[sock];
-    client->userdata= c;
-
-    event_set(&client->event, (intptr_t)sock, EV_READ, drive_client, client);
-    event_base_set(event_base, &client->event);
-    if (event_add(&client->event, 0) == -1)
-    {
-      (void)fprintf(stderr, "Failed to add event for %d\n", sock);
-      memcached_protocol_client_destroy(c);
-      closesocket(sock);
-    }
-  }
-}
-
-/**
- * Create a socket and bind it to a specific port number
- * @param port the port number to bind to
- */
-static int server_socket(const char *port)
-{
-  struct addrinfo *ai;
-  struct addrinfo hints= { .ai_flags= AI_PASSIVE,
-                           .ai_family= AF_UNSPEC,
-                           .ai_socktype= SOCK_STREAM };
-
-  int error= getaddrinfo("127.0.0.1", port, &hints, &ai);
-  if (error != 0)
-  {
-    if (error != EAI_SYSTEM)
-      fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(error));
-    else
-      perror("getaddrinfo()");
-
-    return 1;
-  }
-
-  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)
-    {
-      perror("Failed to create socket");
-      continue;
-    }
-
-    int flags;
-#ifdef WIN32
-    u_long arg = 1;
-    if (ioctlsocket(sock, FIONBIO, &arg) == SOCKET_ERROR)
-    {
-      perror("Failed to set nonblocking io");
-      closesocket(sock);
-      continue;
-    }
-#else
-    flags= fcntl(sock, F_GETFL, 0);
-    if (flags == -1)
-    {
-      perror("Failed to get socket flags");
-      closesocket(sock);
-      continue;
-    }
-
-    if ((flags & O_NONBLOCK) != O_NONBLOCK)
-    {
-      if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1)
-      {
-        perror("Failed to set socket to nonblocking mode");
-        closesocket(sock);
-        continue;
-      }
-    }
-#endif
-
-    flags= 1;
-    if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags)) != 0)
-      perror("Failed to set SO_REUSEADDR");
-
-    if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags)) != 0)
-      perror("Failed to set SO_KEEPALIVE");
-
-    if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&ling, sizeof(ling)) != 0)
-      perror("Failed to set SO_LINGER");
-
-    if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *)&flags, sizeof(flags)) != 0)
-      perror("Failed to set TCP_NODELAY");
-
-    if (bind(sock, next->ai_addr, next->ai_addrlen) == SOCKET_ERROR)
-    {
-      if (get_socket_errno() != EADDRINUSE)
-      {
-        perror("bind()");
-        freeaddrinfo(ai);
-      }
-      closesocket(sock);
-      continue;
-    }
-
-    if (listen(sock, 1024) == SOCKET_ERROR)
-    {
-      perror("listen()");
-      closesocket(sock);
-      continue;
-    }
-
-    server_sockets[num_server_sockets++]= sock;
-  }
-
-  freeaddrinfo(ai);
-
-  return (num_server_sockets > 0) ? 0 : 1;
-}
-
-/**
- * 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 __attribute__((unused)),
-                        protocol_binary_request_header *header __attribute__((unused)))
-{
-  if (verbose)
-  {
-    const char *cmd= comcode2str(header->request.opcode);
-    if (cmd != NULL)
-      fprintf(stderr, "pre_execute from %p: %s\n", cookie, cmd);
-    else
-      fprintf(stderr, "pre_execute from %p: 0x%02x\n", cookie, header->request.opcode);
-  }
-}
-
-/**
- * Print out the command we just executed
- */
-static void post_execute(const void *cookie __attribute__((unused)),
-                         protocol_binary_request_header *header __attribute__((unused)))
-{
-  if (verbose)
-  {
-    const char *cmd= comcode2str(header->request.opcode);
-    if (cmd != NULL)
-      fprintf(stderr, "post_execute from %p: %s\n", cookie, cmd);
-    else
-      fprintf(stderr, "post_execute from %p: 0x%02x\n", cookie, header->request.opcode);
-  }
-}
-
-/**
- * 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= {
-    .message= {
-      .header.response= {
-        .magic= PROTOCOL_BINARY_RES,
-        .opcode= header->request.opcode,
-        .status= htons(PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND),
-        .opaque= header->request.opaque
-      }
-    }
-  };
-
-  return response_handler(cookie, header, (void*)&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 0 on success, 1 otherwise
- */
-int main(int argc, char **argv)
-{
-  int cmd;
-  memcached_binary_protocol_callback_st *interface= &interface_v0_impl;
-
-  memset(&global_options, 0, sizeof(global_options));
-
-  event_base= event_init();
-  if (event_base == NULL)
-  {
-    fprintf(stderr, "Failed to create an instance of libevent\n");
-    return 1;
-  }
-
-  /*
-   * 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();
-
-  while ((cmd= getopt(argc, argv, "v1p:P:?hc:")) != EOF)
-  {
-    switch (cmd) {
-    case '1':
-      interface= &interface_v1_impl;
-      break;
-    case 'P':
-      global_options.pid_file= strdup(optarg);
-      break;
-    case 'p':
-      global_options.has_port= true;
-      (void)server_socket(optarg);
-      break;
-    case 'v':
-      verbose= true;
-      break;
-    case 'c':
-      maxconns= atoi(optarg);
-      break;
-    case 'h':  /* FALLTHROUGH */
-    case '?':  /* FALLTHROUGH */
-    default:
-      (void)fprintf(stderr, "Usage: %s [-p port] [-v] [-1] [-c #clients] [-P pidfile]\n",
-                    argv[0]);
-      return 1;
-    }
-  }
-
-  if (! initialize_storage())
-  {
-    /* Error message already printed */
-    return 1;
-  }
-
-  if (! global_options.has_port)
-    (void)server_socket("9999");
-
-  if (global_options.pid_file)
-  {
-    FILE *pid_file;
-    uint32_t pid;
-
-    pid_file= fopen(global_options.pid_file, "w+");
-
-    if (pid_file == NULL)
-    {
-      perror(strerror(get_socket_errno()));
-      abort();
-    }
-
-    pid= (uint32_t)getpid();
-    fprintf(pid_file, "%u\n", pid);
-    fclose(pid_file);
-  }
-
-  if (num_server_sockets == 0)
-  {
-    fprintf(stderr, "I don't have any server sockets\n");
-    return 1;
-  }
-
-  /*
-   * 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)
-  {
-    fprintf(stderr, "Failed to allocate protocol handle\n");
-    return 1;
-  }
-
-  socket_userdata_map= calloc((size_t)(maxconns), sizeof(struct connection));
-  if (socket_userdata_map == NULL)
-  {
-    fprintf(stderr, "Failed to allocate room for connections\n");
-    return 1;
-  }
-
-  memcached_binary_protocol_set_callbacks(protocol_handle, interface);
-  memcached_binary_protocol_set_pedantic(protocol_handle, true);
-
-  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, (intptr_t)server_sockets[xx], EV_READ | EV_PERSIST,
-              accept_handler, conn);
-    event_base_set(event_base, &conn->event);
-    if (event_add(&conn->event, 0) == -1)
-    {
-      fprintf(stderr, "Failed to add event for %d\n", server_sockets[xx]);
-      closesocket(server_sockets[xx]);
-    }
-  }
-
-  /* Serve all of the clients */
-  event_base_loop(event_base, 0);
-
-  /* NOTREACHED */
-  return 0;
-}
@@ -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 <mem_config.h>
+
+#include <libmemcachedprotocol-0.0/handler.h>
+#include <libmemcached/socket.hpp>
+#include <example/byteorder.h>
+#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 <event.h>
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <fcntl.h>
+#include <getopt.h>
+#include <iostream>
+#include <sys/types.h>
+#include <unistd.h>
+
+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;
+}
@@ -1,7 +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 -*- */
-#ifndef MEMCACHED_LIGHT_H
-#define MEMCACHED_LIGHT_H
+#pragma once
 
-extern void initialize_interface_v0_handler(void);
+#include "util/log.hpp"
 
-#endif
+void initialize_interface_v0_handler(datadifferential::util::log_info_st&);
+void initialize_interface_v1_handler(datadifferential::util::log_info_st&);
@@ -1,171 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "config.h"
-#include <stdlib.h>
-#include <inttypes.h>
-#include <time.h>
-#include <stdbool.h>
-#include <string.h>
-#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= (void*)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= 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= (void*)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)
-{
-  /* FIXME */
-  (void)when;
-  /* remove the complete linked list */
-  if (root == NULL)
-  {
-    return;
-  }
-
-  root->prev->next= NULL;
-  while (root != NULL)
-  {
-    struct item* tmp= (void*)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 __attribute__((unused)))
-{
-  /* EMPTY */
-}
@@ -0,0 +1,168 @@
+/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#include "mem_config.h"
+#include <stdlib.h>
+#include <inttypes.h>
+#include <time.h>
+#include <stdbool.h>
+#include <string.h>
+#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 */)
+{
+}
@@ -1,6 +1,5 @@
 /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#ifndef STORAGE_H
-#define STORAGE_H
+#pragma once
 
 struct item {
   uint64_t cas;
@@ -23,5 +22,3 @@ struct item* create_item(const void* key, size_t nkey, const void *data,
 bool delete_item(const void* key, size_t nkey);
 void flush(uint32_t when);
 void release_item(struct item* item);
-
-#endif
@@ -1,535 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include <stdlib.h>
-#include <inttypes.h>
-#include <time.h>
-#include <stdbool.h>
-#include <string.h>
-#include <unistd.h>
-#include <assert.h>
-#include <embedded_innodb-1.0/innodb.h>
-
-#include "storage.h"
-
-const char *tablename= "memcached/items";
-
-#define key_col_idx 0
-#define data_col_idx 1
-#define flags_col_idx 2
-#define cas_col_idx 3
-#define exp_col_idx 4
-
-static uint64_t cas;
-
-/**
- * To avoid cluttering down all the code with error checking I use the
- * following macro. It will execute the statement and verify that the
- * result of the operation is DB_SUCCESS. If any other error code is
- * returned it will print an "assert-like" output and jump to the
- * label error_exit. There I release resources before returning out of
- * the function.
- *
- * @param a the expression to execute
- *
- */
-#define checked(expression)                                    \
-do {                                                           \
-  ib_err_t checked_err= expression;                            \
-  if (checked_err != DB_SUCCESS)                               \
-  {                                                            \
-    fprintf(stderr, "ERROR: %s at %u: Failed: <%s>\n\t%s\n",   \
-            __FILE__, __LINE__, #expression,                   \
-            ib_strerror(checked_err));                         \
-    goto error_exit;                                           \
-  }                                                            \
-} while (0);
-
-/**
- * Create the database schema.
- * @return true if the database schema was created without any problems
- *         false otherwise.
- */
-static bool create_schema(void) 
-{
-  ib_tbl_sch_t schema= NULL;
-  ib_idx_sch_t dbindex= NULL;
-
-  if (ib_database_create("memcached") != IB_TRUE)
-  {
-    fprintf(stderr, "Failed to create database\n");
-    return false;
-  }
-
-  ib_trx_t transaction= ib_trx_begin(IB_TRX_SERIALIZABLE);
-  ib_id_t table_id;
-
-  checked(ib_table_schema_create(tablename, &schema, IB_TBL_COMPACT, 0));
-  checked(ib_table_schema_add_col(schema, "key", IB_BLOB,
-                                  IB_COL_NOT_NULL, 0, 32767));
-  checked(ib_table_schema_add_col(schema, "data", IB_BLOB,
-                                  IB_COL_NONE, 0, 1024*1024));
-  checked(ib_table_schema_add_col(schema, "flags", IB_INT,
-                                  IB_COL_UNSIGNED, 0, 4));
-  checked(ib_table_schema_add_col(schema, "cas", IB_INT,
-                                  IB_COL_UNSIGNED, 0, 8));
-  checked(ib_table_schema_add_col(schema, "exp", IB_INT,
-                                  IB_COL_UNSIGNED, 0, 4));
-  checked(ib_table_schema_add_index(schema, "PRIMARY_KEY", &dbindex));
-  checked(ib_index_schema_add_col(dbindex, "key", 0));
-  checked(ib_index_schema_set_clustered(dbindex));
-  checked(ib_schema_lock_exclusive(transaction));
-  checked(ib_table_create(transaction, schema, &table_id));
-  checked(ib_trx_commit(transaction));
-  ib_table_schema_delete(schema);
-
-  return true;
-
- error_exit:
-  /* @todo release resources! */
-  {
-    ib_err_t error= ib_trx_rollback(transaction);
-    if (error != DB_SUCCESS)
-      fprintf(stderr, "Failed to roll back the transaction:\n\t%s\n",
-              ib_strerror(error));
-  }
-  return false;
-}
-
-/**
- * Store an item into the database. Update the CAS id on the item before
- * storing it in the database.
- *
- * @param trx the transaction to use
- * @param item the item to store
- * @return true if we can go ahead and commit the transaction, false otherwise
- */
-static bool do_put_item(ib_trx_t trx, struct item* item) 
-{
-  update_cas(item);
-
-  ib_crsr_t cursor= NULL;
-  ib_tpl_t tuple= NULL;
-  bool retval= false;
-
-  checked(ib_cursor_open_table(tablename, trx, &cursor));
-  checked(ib_cursor_lock(cursor, IB_LOCK_X));
-  tuple= ib_clust_read_tuple_create(cursor);
-
-  checked(ib_col_set_value(tuple, key_col_idx, item->key, item->nkey));
-  checked(ib_col_set_value(tuple, data_col_idx, item->data, item->size));
-  checked(ib_tuple_write_u32(tuple, flags_col_idx, item->flags));
-  checked(ib_tuple_write_u64(tuple, cas_col_idx, item->cas));
-  checked(ib_tuple_write_u32(tuple, exp_col_idx, (ib_u32_t)item->exp));
-  checked(ib_cursor_insert_row(cursor, tuple));
-
-  retval= true;
-  /* Release resources: */
-  /* FALLTHROUGH */
-
- error_exit:
-  if (tuple != NULL)
-    ib_tuple_delete(tuple);
-
-  ib_err_t currsor_error;
-  if (cursor != NULL)
-    currsor_error= ib_cursor_close(cursor);
-
-  return retval;
-}
-
-/**
- * Try to locate an item in the database. Return a cursor and the tuple to
- * the item if I found it in the database.
- *
- * @param trx the transaction to use
- * @param key the key of the item to look up
- * @param nkey the size of the key
- * @param cursor where to store the cursor (OUT)
- * @param tuple where to store the tuple (OUT)
- * @return true if I found the object, false otherwise
- */
-static bool do_locate_item(ib_trx_t trx,
-                           const void* key,
-                           size_t nkey,
-                           ib_crsr_t *cursor)
-{
-  int res;
-  ib_tpl_t tuple= NULL;
-
-  *cursor= NULL;
-
-  checked(ib_cursor_open_table(tablename, trx, cursor));
-  tuple= ib_clust_search_tuple_create(*cursor);
-  if (tuple == NULL)
-  {
-    fprintf(stderr, "Failed to allocate tuple object\n");
-    goto error_exit;
-  }
-
-  checked(ib_col_set_value(tuple, key_col_idx, key, nkey));
-  ib_err_t err= ib_cursor_moveto(*cursor, tuple, IB_CUR_GE, &res);
-
-  if (err == DB_SUCCESS && res == 0)
-  {
-    ib_tuple_delete(tuple);
-    return true;
-  }
-  else if (err != DB_SUCCESS &&
-           err != DB_RECORD_NOT_FOUND &&
-           err != DB_END_OF_INDEX)
-  {
-    fprintf(stderr, "ERROR: ib_cursor_moveto(): %s\n", ib_strerror(err));
-  }
-  /* FALLTHROUGH */
- error_exit:
-  if (tuple != NULL)
-    ib_tuple_delete(tuple);
-
-  ib_err_t cursor_error;
-  if (*cursor != NULL)
-    cursor_error= ib_cursor_close(*cursor);
-
-  *cursor= NULL;
-
-  return false;
-}
-
-/**
- * Try to get an item from the database
- *
- * @param trx the transaction to use
- * @param key the key to get
- * @param nkey the lenght of the key
- * @return a pointer to the item if I found it in the database
- */
-static struct item* do_get_item(ib_trx_t trx, const void* key, size_t nkey) 
-{
-  ib_crsr_t cursor= NULL;
-  ib_tpl_t tuple= NULL;
-  struct item* retval= NULL;
-
-  if (do_locate_item(trx, key, nkey, &cursor)) 
-  {
-    tuple= ib_clust_read_tuple_create(cursor);
-    if (tuple == NULL)
-    {
-      fprintf(stderr, "Failed to create read tuple\n");
-      goto error_exit;
-    }
-    checked(ib_cursor_read_row(cursor, tuple));
-    ib_col_meta_t meta;
-    ib_ulint_t datalen= ib_col_get_meta(tuple, data_col_idx, &meta);
-    ib_ulint_t flaglen= ib_col_get_meta(tuple, flags_col_idx, &meta);
-    ib_ulint_t caslen= ib_col_get_meta(tuple, cas_col_idx, &meta);
-    ib_ulint_t explen= ib_col_get_meta(tuple, exp_col_idx, &meta);
-    const void *dataptr= ib_col_get_value(tuple, data_col_idx);
-
-    retval= create_item(key, nkey, dataptr, datalen, 0, 0);
-    if (retval == NULL) 
-    {
-      fprintf(stderr, "Failed to allocate memory\n");
-      goto error_exit;
-    }
-
-    if (flaglen != 0) 
-    {
-      ib_u32_t val;
-      checked(ib_tuple_read_u32(tuple, flags_col_idx, &val));
-      retval->flags= (uint32_t)val;
-    }
-    if (caslen != 0) 
-    {
-      ib_u64_t val;
-      checked(ib_tuple_read_u64(tuple, cas_col_idx, &val));
-      retval->cas= (uint64_t)val;
-    }
-    if (explen != 0) 
-    {
-      ib_u32_t val;
-      checked(ib_tuple_read_u32(tuple, exp_col_idx, &val));
-      retval->exp= (time_t)val;
-    }
-  }
-
-  /* Release resources */
-  /* FALLTHROUGH */
-
- error_exit:
-  if (tuple != NULL)
-    ib_tuple_delete(tuple);
-
-  ib_err_t cursor_error;
-  if (cursor != NULL)
-    cursor_error= ib_cursor_close(cursor);
-
-  return retval;
-}
-
-/**
- * Delete an item from the cache
- * @param trx the transaction to use
- * @param key the key of the item to delete
- * @param nkey the length of the key
- * @return true if we should go ahead and commit the transaction
- *         or false if we should roll back (if the key didn't exists)
- */
-static bool do_delete_item(ib_trx_t trx, const void* key, size_t nkey) {
-  ib_crsr_t cursor= NULL;
-  bool retval= false;
-
-  if (do_locate_item(trx, key, nkey, &cursor))
-  {
-    checked(ib_cursor_lock(cursor, IB_LOCK_X));
-    checked(ib_cursor_delete_row(cursor));
-    retval= true;
-  }
-  /* Release resources */
-  /* FALLTHROUGH */
-
- error_exit:
-  if (cursor != NULL)
-  {
-    ib_err_t cursor_error;
-    cursor_error= ib_cursor_close(cursor);
-  }
-
-  return retval;
-}
-
-
-/****************************************************************************
- * External interface
- ***************************************************************************/
-
-/**
- * Initialize the database storage
- * @return true if the database was initialized successfully, false otherwise
- */
-bool initialize_storage(void) 
-{
-  ib_err_t error;
-  ib_id_t tid;
-
-  checked(ib_init());
-  checked(ib_cfg_set_text("data_home_dir", "/tmp/memcached_light"));
-  checked(ib_cfg_set_text("log_group_home_dir", "/tmp/memcached_light"));
-  checked(ib_cfg_set_bool_on("file_per_table"));
-  checked(ib_startup("barracuda"));
-
-  /* check to see if the table exists or if we should create the schema */
-  error= ib_table_get_id(tablename, &tid);
-  if (error == DB_TABLE_NOT_FOUND) 
-  {
-    if (!create_schema()) 
-    {
-      return false;
-    }
-  } 
-  else if (error != DB_SUCCESS) 
-  {
-    fprintf(stderr, "Failed to get table id: %s\n", ib_strerror(error));
-    return false;
-  }
-
-  return true;
-
- error_exit:
-
-  return false;
-}
-
-/**
- * Shut down this storage engine
- */
-void shutdown_storage(void) 
-{
-  checked(ib_shutdown(IB_SHUTDOWN_NORMAL));
- error_exit:
-  ;
-}
-
-/**
- * Store an item in the databse
- *
- * @param item the item to store
- */
-void put_item(struct item* item) 
-{
-  ib_trx_t transaction= ib_trx_begin(IB_TRX_SERIALIZABLE);
-  if (do_put_item(transaction, item)) 
-  {
-    ib_err_t error= ib_trx_commit(transaction);
-    if (error != DB_SUCCESS) 
-    {
-      fprintf(stderr, "Failed to store key:\n\t%s\n",
-              ib_strerror(error));
-    }
-  } 
-  else 
-  {
-    ib_err_t error= ib_trx_rollback(transaction);
-    if (error != DB_SUCCESS)
-      fprintf(stderr, "Failed to roll back the transaction:\n\t%s\n",
-              ib_strerror(error));
-  }
-}
-
-/**
- * Get an item from the engine
- * @param key the key to grab
- * @param nkey number of bytes in the key
- * @return pointer to the item if found
- */
-struct item* get_item(const void* key, size_t nkey) 
-{
-  ib_trx_t transaction= ib_trx_begin(IB_TRX_SERIALIZABLE);
-  struct item* ret= do_get_item(transaction, key, nkey);
-  ib_err_t error= ib_trx_rollback(transaction);
-
-  if (error != DB_SUCCESS)
-    fprintf(stderr, "Failed to roll back the transaction:\n\t%s\n",
-            ib_strerror(error));
-
-  return ret;
-}
-
-/**
- * Create an item structure and initialize it with the content
- *
- * @param key the key for the item
- * @param nkey the number of bytes in the key
- * @param data pointer to the value for the item (may be NULL)
- * @param size the size of the data
- * @param flags the flags to store with the data
- * @param exp the expiry time for the item
- * @return pointer to an initialized item object or NULL if allocation failed
- */
-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= calloc(1, sizeof(*ret));
-  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;
-}
-
-/**
- * Delete an item from the cache
- * @param key the key of the item to delete
- * @param nkey the length of the key
- * @return true if the item was deleted from the cache
- */
-bool delete_item(const void* key, size_t nkey) {
-  ib_trx_t transaction= ib_trx_begin(IB_TRX_REPEATABLE_READ);
-
-  bool ret= do_delete_item(transaction, key, nkey);
-
-  if (ret)
-  {
-    /* object found. commit transaction */
-    ib_err_t error= ib_trx_commit(transaction);
-    if (error != DB_SUCCESS)
-    {
-      fprintf(stderr, "Failed to delete key:\n\t%s\n",
-              ib_strerror(error));
-      ret= false;
-    }
-  }
-  else
-  {
-    ib_err_t error= ib_trx_rollback(transaction);
-    if (error != DB_SUCCESS)
-      fprintf(stderr, "Failed to roll back the transaction:\n\t%s\n",
-              ib_strerror(error));
-  }
-
-  return ret;
-}
-
-/**
- * Flush the entire cache
- * @param when when the cache should be flushed (0 == immediately)
- */
-void flush(uint32_t when __attribute__((unused))) 
-{
-  /* @TODO implement support for when != 0 */
-  ib_trx_t transaction= ib_trx_begin(IB_TRX_REPEATABLE_READ);
-  ib_crsr_t cursor= NULL;
-	ib_err_t err= DB_SUCCESS;
-
-  checked(ib_cursor_open_table(tablename, transaction, &cursor));
-  checked(ib_cursor_first(cursor));
-  checked(ib_cursor_lock(cursor, IB_LOCK_X));
-
-  do 
-  {
-    checked(ib_cursor_delete_row(cursor));
-  } while ((err= ib_cursor_next(cursor)) == DB_SUCCESS);
-
-  if (err != DB_END_OF_INDEX)
-  {
-    fprintf(stderr, "Failed to flush the cache: %s\n", ib_strerror(err));
-    goto error_exit;
-  }
-  ib_err_t cursor_error;
-  cursor_error= ib_cursor_close(cursor);
-  cursor= NULL;
-  checked(ib_trx_commit(transaction));
-  return;
-
- error_exit:
-  if (cursor != NULL)
-  {
-    cursor_error= ib_cursor_close(cursor);
-  }
-
-  ib_err_t error= ib_trx_rollback(transaction);
-  if (error != DB_SUCCESS)
-    fprintf(stderr, "Failed to roll back the transaction:\n\t%s\n",
-            ib_strerror(error));
-}
-
-/**
- * Update the cas ID in the item structure
- * @param item the item to update
- */
-void update_cas(struct item* item) 
-{
-  item->cas= ++cas;
-}
-
-/**
- * Release all the resources allocated by the item
- * @param item the item to release
- */
-void release_item(struct item* item) 
-{
-  free(item->key);
-  free(item->data);
-  free(item);
-}
@@ -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 <cstring>
+
+#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;
+}
@@ -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);
@@ -1,67 +0,0 @@
-/* HashKit
- * 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.
- */
-
-#include "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);
-}
-
-#ifdef HAVE_HSIEH_HASH
-uint32_t libhashkit_hsieh(const char *key, size_t key_length)
-{
-  return hashkit_hsieh(key, key_length, NULL);
-}
-#endif
-
-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);
-}
-
@@ -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);
+}
+
@@ -1,92 +1,66 @@
-/* HashKit
- * Copyright (C) 2009 Brian Aker
- * All rights reserved.
+/*  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.
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
  */
 
+
 /**
  * @file
  * @brief HashKit Header
  */
 
-#ifndef HASHKIT_ALGORITHM_H
-#define HASHKIT_ALGORITHM_H
-
-#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);
+#pragma once
 
-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);
-
-#ifdef HAVE_HSIEH_HASH
-HASHKIT_API
-uint32_t libhashkit_hsieh(const char *key, size_t key_length);
-#endif
-
-HASHKIT_API
-uint32_t libhashkit_murmur(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_LOCAL
 uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
 uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
 uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
 uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
 uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
 uint32_t hashkit_crc32(const char *key, size_t key_length, void *context);
 
-#ifdef HAVE_HSIEH_HASH
-HASHKIT_LOCAL
 uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
-#endif
 
-HASHKIT_LOCAL
 uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
 
-HASHKIT_LOCAL
+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);
 
-HASHKIT_LOCAL
 uint32_t hashkit_md5(const char *key, size_t key_length, void *context);
-
-HASHKIT_API
-void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HASHKIT_ALGORITHM_H */
@@ -1,9 +0,0 @@
-/* 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.
- */
-
-#include "common.h"
@@ -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 <libhashkit/common.h>
@@ -1,26 +0,0 @@
-/* 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.
- */
-
-/**
- * @file
- * @brief HashKit Header
- */
-
-#ifndef HASHKIT_BEHAVIOR_H
-#define HASHKIT_BEHAVIOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HASHKIT_BEHAVIOR_H */
@@ -1,15 +1,43 @@
-/* HashKit
- * Copyright (C) 2009 Brian Aker
- * All rights reserved.
+/*  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.
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
  */
 
-#ifndef HASHKIT_COMMON_H
-#define HASHKIT_COMMON_H
 
-#include "config.h"
+#pragma once
+
+#include "libhashkit/hashkitcon.h"
 
 #include <assert.h>
 #include <errno.h>
@@ -17,20 +45,26 @@
 #include <stdlib.h>
 #include <math.h>
 
-#include "hashkit.h"
+#ifndef __WORDSIZE
+# ifdef __MINGW32__
+#  define __WORDSIZE 32
+# endif
+#endif
+
+#include <libhashkit-1.0/hashkit.h>
+#include "libhashkit/algorithm.h"
+#include "libhashkit/is.h"
+#include "libhashkit/string.h"
+#include "libhashkit/aes.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-HASHKIT_LOCAL
 void md5_signature(const unsigned char *key, unsigned int length, unsigned char *result);
 
-HASHKIT_LOCAL
 int update_continuum(hashkit_st *hashkit);
 
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* HASHKIT_COMMON_H */
@@ -1,19 +0,0 @@
-/* HashKit
- * Copyright (C) 2009-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.
- */
-#ifndef LIBHASHKIT_CONFIGURE_H
-#define LIBHASHKIT_CONFIGURE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBHASHKIT_CONFIGURE_H */
@@ -1,85 +0,0 @@
-/* The crc32 functions and data was originally written by Spencer
- * Garrett <srg@quick.com> 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 "common.h"
-
-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 __attribute__((unused)))
-{
-  uint64_t x;
-  uint32_t crc= UINT32_MAX;
-
-  for (x= 0; x < key_length; x++)
-     crc= (crc >> 8) ^ crc32tab[(crc ^ (uint64_t)key[x]) & 0xff];
-
-  return ((~crc) >> 16) & 0x7fff;
-}
@@ -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 <srg@quick.com> 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 <libhashkit/common.h>
+
+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;
+}
@@ -1,56 +0,0 @@
-/* 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 "common.h"
-
-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_MURMUR:
-    return libhashkit_murmur(key, key_length);
-  case HASHKIT_HASH_JENKINS:
-    return libhashkit_jenkins(key, key_length);
-  case HASHKIT_HASH_CUSTOM:
-  case HASHKIT_HASH_MAX:
-  default:
-#ifdef HAVE_DEBUG
-    fprintf(stderr, "hashkit_hash_t was extended but libhashkit_generate_value was not updated\n");
-    fflush(stderr);
-    assert(0);
-#endif
-    break;
-  }
-
-  return 1;
-}
@@ -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 <libhashkit/common.h>
+
+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;
+}
@@ -1,30 +0,0 @@
-/* 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.
- */
-
-#ifndef HASHKIT_DIGEST_H
-#define HASHKIT_DIGEST_H
-
-#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
-
-#endif /* HASHKIT_DIGEST_H */
@@ -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 <libhashkit/common.h>
+
+hashkit_string_st *hashkit_encrypt(hashkit_st *kit,
+                                   const char* source, size_t source_length)
+{
+  return aes_encrypt(static_cast<aes_key_t*>(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<aes_key_t*>(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);
+}
+
@@ -1,71 +0,0 @@
-/* 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.
- */
-
-#include "common.h"
-
-/* FNV hash'es lifted from Dustin Sallings work */
-static uint64_t FNV_64_INIT= UINT64_C(0xcbf29ce484222325);
-static uint64_t FNV_64_PRIME= UINT64_C(0x100000001b3);
-static uint32_t FNV_32_INIT= 2166136261UL;
-static uint32_t FNV_32_PRIME= 16777619;
-
-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused)))
-{
-  /* 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 *context __attribute__((unused)))
-{
-  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;
-}
-
-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused)))
-{
-  uint32_t hash= FNV_32_INIT;
-
-  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 __attribute__((unused)))
-{
-  uint32_t hash= FNV_32_INIT;
-
-  for (size_t x= 0; x < key_length; x++)
-  {
-    uint32_t val= (uint32_t)key[x];
-    hash ^= val;
-    hash *= FNV_32_PRIME;
-  }
-
-  return hash;
-}
@@ -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 <libhashkit/common.h>
+
+/* 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;
+}
@@ -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 <libhashkit/common.h>
+
+#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
@@ -1,149 +0,0 @@
-/* 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 "common.h"
-
-static hashkit_return_t _set_function(struct hashkit_function_st *self, hashkit_hash_algorithm_t hash_algorithm)
-{
-  switch (hash_algorithm)
-  {
-  case HASHKIT_HASH_DEFAULT:
-    self->function= hashkit_one_at_a_time;
-    break;
-  case HASHKIT_HASH_MD5:
-    self->function= hashkit_md5;
-    break;
-  case HASHKIT_HASH_CRC:
-    self->function= hashkit_crc32;
-    break;
-  case HASHKIT_HASH_FNV1_64:
-    self->function= hashkit_fnv1_64;
-    break;
-  case HASHKIT_HASH_FNV1A_64:
-    self->function= hashkit_fnv1a_64;
-    break;
-  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:
-#ifdef HAVE_HSIEH_HASH
-    self->function= hashkit_hsieh;
-    break;    
-#else
-    return HASHKIT_FAILURE;
-#endif
-  case HASHKIT_HASH_MURMUR:
-    self->function= hashkit_murmur;
-    break;    
-  case HASHKIT_HASH_JENKINS:
-    self->function= hashkit_jenkins;
-    break;    
-  case HASHKIT_HASH_CUSTOM:
-  case HASHKIT_HASH_MAX:
-  default:
-    return HASHKIT_FAILURE;
-  }
-
-  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_function_st *self, hashkit_hash_fn function, void *context)
-{
-  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)
-{
-  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)
-{
-  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;
-  }
-#ifdef HAVE_HSIEH_HASH
-  else if (function == hashkit_hsieh)
-  {
-    return HASHKIT_HASH_HSIEH;
-  }
-#endif
-  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)
-{
-  return get_function_type(self->base_hash.function);
-}
-
-hashkit_hash_algorithm_t hashkit_get_distribution_function(const hashkit_st *self)
-{
-  return get_function_type(self->distribution_hash.function);
-}
@@ -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 <libhashkit/common.h>
+
+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);
+}
@@ -1,44 +0,0 @@
-/* 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.
- */
-
-#ifndef HASHKIT_FUNCTION_H
-#define HASHKIT_FUNCTION_H
-
-#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
-
-#endif /* HASHKIT_FUNCTION_H */
@@ -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 <libhashkit/common.h>
+
+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;
+}
@@ -1,108 +0,0 @@
-/* HashKit
- * 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.
- */
-
-#include "common.h"
-
-static const hashkit_st global_default_hash= {
-  .base_hash= {
-    .function= hashkit_one_at_a_time,
-    .context= NULL
-  },
-  .flags= {
-    .is_base_same_distributed= false,
-  }
-};
-
-static inline bool _hashkit_init(hashkit_st *self)
-{
-  self->base_hash= global_default_hash.base_hash;
-  self->distribution_hash= global_default_hash.base_hash;
-  self->flags= global_default_hash.flags;
-
-  return true;
-}
-
-static inline hashkit_st *_hashkit_create(hashkit_st *self)
-{
-  if (self == NULL)
-  {
-    self= (hashkit_st *)malloc(sizeof(hashkit_st));
-    if (self == NULL)
-    {
-      return NULL;
-    }
-
-    self->options.is_allocated= true;
-  }
-  else
-  {
-    self->options.is_allocated= false;
-  }
-
-  return self;
-}
-
-hashkit_st *hashkit_create(hashkit_st *self)
-{
-  self= _hashkit_create(self);
-  if (! self)
-    return self;
-
-  if (! _hashkit_init(self))
-  {
-    hashkit_free(self);
-  }
-
-  return self;
-}
-
-
-void hashkit_free(hashkit_st *self)
-{
-  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;
-
-  return destination;
-}
-
-bool hashkit_compare(const hashkit_st *first, const hashkit_st *second)
-{
-  if (first->base_hash.function == second->base_hash.function &&
-      first->base_hash.context == second->base_hash.context &&
-      first->distribution_hash.function == second->distribution_hash.function &&
-      first->distribution_hash.context == second->distribution_hash.context &&
-      first->flags.is_base_same_distributed == second->flags.is_base_same_distributed)
-  {
-    return true;
-  }
-
-  return false;
-}
@@ -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 <libhashkit/common.h>
+
+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<aes_key_t*>(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;
+}
@@ -1,125 +1,40 @@
-/* HashKit
- * Copyright (C) 2009-2010 Brian Aker
- * All rights reserved.
+/*  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.
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
  */
 
-#ifndef HASHKIT_H
-#define HASHKIT_H
-
-
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-#include <inttypes.h>
-#include <sys/types.h>
-#include <libhashkit/visibility.h>
-#include <libhashkit/configure.h>
-#include <libhashkit/types.h>
-#include <libhashkit/algorithm.h>
-#include <libhashkit/behavior.h>
-#include <libhashkit/digest.h>
-#include <libhashkit/function.h>
-#include <libhashkit/strerror.h>
-
-#ifdef __cplusplus
-
-#include <string>
-
-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);
-
-#define hashkit_is_allocated(__object) ((__object)->options.is_allocated)
-#define hashkit_is_initialized(__object) ((__object)->options.is_initialized)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-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;
-};
-
-#ifdef __cplusplus
-class Hashkit : private hashkit_st {
-
-public:
-
-  Hashkit()
-  {
-    hashkit_create(this);
-  }
-
-  Hashkit(const Hashkit& source)
-  {
-    hashkit_clone(this, &source);
-  }
-
-  Hashkit& operator=(const Hashkit& source)
-  {
-    hashkit_free(this);
-    hashkit_clone(this, &source);
-
-    return *this;
-  }
-
-  friend bool operator==(const Hashkit &left, const Hashkit &right)
-  {
-    return hashkit_compare(&left, &right);
-  }
-
-  uint32_t digest(std::string& str)
-  {
-    return hashkit_digest(this, str.c_str(), str.length());
-  }
-
-  uint32_t digest(const char *key, size_t key_length)
-  {
-    return hashkit_digest(this, key, key_length);
-  }
-
-  hashkit_return_t set_function(hashkit_hash_algorithm_t hash_algorithm)
-  {
-    return hashkit_set_function(this, hash_algorithm);
-  }
-
-  hashkit_return_t set_distribution_function(hashkit_hash_algorithm_t hash_algorithm)
-  {
-    return hashkit_set_function(this, hash_algorithm);
-  }
-
-  ~Hashkit()
-  {
-    hashkit_free(this);
-  }
-};
-#endif
 
+#pragma once
 
-#endif /* HASHKIT_H */
+#include <libhashkit-1.0/hashkit.h>
@@ -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@"
@@ -1,70 +0,0 @@
-/* By Paul Hsieh (C) 2004, 2005.  Covered under the Paul Hsieh
- * derivative license.
- * See: http://www.azillionmonkeys.com/qed/weblicense.html for license
- * details.
- * http://www.azillionmonkeys.com/qed/hash.html
-*/
-
-#include "common.h"
-
-#undef get16bits
-#if (defined(__GNUC__) && defined(__i386__))
-#define get16bits(d) (*((const uint16_t *) (d)))
-#endif
-
-#if !defined (get16bits)
-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
-                      +(uint32_t)(((const uint8_t *)(d))[0]) )
-#endif
-
-uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attribute__((unused)))
-{
-  uint32_t hash = 0, tmp;
-  int rem;
-
-  if (key_length <= 0 || key == NULL)
-    return 0;
-
-  rem = key_length & 3;
-  key_length >>= 2;
-
-  /* Main loop */
-  for (;key_length > 0; key_length--)
-  {
-    hash  += get16bits (key);
-    tmp    = (get16bits (key+2) << 11) ^ hash;
-    hash   = (hash << 16) ^ tmp;
-    key  += 2*sizeof (uint16_t);
-    hash  += hash >> 11;
-  }
-
-  /* Handle end cases */
-  switch (rem)
-  {
-  case 3: hash += get16bits (key);
-          hash ^= hash << 16;
-          hash ^= (uint32_t)key[sizeof (uint16_t)] << 18;
-          hash += hash >> 11;
-          break;
-  case 2: hash += get16bits (key);
-          hash ^= hash << 11;
-          hash += hash >> 17;
-          break;
-  case 1: hash += (unsigned char)(*key);
-          hash ^= hash << 10;
-          hash += hash >> 1;
-  default:
-          break;
-  }
-
-  /* Force "avalanching" of final 127 bits */
-  hash ^= hash << 3;
-  hash += hash >> 5;
-  hash ^= hash << 4;
-  hash += hash >> 17;
-  hash ^= hash << 25;
-  hash += hash >> 6;
-
-  return hash;
-}
-
@@ -0,0 +1,113 @@
+/*  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 Paul Hsieh (C) 2004, 2005.  Covered under the Paul Hsieh
+ * derivative license.
+ * See: http://www.azillionmonkeys.com/qed/weblicense.html for license
+ * details.
+ * http://www.azillionmonkeys.com/qed/hash.html
+*/
+
+#include <libhashkit/common.h>
+
+#undef get16bits
+#if (defined(__GNUC__) && defined(__i386__))
+#define get16bits(d) (*((const uint16_t *) (d)))
+#endif
+
+#if !defined (get16bits)
+#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\
+                      +(uint32_t)(((const uint8_t *)(d))[0]) )
+#endif
+
+#ifdef HAVE_HSIEH_HASH
+uint32_t hashkit_hsieh(const char *key, size_t key_length, void *)
+{
+  uint32_t hash = 0, tmp;
+  int rem;
+
+  if (key_length <= 0 || key == NULL)
+    return 0;
+
+  rem = key_length & 3;
+  key_length >>= 2;
+
+  /* Main loop */
+  for (;key_length > 0; key_length--)
+  {
+    hash  += get16bits (key);
+    tmp    = (get16bits (key+2) << 11) ^ hash;
+    hash   = (hash << 16) ^ tmp;
+    key  += 2*sizeof (uint16_t);
+    hash  += hash >> 11;
+  }
+
+  /* Handle end cases */
+  switch (rem)
+  {
+  case 3: hash += get16bits (key);
+          hash ^= hash << 16;
+          hash ^= (uint32_t)key[sizeof (uint16_t)] << 18;
+          hash += hash >> 11;
+          break;
+  case 2: hash += get16bits (key);
+          hash ^= hash << 11;
+          hash += hash >> 17;
+          break;
+  case 1: hash += (unsigned char)(*key);
+          hash ^= hash << 10;
+          hash += hash >> 1;
+  default:
+          break;
+  }
+
+  /* Force "avalanching" of final 127 bits */
+  hash ^= hash << 3;
+  hash += hash >> 5;
+  hash ^= hash << 4;
+  hash += hash >> 17;
+  hash ^= hash << 25;
+  hash += hash >> 6;
+
+  return hash;
+}
+#else
+uint32_t hashkit_hsieh(const char *, size_t , void *)
+{
+  return 0;
+}
+#endif
@@ -11,53 +11,59 @@
 
 lib_LTLIBRARIES+= libhashkit/libhashkit.la
 
-EXTRA_DIST+= \
-	     libhashkit/configure.h.in
-
-
-nobase_include_HEADERS+= \
-			 libhashkit/algorithm.h \
-			 libhashkit/behavior.h \
-			 libhashkit/configure.h \
-			 libhashkit/digest.h \
-			 libhashkit/function.h \
-			 libhashkit/hashkit.h \
-			 libhashkit/strerror.h \
-			 libhashkit/types.h \
-			 libhashkit/visibility.h
-
-noinst_HEADERS+= \
-		 libhashkit/common.h
-
-libhashkit_libhashkit_la_SOURCES= \
-				  libhashkit/algorithm.c \
-				  libhashkit/behavior.c \
-				  libhashkit/crc32.c \
-				  libhashkit/fnv.c \
-				  libhashkit/digest.c \
-				  libhashkit/function.c \
-				  libhashkit/hashkit.c \
-				  libhashkit/jenkins.c \
-				  libhashkit/ketama.c \
-				  libhashkit/md5.c \
-				  libhashkit/murmur.c \
-				  libhashkit/one_at_a_time.c \
-				  libhashkit/strerror.c
+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.c
+libhashkit_libhashkit_la_SOURCES+= libhashkit/hsieh.cc
+else
+libhashkit_libhashkit_la_SOURCES+= libhashkit/nohsieh.cc
 endif
 
-libhashkit_libhashkit_la_CFLAGS= \
-				 ${AM_CFLAGS} \
-				 -DBUILDING_HASHKIT
+libhashkit_libhashkit_la_CXXFLAGS+= -DBUILDING_HASHKIT
+libhashkit_libhashkit_la_CFLAGS+= -DBUILDING_HASHKIT
 
-libhashkit_libhashkit_la_LDFLAGS= \
-				  $(LIBM) \
-				  -version-info $(HASHKIT_LIBRARY_VERSION)
+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_LDFLAGS=  $(LIBM)
+libhashkit_libhashkitinc_la_CXXFLAGS= ${libhashkit_libhashkit_la_CXXFLAGS}
@@ -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])
@@ -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)
+
@@ -1,213 +0,0 @@
-/*
-*
-* 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 "common.h"
-
-#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 *context __attribute__((unused)))
-{
-  uint32_t a,b,c;                                          /* internal state */
-  union { const void *ptr; size_t i; } u;     /* needed for Mac Powerbook G4 */
-
-  /* Set up the internal state */
-  a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL;
-
-  u.ptr = key;
-#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;
-}
@@ -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 <libhashkit/common.h>
+
+#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;
+}
@@ -1,164 +0,0 @@
-/* HashKit
- * 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.
- */
-
-#include "common.h"
-#include <math.h>
-
-#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
@@ -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 <libhashkit/common.h>
+#include <math.h>
+
+#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
@@ -1,365 +0,0 @@
-/*
-  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 "common.h"
-
-#include <string.h>
-#include <sys/types.h>
-
-/* POINTER defines a generic pointer type */
-typedef unsigned char *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],
-                          unsigned char block[64]);
-static void Encode (unsigned char *output,
-                    UINT4 *input,
-                    unsigned int len);
-static void Decode(UINT4 *output, 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], (POINTER)input, partLen);
- MD5Transform(context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
-   MD5Transform (context->state, (unsigned char *)&input[i]);
-
- idx = 0;
-  }
-  else
- i = 0;
-
-  /* Buffer remaining input */
-  memcpy((POINTER)&context->buffer[idx], (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],
-                          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,
-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 __attribute__((unused)))
-{
-  unsigned char results[16];
-
-  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);
-}
@@ -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 <libhashkit/common.h>
+
+#include <string.h>
+#include <sys/types.h>
+
+#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);
+}
@@ -1,76 +0,0 @@
-/* 
-  "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 "common.h"
-
-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused)))
-{
-  /* 
-    '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;
-
-  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;
-}
@@ -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 <libhashkit/common.h>
+
+#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
@@ -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;
+}
+
+//-----------------------------------------------------------------------------
+
@@ -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);
+
+//-----------------------------------------------------------------------------
@@ -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;
+}
@@ -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 <libhashkit/common.h>
+
+#ifdef HAVE_HSIEH_HASH
+#error "not supported"
+#else
+uint32_t hashkit_hsieh(const char *, size_t , void *)
+{
+  return 0;
+}
+#endif
@@ -1,33 +0,0 @@
-/* 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.
- */
-
-/*
-  This has is Jenkin's "One at A time Hash".
-http://en.wikipedia.org/wiki/Jenkins_hash_function
-*/
-
-#include "common.h"
-
-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused)))
-{
-  const char *ptr= key;
-  uint32_t value= 0;
-
-  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;
-}
@@ -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 <libhashkit/common.h>
+
+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;
+}
@@ -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 <vincent.rijmen@esat.kuleuven.ac.be>
+ * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
+ * @author Paulo Barreto <paulo.barreto@terra.com.br>
+ *
+ * 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 <assert.h>
+#include <stdlib.h>
+
+#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 */
@@ -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 <vincent.rijmen@esat.kuleuven.ac.be>
+ * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
+ * @author Paulo Barreto <paulo.barreto@terra.com.br>
+ *
+ * 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 */
@@ -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 <libhashkit/common.h>
+
+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";
+  }
+}
@@ -1,26 +0,0 @@
-/* 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.
- */
-
-#include "common.h"
-
-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc)
-{
-  switch (rc)
-  {
-  case HASHKIT_SUCCESS:
-    return "SUCCESS";
-  case HASHKIT_FAILURE:
-    return "FAILURE";
-  case HASHKIT_MEMORY_ALLOCATION_FAILURE:
-    return "MEMORY ALLOCATION FAILURE";
-  case HASHKIT_MAXIMUM_RETURN:
-    return "Gibberish returned!";
-  default:
-    return "Gibberish returned!";
-  }
-}
@@ -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 <libhashkit/common.h>
+
+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";
+  }
+}
@@ -1,23 +0,0 @@
-/* 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.
- */
-
-#ifndef HASHKIT_STRERROR_H
-#define HASHKIT_STRERROR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-HASHKIT_API
-  const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HASHKIT_STRERROR_H */
@@ -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 <libhashkit/common.h>
+
+#include <cassert>
+#include <cstring>
+
+#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<char *>(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;
+  }
+}
@@ -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);
@@ -1,60 +0,0 @@
-
-/* 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.
- */
-
-#ifndef HASHKIT_TYPES_H
-#define HASHKIT_TYPES_H
-
-#ifdef __cplusplus
-
-extern "C" {
-#endif
-
-typedef enum {
-  HASHKIT_SUCCESS,
-  HASHKIT_FAILURE,
-  HASHKIT_MEMORY_ALLOCATION_FAILURE,
-  HASHKIT_MAXIMUM_RETURN /* Always add new error code before */
-} hashkit_return_t;
-
-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_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;
-
-
-typedef struct hashkit_st hashkit_st;
-
-typedef uint32_t (*hashkit_hash_fn)(const char *key, size_t key_length, void *context);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* HASHKIT_TYPES_H */
@@ -1,51 +0,0 @@
-/*
- * 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
- */
-
-#ifndef HASHKIT_VISIBILITY_H
-#define HASHKIT_VISIBILITY_H
-
-/**
- *
- * 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) */
-
-#endif /* HASHKIT_VISIBILITY_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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 <stdbool.h>
+#endif
+#include <inttypes.h>
+#include <sys/types.h>
+
+#include <libhashkit-1.0/visibility.h>
+#include <libhashkit-1.0/configure.h>
+#include <libhashkit-1.0/types.h>
+#include <libhashkit-1.0/has.h>
+#include <libhashkit-1.0/algorithm.h>
+#include <libhashkit-1.0/behavior.h>
+#include <libhashkit-1.0/digest.h>
+#include <libhashkit-1.0/function.h>
+#include <libhashkit-1.0/str_algorithm.h>
+#include <libhashkit-1.0/strerror.h>
+#include <libhashkit-1.0/string.h>
+
+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
@@ -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 <libhashkit-1.0/hashkit.h>
+#include <string>
+
+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;
+};
@@ -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
@@ -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
@@ -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
@@ -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
+
+
@@ -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
@@ -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) */
@@ -1,94 +0,0 @@
-#include "common.h"
-
-void _libmemcached_free(const memcached_st *ptr, void *mem, void *context)
-{
-  (void) ptr;
-  (void) context;
-  free(mem);
-}
-
-void *_libmemcached_malloc(const memcached_st *ptr, size_t size, void *context)
-{
-  (void) ptr;
-  (void) context;
-  return malloc(size);
-}
-
-void *_libmemcached_realloc(const memcached_st *ptr, void *mem, size_t size, void *context)
-{
-  (void) ptr;
-  (void) context;
-  return realloc(mem, size);
-}
-
-void *_libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size, void *context)
-{
-  if (ptr->allocators.malloc != _libmemcached_malloc)
-  {
-     void *ret = _libmemcached_malloc(ptr, nelem * size, context);
-     if (ret != NULL) 
-       memset(ret, 0, nelem * size);
-
-     return ret;
-  }
-
-  return calloc(nelem, size);
-}
-
-static const struct _allocators_st global_default_allocator= {
-  .calloc= _libmemcached_calloc,
-  .context= NULL,
-  .free= _libmemcached_free,
-  .malloc= _libmemcached_malloc,
-  .realloc= _libmemcached_realloc
-};
-
-struct _allocators_st memcached_allocators_return_default(void)
-{
-  return global_default_allocator;
-}
-
-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)
-{
-  /* All should be set, or none should be set */
-  if (mem_malloc == NULL && mem_free == NULL && mem_realloc == NULL && mem_calloc == NULL) 
-  {
-    ptr->allocators= memcached_allocators_return_default();
-  }
-  else if (mem_malloc == NULL || mem_free == NULL || mem_realloc == NULL || mem_calloc == NULL)
-  {
-    return MEMCACHED_FAILURE;
-  }
-  else
-  {
-    ptr->allocators.malloc= mem_malloc;
-    ptr->allocators.free= mem_free;
-    ptr->allocators.realloc= mem_realloc;
-    ptr->allocators.calloc= mem_calloc;
-    ptr->allocators.context= context;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-void *memcached_get_memory_allocators_context(const memcached_st *ptr)
-{
-  return ptr->allocators.context;
-}
-
-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)
-{
-   *mem_malloc= ptr->allocators.malloc;
-   *mem_free= ptr->allocators.free;
-   *mem_realloc= ptr->allocators.realloc;
-   *mem_calloc= ptr->allocators.calloc;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+    }
+  }
+}
@@ -1,56 +0,0 @@
-/* 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 user defined memory allocators
- *
- */
-
-#ifndef __LIBMEMCACHED_ALLOCATORS_H__
-#define __LIBMEMCACHED_ALLOCATORS_H__
-
-#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);
-
-LIBMEMCACHED_LOCAL
-void _libmemcached_free(const memcached_st *ptr, void *mem, void *context);
-
-LIBMEMCACHED_LOCAL
-void *_libmemcached_malloc(const memcached_st *ptr, const size_t size, void *context);
-
-LIBMEMCACHED_LOCAL
-void *_libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size, void *context);
-
-LIBMEMCACHED_LOCAL
-void *_libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size, void *context);
-
-LIBMEMCACHED_LOCAL
-struct _allocators_st memcached_allocators_return_default(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_ALLOCATORS_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
+
+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);
@@ -1,107 +0,0 @@
-#include "common.h"
-
-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 *memc,
-                                         memcached_stat_st *memc_stat,
-                                         memcached_return_t *error)
-{
-  uint64_t total_items= 0, total_bytes= 0;
-  uint64_t total_get_cmds= 0, total_get_hits= 0;
-  uint32_t server_count, x;
-  memcached_analysis_st *result;
-
-  *error= MEMCACHED_SUCCESS;
-  server_count= memcached_server_count(memc);
-  result= (memcached_analysis_st*)calloc(memcached_server_count(memc),
-                                         sizeof(memcached_analysis_st));
-
-  if (!result)
-  {
-    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    return NULL;
-  }
-
-  result->root= memc;
-
-  for (x= 0; x < server_count; x++)
-  {
-    calc_largest_consumption(result, x, memc_stat[x].bytes);
-    calc_oldest_node(result, x, 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)
-{
-  free(ptr);
-}
@@ -0,0 +1,120 @@
+#include <libmemcached/common.h>
+
+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= &not_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);
+}
@@ -1,43 +0,0 @@
-/* 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: Generate a memcached_analysis_st
- *
- */
-
-#ifndef __LIBMEMCACHED_ANALYZE_H__
-#define __LIBMEMCACHED_ANALYZE_H__
-
-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;
-};
-
-#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
-
-#endif /* __LIBMEMCACHED_ANALYZE_H__ */
@@ -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 <libmemcached/common.h>
+#include <assert.h>
+#include <iso646.h>
+
+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;
+}
@@ -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<int>(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
@@ -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 <cassert>
+#else
+# include <assert.h>
+#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 <malloc.h>
+# else
+#  include <alloca.h>
+# endif
+
+#ifdef __cplusplus
+# include <cstdarg>
+# include <cstdio>
+#else
+# include <stdarg.h>
+# include <stdio.h>
+#endif
+
+# include <libmemcached/backtrace.hpp>
+
+# 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
@@ -1,295 +0,0 @@
-/* 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: Methods for adding or decrementing values from an object in memcached
- *
- */
-
-#include "common.h"
-
-static memcached_return_t text_incr_decr(memcached_st *ptr,
-                                         const char *verb,
-                                         const char *master_key, size_t master_key_length,
-                                         const char *key, size_t key_length,
-                                         uint64_t offset,
-                                         uint64_t *value)
-{
-  size_t send_length;
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  uint32_t server_key;
-  memcached_server_write_instance_st instance;
-  bool no_reply= ptr->flags.no_reply;
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
-    return MEMCACHED_BAD_KEY_PROVIDED;
-
-  server_key= memcached_generate_hash_with_redistribution(ptr, master_key, master_key_length);
-  instance= memcached_server_instance_fetch(ptr, server_key);
-
-  send_length= (size_t)snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                "%s %.*s%.*s %" PRIu64 "%s\r\n", verb,
-                                (int)ptr->prefix_key_length,
-                                ptr->prefix_key,
-                                (int)key_length, key,
-                                offset, no_reply ? " noreply" : "");
-  unlikely (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
-    return MEMCACHED_WRITE_FAILURE;
-
-  rc= memcached_do(instance, buffer, send_length, true);
-  if (no_reply || rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-
-  /*
-    So why recheck responce? Because the protocol is brain dead :)
-    The number returned might end up equaling one of the string
-    values. Less chance of a mistake with strncmp() so we will
-    use it. We still called memcached_response() though since it
-    worked its magic for non-blocking IO.
-  */
-  if (! strncmp(buffer, "ERROR\r\n", 7))
-  {
-    *value= 0;
-    rc= MEMCACHED_PROTOCOL_ERROR;
-  }
-  else if (! strncmp(buffer, "CLIENT_ERROR\r\n", 14))
-  {
-    *value= 0;
-    rc= MEMCACHED_PROTOCOL_ERROR;
-  }
-  else if (!strncmp(buffer, "NOT_FOUND\r\n", 11))
-  {
-    *value= 0;
-    rc= MEMCACHED_NOTFOUND;
-  }
-  else
-  {
-    *value= strtoull(buffer, (char **)NULL, 10);
-    rc= MEMCACHED_SUCCESS;
-  }
-
-  return rc;
-}
-
-static memcached_return_t binary_incr_decr(memcached_st *ptr, uint8_t cmd,
-                                           const char *master_key, size_t master_key_length,
-                                           const char *key, size_t key_length,
-                                           uint64_t offset, uint64_t initial,
-                                           uint32_t expiration,
-                                           uint64_t *value)
-{
-  uint32_t server_key;
-  memcached_server_write_instance_st instance;
-  bool no_reply= ptr->flags.no_reply;
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  server_key= memcached_generate_hash_with_redistribution(ptr, master_key, master_key_length);
-  instance= memcached_server_instance_fetch(ptr, server_key);
-
-  if (no_reply)
-  {
-    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}};
-
-  request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-  request.message.header.request.opcode= cmd;
-  request.message.header.request.keylen= htons((uint16_t)(key_length + ptr->prefix_key_length));
-  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 + ptr->prefix_key_length +  request.message.header.request.extlen));
-  request.message.body.delta= htonll(offset);
-  request.message.body.initial= htonll(initial);
-  request.message.body.expiration= htonl((uint32_t) expiration);
-
-  struct libmemcached_io_vector_st vector[]=
-  {
-    { .length= sizeof(request.bytes), .buffer= request.bytes },
-    { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-    { .length= key_length, .buffer= key }
-  };
-
-  memcached_return_t rc;
-  if ((rc= memcached_vdo(instance, vector, 3, true)) != MEMCACHED_SUCCESS)
-  {
-    memcached_io_reset(instance);
-    return (rc == MEMCACHED_SUCCESS) ? MEMCACHED_WRITE_FAILURE : rc;
-  }
-
-  if (no_reply)
-    return MEMCACHED_SUCCESS;
-  return memcached_response(instance, (char*)value, sizeof(*value), NULL);
-}
-
-memcached_return_t memcached_increment(memcached_st *ptr,
-                                       const char *key, size_t key_length,
-                                       uint32_t offset,
-                                       uint64_t *value)
-{
-  return memcached_increment_by_key(ptr, key, key_length, key, key_length, offset, value);
-}
-
-memcached_return_t memcached_decrement(memcached_st *ptr,
-                                       const char *key, size_t key_length,
-                                       uint32_t offset,
-                                       uint64_t *value)
-{
-  return memcached_decrement_by_key(ptr, key, key_length, key, key_length, offset, value);
-}
-
-memcached_return_t memcached_increment_by_key(memcached_st *ptr,
-                                              const char *master_key, size_t master_key_length,
-                                              const char *key, size_t key_length,
-                                              uint64_t offset,
-                                              uint64_t *value)
-{
-  memcached_return_t rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_START();
-  if (ptr->flags.binary_protocol)
-  {
-    rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_INCREMENT,
-                         master_key, master_key_length, key, key_length,
-                         (uint64_t)offset, 0, MEMCACHED_EXPIRATION_NOT_ADD,
-                         value);
-  }
-  else
-  {
-     rc= text_incr_decr(ptr, "incr", master_key, master_key_length, key, key_length, offset, value);
-  }
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_END();
-
-  return rc;
-}
-
-memcached_return_t memcached_decrement_by_key(memcached_st *ptr,
-                                              const char *master_key, size_t master_key_length,
-                                              const char *key, size_t key_length,
-                                              uint64_t offset,
-                                              uint64_t *value)
-{
-  memcached_return_t rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  LIBMEMCACHED_MEMCACHED_DECREMENT_START();
-  if (ptr->flags.binary_protocol)
-  {
-    rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_DECREMENT,
-                         master_key, master_key_length, key, key_length,
-                         (uint64_t)offset, 0, MEMCACHED_EXPIRATION_NOT_ADD,
-                         value);
-  }
-  else
-  {
-    rc= text_incr_decr(ptr, "decr", master_key, master_key_length, key, key_length, offset, value);
-  }
-
-  LIBMEMCACHED_MEMCACHED_DECREMENT_END();
-
-  return rc;
-}
-
-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)
-{
-  return memcached_increment_with_initial_by_key(ptr, key, key_length,
-                                                 key, key_length,
-                                                 offset, initial, expiration, value);
-}
-
-memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr,
-                                                         const char *master_key,
-                                                         size_t master_key_length,
-                                                         const char *key,
-                                                         size_t key_length,
-                                                         uint64_t offset,
-                                                         uint64_t initial,
-                                                         time_t expiration,
-                                                         uint64_t *value)
-{
-  memcached_return_t rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START();
-  if (ptr->flags.binary_protocol)
-    rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_INCREMENT,
-                         master_key, master_key_length, key, key_length,
-                         offset, initial, (uint32_t)expiration,
-                         value);
-  else
-    rc= MEMCACHED_PROTOCOL_ERROR;
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
-
-  return rc;
-}
-
-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)
-{
-  return memcached_decrement_with_initial_by_key(ptr, key, key_length,
-                                                 key, key_length,
-                                                 offset, initial, expiration, value);
-}
-
-memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr,
-                                                           const char *master_key,
-                                                           size_t master_key_length,
-                                                           const char *key,
-                                                           size_t key_length,
-                                                           uint64_t offset,
-                                                           uint64_t initial,
-                                                           time_t expiration,
-                                                           uint64_t *value)
-{
-  memcached_return_t rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START();
-  if (ptr->flags.binary_protocol)
-  {
-    rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_DECREMENT,
-                         master_key, master_key_length, key, key_length,
-                         offset, initial, (uint32_t)expiration,
-                         value);
-  }
-  else
-  {
-    rc= MEMCACHED_PROTOCOL_ERROR;
-  }
-
-  LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
-
-  return rc;
-}
-
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,85 +0,0 @@
-/* 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 the behavior of the memcached connection.
- *
- */
-
-#ifndef __LIBMEMCACHED_AUTO_H__
-#define __LIBMEMCACHED_AUTO_H__
-
-#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 *master_key, size_t master_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 *master_key, size_t master_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 *master_key,
-                                                         size_t master_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 *master_key,
-                                                         size_t master_key_length,
-                                                         const char *key,
-                                                         size_t key_length,
-                                                         uint64_t offset,
-                                                         uint64_t initial,
-                                                         time_t expiration,
-                                                         uint64_t *value);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_AUTO_H__ */
@@ -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 <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#if defined(HAVE_SHARED_ENABLED) && HAVE_SHARED_ENABLED
+
+#ifdef HAVE_EXECINFO_H
+#include <execinfo.h>
+#endif
+
+#ifdef HAVE_GCC_ABI_DEMANGLE
+# include <cxxabi.h>
+# define USE_DEMANGLE 1
+#else
+# define USE_DEMANGLE 0
+#endif
+
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#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= "<unresolved>";
+            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
@@ -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
@@ -1,422 +0,0 @@
-/* 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 the behavior of the memcached connection.
- *
- */
-
-#include "common.h"
-#include <time.h>
-#include <sys/types.h>
-
-static bool set_flag(uint64_t data)
-{
-  // Wordy :)
-  return data ? true : 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 *ptr,
-                                          const memcached_behavior_t flag,
-                                          uint64_t data)
-{
-  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_SERVER_FAILURE_LIMIT:
-    ptr->server_failure_limit= (uint32_t)data;
-    break;
-  case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL:
-    memcached_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= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_SUPPORT_CAS:
-    ptr->flags.support_cas= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_NO_BLOCK:
-    ptr->flags.no_block= set_flag(data);
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS:
-    ptr->flags.buffer_requests= set_flag(data);
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_USE_UDP:
-    if (memcached_server_count(ptr))
-    {
-      return MEMCACHED_FAILURE;
-    }
-    ptr->flags.use_udp= set_flag(data);
-    if (data)
-    {
-      ptr->flags.no_reply= set_flag(data);
-    }
-    break;
-  case MEMCACHED_BEHAVIOR_TCP_NODELAY:
-    ptr->flags.tcp_nodelay= set_flag(data);
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE:
-    ptr->flags.tcp_keepalive= set_flag(data);
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_DISTRIBUTION:
-    return memcached_behavior_set_distribution(ptr, (memcached_server_distribution_t)data);
-  case MEMCACHED_BEHAVIOR_KETAMA:
-    {
-      if (data)
-      {
-        (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_MD5);
-        (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_MD5);
-        (void)memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA);
-      }
-      else
-      {
-        (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_DEFAULT);
-        (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_DEFAULT);
-        (void)memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_MODULA);
-      }
-
-      break;
-    }
-  case MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED:
-    {
-      (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_MD5);
-      (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_MD5);
-      ptr->flags.ketama_weighted= set_flag(data);
-      /**
-        @note We try to keep the same distribution going. This should be deprecated and rewritten.
-      */
-      return memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA);
-    }
-  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:
-    ptr->flags.use_cache_lookups= set_flag(data);
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_VERIFY_KEY:
-    if (ptr->flags.binary_protocol)
-      return MEMCACHED_FAILURE;
-    ptr->flags.verify_key= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_SORT_HOSTS:
-    {
-      ptr->flags.use_sort_hosts= set_flag(data);
-      run_distribution(ptr);
-
-      break;
-    }
-  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_SOCKET_SEND_SIZE:
-    ptr->send_size= (int32_t)data;
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE:
-    ptr->recv_size= (int32_t)data;
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_TCP_KEEPIDLE:
-    ptr->tcp_keepidle= (uint32_t)data;
-    memcached_quit(ptr);
-    break;
-  case MEMCACHED_BEHAVIOR_USER_DATA:
-    return MEMCACHED_FAILURE;
-  case MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY:
-    ptr->flags.hash_with_prefix_key= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_NOREPLY:
-    ptr->flags.no_reply= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS:
-    ptr->flags.auto_eject_hosts= set_flag(data);
-    break;
-  case MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ:
-      srandom((uint32_t) time(NULL));
-      ptr->flags.randomize_replica_read= set_flag(data);
-      break;
-  case MEMCACHED_BEHAVIOR_CORK:
-      {
-        memcached_server_write_instance_st instance;
-        bool action= set_flag(data);
-
-        if (action == false)
-        {
-          ptr->flags.cork= set_flag(false);
-          return MEMCACHED_SUCCESS;
-        }
-
-        instance= memcached_server_instance_fetch(ptr, 0);
-        if (! instance)
-          return MEMCACHED_NO_SERVERS;
-
-
-        /* We just try the first host, and if it is down we return zero */
-        memcached_return_t rc;
-        rc= memcached_connect(instance);
-        if (rc != MEMCACHED_SUCCESS)
-        {
-          return rc;
-        }
-
-        /* Now we test! */
-        memcached_ternary_t enabled;
-        enabled= test_cork(instance, true);
-
-        switch (enabled)
-        {
-        case MEM_FALSE:
-          return ptr->cached_errno ? MEMCACHED_ERRNO : MEMCACHED_FAILURE ;
-        case MEM_TRUE:
-          {
-            enabled= test_cork(instance, false);
-
-            if (enabled == false) // Possible bug in OS?
-            {
-              memcached_quit_server(instance, false); // We should reset everything on this error.
-              return MEMCACHED_ERRNO;  // Errno will be true because we will have already set it.
-            }
-            ptr->flags.cork= true;
-            ptr->flags.tcp_nodelay= true;
-            memcached_quit(ptr); // We go on and reset the connections.
-          }
-          break;
-        case MEM_NOT:
-        default:
-          return MEMCACHED_NOT_SUPPORTED;
-        }
-      }
-      break;
-  case MEMCACHED_BEHAVIOR_MAX:
-  default:
-    /* Shouldn't get here */
-    WATCHPOINT_ASSERT(0);
-    return MEMCACHED_FAILURE;
-  }
-
-  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 *ptr,
-                                const memcached_behavior_t flag)
-{
-  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 ptr->flags.use_cache_lookups;
-  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 ptr->flags.use_udp;
-  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:
-    return ptr->flags.ketama_weighted;
-  case MEMCACHED_BEHAVIOR_DISTRIBUTION:
-    return ptr->distribution;
-  case MEMCACHED_BEHAVIOR_KETAMA:
-    return (ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA) ? (uint64_t) 1 : 0;
-  case MEMCACHED_BEHAVIOR_HASH:
-    return hashkit_get_function(&ptr->hashkit);
-  case MEMCACHED_BEHAVIOR_KETAMA_HASH:
-    return hashkit_get_function(&ptr->distribution_hashkit);
-  case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT:
-    return ptr->server_failure_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_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);
-      memcached_server_write_instance_st instance;
-
-      if (ptr->send_size != -1) // If value is -1 then we are using the default
-        return (uint64_t) ptr->send_size;
-
-      instance= memcached_server_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_connect(instance)) != MEMCACHED_SUCCESS)
-          return 0;
-
-        if (getsockopt(instance->fd, SOL_SOCKET,
-                       SO_SNDBUF, &sock_size, &sock_length))
-          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);
-      memcached_server_write_instance_st instance;
-
-      if (ptr->recv_size != -1) // If value is -1 then we are using the default
-        return (uint64_t) ptr->recv_size;
-
-      instance= memcached_server_instance_fetch(ptr, 0);
-
-      /**
-        @note REFACTOR
-      */
-      if (instance)
-      {
-        /* We just try the first host, and if it is down we return zero */
-        if ((memcached_connect(instance)) != MEMCACHED_SUCCESS)
-          return 0;
-
-        if (getsockopt(instance->fd, SOL_SOCKET,
-                       SO_RCVBUF, &sock_size, &sock_length))
-          return 0; /* Zero means error */
-
-      }
-
-      return (uint64_t) sock_size;
-    }
-  case MEMCACHED_BEHAVIOR_USER_DATA:
-    return MEMCACHED_FAILURE;
-  case MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY:
-    return ptr->flags.hash_with_prefix_key;
-  case MEMCACHED_BEHAVIOR_NOREPLY:
-    return ptr->flags.no_reply;
-  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:
-    return ptr->flags.cork;
-  case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE:
-    return ptr->flags.tcp_keepalive;
-  case MEMCACHED_BEHAVIOR_MAX:
-  default:
-    WATCHPOINT_ASSERT(0); /* Programming mistake if it gets this far */
-    return 0;
-  }
-
-  /* NOTREACHED */
-}
-
-
-memcached_return_t memcached_behavior_set_distribution(memcached_st *ptr, memcached_server_distribution_t type)
-{
-  if (type < MEMCACHED_DISTRIBUTION_CONSISTENT_MAX)
-  {
-    ptr->distribution= type;
-    run_distribution(ptr);
-  }
-  else
-  {
-    return MEMCACHED_FAILURE;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-
-memcached_server_distribution_t memcached_behavior_get_distribution(memcached_st *ptr)
-{
-  return ptr->distribution;
-}
-
-memcached_return_t memcached_behavior_set_key_hash(memcached_st *ptr, memcached_hash_t type)
-{
-  hashkit_return_t rc;
-  rc= hashkit_set_function(&ptr->hashkit, (hashkit_hash_algorithm_t)type);
-
-  return rc == HASHKIT_SUCCESS ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE;
-}
-
-memcached_hash_t memcached_behavior_get_key_hash(memcached_st *ptr)
-{
-  return (memcached_hash_t)hashkit_get_function(&ptr->hashkit);
-}
-
-memcached_return_t memcached_behavior_set_distribution_hash(memcached_st *ptr, memcached_hash_t type)
-{
-  hashkit_return_t rc;
-  rc= hashkit_set_function(&ptr->distribution_hashkit, (hashkit_hash_algorithm_t)type);
-
-  return rc == HASHKIT_SUCCESS ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE;
-}
-
-memcached_hash_t memcached_behavior_get_distribution_hash(memcached_st *ptr)
-{
-  return (memcached_hash_t)hashkit_get_function(&ptr->distribution_hashkit);
-}
@@ -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 <libmemcached/common.h>
+#include <libmemcached/options.hpp>
+#include <libmemcached/virtual_bucket.h>
+
+#include <ctime>
+#include <sys/types.h>
+
+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;
+}
@@ -1,51 +0,0 @@
-/* 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 the behavior of the memcached connection.
- *
- */
-
-#ifndef __LIBMEMCACHED_BEHAVIOR_H__
-#define __LIBMEMCACHED_BEHAVIOR_H__
-
-#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_LOCAL
-bool _is_auto_eject_host(const memcached_st *ptr);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_BEHAVIOR_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
+
+bool memcached_is_consistent_distribution(const memcached_st*);
+bool _is_auto_eject_host(const memcached_st *ptr);
@@ -1,43 +0,0 @@
-/* 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:
- *
- */
-
-#include "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)
-{
-  return swap64(value);
-}
-
-uint64_t memcached_htonll(uint64_t value)
-{
-  return swap64(value);
-}
@@ -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.
+ *
+ */
+
+#include "mem_config.h"
+#include "libmemcached/byteorder.h"
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+/* 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
+}
@@ -1,51 +1,50 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary:
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_BYTEORDER_H__
-#define __LIBMEMCACHED_BYTEORDER_H__
+#pragma once
 
-#include "config.h"
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
+#ifdef __cplusplus
+extern "C" {
 #endif
 
-
-/* Define this here, which will turn on the visibilty controls while we're
- * building libmemcached.
- */
-#define BUILDING_LIBMEMCACHED 1
-
-#include "libmemcached/memcached.h"
-
-#ifndef HAVE_HTONLL
-#define ntohll(a) memcached_ntohll(a)
-#define htonll(a) memcached_htonll(a)
-
-LIBMEMCACHED_LOCAL
 uint64_t memcached_ntohll(uint64_t);
-LIBMEMCACHED_LOCAL
+
 uint64_t memcached_htonll(uint64_t);
-#endif
 
-#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
+#ifdef __cplusplus
+}
 #endif
-
-#endif /*__LIBMEMCACHED_BYTEORDER_H__ */
@@ -1,186 +0,0 @@
-/* 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 "common.h"
-#include <sys/types.h>
-
-/*
-  These functions provide data and function callback support
-*/
-
-memcached_return_t memcached_callback_set(memcached_st *ptr,
-                                          const memcached_callback_t flag,
-                                          void *data)
-{
-  switch (flag)
-  {
-  case MEMCACHED_CALLBACK_PREFIX_KEY:
-    {
-      char *key= (char *)data;
-
-      if (key)
-      {
-        size_t key_length= strlen(key);
-
-        if (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)
-        {
-          return MEMCACHED_BAD_KEY_PROVIDED;
-        }
-
-        if ((key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1)
-            || (strncpy(ptr->prefix_key, key, MEMCACHED_PREFIX_KEY_MAX_SIZE) == NULL))
-        {
-          ptr->prefix_key_length= 0;
-          return MEMCACHED_BAD_KEY_PROVIDED;
-        }
-        else
-        {
-          ptr->prefix_key_length= key_length;
-        }
-      }
-      else
-      {
-        ptr->prefix_key[0]= 0;
-        ptr->prefix_key_length= 0;
-      }
-
-      break;
-    }
-  case MEMCACHED_CALLBACK_USER_DATA:
-    {
-      ptr->user_data= 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;
-    }
-#ifdef MEMCACHED_ENABLE_DEPRECATED
-  case MEMCACHED_CALLBACK_MALLOC_FUNCTION:
-    {
-      memcached_malloc_function func= *(memcached_malloc_fn *)&data;
-      ptr->call_malloc= func;
-      break;
-    }
-  case MEMCACHED_CALLBACK_REALLOC_FUNCTION:
-    {
-      memcached_realloc_function func= *(memcached_realloc_fn *)&data;
-      ptr->call_realloc= func;
-      break;
-    }
-  case MEMCACHED_CALLBACK_FREE_FUNCTION:
-    {
-      memcached_free_function func= *(memcached_free_fn *)&data;
-      ptr->call_free= func;
-      break;
-    }
-#endif
-  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:
-    {
-      memcached_trigger_delete_key_fn func= *(memcached_trigger_delete_key_fn *)&data;
-      ptr->delete_trigger= func;
-      break;
-    }
-  case MEMCACHED_CALLBACK_MAX:
-  default:
-    return MEMCACHED_FAILURE;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-void *memcached_callback_get(memcached_st *ptr,
-                             const memcached_callback_t flag,
-                             memcached_return_t *error)
-{
-  memcached_return_t local_error;
-
-  if (!error)
-    error = &local_error;
-
-  switch (flag)
-  {
-  case MEMCACHED_CALLBACK_PREFIX_KEY:
-    {
-      if (ptr->prefix_key_length)
-      {
-        *error= MEMCACHED_SUCCESS;
-        return (void *)ptr->prefix_key;
-      }
-      else
-      {
-        *error= MEMCACHED_FAILURE;
-        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;
-    }
-#ifdef MEMCACHED_ENABLE_DEPRECATED
-  case MEMCACHED_CALLBACK_MALLOC_FUNCTION:
-    {
-      *error= ptr->call_malloc ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE;
-      return *(void **)&ptr->call_malloc;
-    }
-  case MEMCACHED_CALLBACK_REALLOC_FUNCTION:
-    {
-      *error= ptr->call_realloc ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE;
-      return *(void **)&ptr->call_realloc;
-    }
-  case MEMCACHED_CALLBACK_FREE_FUNCTION:
-    {
-      *error= ptr->call_free ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE;
-      return *(void **)&ptr->call_free;
-    }
-#endif
-  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:
-  default:
-    WATCHPOINT_ASSERT(0);
-    *error= MEMCACHED_FAILURE;
-    return NULL;
-  }
-}
@@ -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 <libmemcached/common.h>
+#include <sys/types.h>
+
+#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<void *>(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;
+}
@@ -1,38 +0,0 @@
-/* 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.
- *
- */
-
-#ifndef __LIBMEMCACHED_CALLBACK_H__
-#define __LIBMEMCACHED_CALLBACK_H__
-
-struct memcached_callback_st {
-  memcached_execute_fn *callback;
-  void *context;
-  uint32_t number_of_callback;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-memcached_return_t memcached_callback_set(memcached_st *ptr,
-                                          const memcached_callback_t flag,
-                                          void *data);
-LIBMEMCACHED_API
-void *memcached_callback_get(memcached_st *ptr,
-                             const memcached_callback_t flag,
-                             memcached_return_t *error);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_CALLBACK_H__ */
@@ -1,11 +1,38 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  LibMemcached
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker
+ *  All rights reserved.
  *
- * Summary:
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
@@ -13,77 +40,140 @@
   Common include file for libmemached
 */
 
-#ifndef __LIBMEMCACHED_COMMON_H__
-#define __LIBMEMCACHED_COMMON_H__
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
+#pragma once
+
+#include <mem_config.h>
+
+#ifdef __cplusplus
+# include <cstddef>
+# include <cstdio>
+# include <cstdlib>
+# include <cstring>
+# include <ctime>
+# include <cctype>
+# include <cerrno>
+# include <climits>
 #else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
+# ifdef HAVE_STDDEF_H
+#  include <stddef.h>
+# endif
+# ifdef HAVE_STDLIB_H
+#  include <stdio.h>
+# endif
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+# include <string.h>
+# ifdef HAVE_TIME_H
 #  include <time.h>
 # endif
+# ifdef HAVE_ERRNO_H
+#  include <errno.h>
+# endif
+# ifdef HAVE_LIMITS_H
+#  include <limits.h>
+# endif
 #endif
 
-/* Define this here, which will turn on the visibilty controls while we're
- * building libmemcached.
- */
-#define BUILDING_LIBMEMCACHED 1
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
 
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
 
-#include "libmemcached/memcached.h"
-#include "libmemcached/watchpoint.h"
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
 
-typedef struct memcached_server_st * memcached_server_write_instance_st;
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
 
-typedef memcached_return_t (*memcached_server_execute_fn)(memcached_st *ptr, memcached_server_write_instance_st server, void *context);
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
-LIBMEMCACHED_LOCAL
-memcached_server_write_instance_st memcached_server_instance_fetch(memcached_st *ptr, uint32_t server_key);
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
 
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_server_execute(memcached_st *ptr,
-                                            memcached_server_execute_fn callback,
-                                            void *context);
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
 
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
+#if defined(_WIN32)
+# include "libmemcached/windows.hpp"
+#endif
+
+#include <libmemcached-1.0/memcached.h>
+#include "libmemcached/watchpoint.h"
+#include "libmemcached/is.h"
+typedef struct memcached_st Memcached;
+
+#ifdef HAVE_POLL_H
+# include <poll.h>
+#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"
-#include "libmemcached/do.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/memcached/protocol_binary.h"
 #include "libmemcached/byteorder.h"
-#include "libmemcached/response.h"
+#include "libmemcached/initialize_query.h"
 
-/* string value */
-struct memcached_continuum_item_st
-{
-  uint32_t index;
-  uint32_t value;
-};
+#ifdef __cplusplus
+# include "libmemcached/response.h"
+# include "libmemcached/namespace.h"
+#else
+# include "libmemcached/virtual_bucket.h"
+#endif
 
-/* Yum, Fortran.... can you make the reference? */
-typedef enum {
-  MEM_NOT= -1,
-  MEM_FALSE= false,
-  MEM_TRUE= true
-} memcached_ternary_t;
+#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)
 
@@ -105,125 +195,28 @@ typedef enum {
 extern "C" {
 #endif
 
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_connect(memcached_server_write_instance_st ptr);
-
-LIBMEMCACHED_LOCAL
 memcached_return_t run_distribution(memcached_st *ptr);
 
-#define memcached_server_response_increment(A) (A)->cursor_active++
-#define memcached_server_response_decrement(A) (A)->cursor_active--
-#define memcached_server_response_reset(A) (A)->cursor_active=0
-
-// These are private 
-#define memcached_is_allocated(__object) ((__object)->options.is_allocated)
-#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_set_purging(__object, __value) ((__object)->state.is_purging= (__value))
-#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))
-
-LIBMEMCACHED_LOCAL
-void set_last_disconnected_host(memcached_server_write_instance_st ptr);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_key_test(const char * const *keys,
-                                      const size_t *key_length,
-                                      size_t number_of_keys);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_purge(memcached_server_write_instance_st ptr);
-
-LIBMEMCACHED_LOCAL
-memcached_server_st *memcached_server_create_with(const memcached_st *memc,
-                                                  memcached_server_write_instance_st host,
-                                                  const char *hostname,
-                                                  in_port_t port,
-                                                  uint32_t weight,
-                                                  memcached_connection_t type);
-
-
-static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
+#ifdef __cplusplus
+static inline void memcached_server_response_increment(memcached_instance_st* instance)
 {
-  unlikely (key_length == 0)
-    return MEMCACHED_BAD_KEY_PROVIDED;
-
-  if (binary)
-  {
-    unlikely (key_length > 0xffff)
-      return MEMCACHED_BAD_KEY_PROVIDED;
-  }
-  else
-  {
-    unlikely (key_length >= MEMCACHED_MAX_KEY)
-      return MEMCACHED_BAD_KEY_PROVIDED;
-  }
-
-  return MEMCACHED_SUCCESS;
+  instance->events(POLLIN);
+  instance->cursor_active_++;
 }
-
-#ifdef TCP_CORK
-  #define CORK TCP_CORK
-#elif defined TCP_NOPUSH
-  #define CORK TCP_NOPUSH
 #endif
 
-/*
-  test_cork() tries to enable TCP_CORK. IF TCP_CORK is not an option
-  on the system it returns false but sets errno to 0. Otherwise on
-  failure errno is set.
-*/
-static inline memcached_ternary_t test_cork(memcached_server_st *ptr, int enable)
-{
-#ifdef CORK
-  if (ptr->type != MEMCACHED_CONNECTION_TCP)
-    return MEM_FALSE;
-
-  int err= setsockopt(ptr->fd, IPPROTO_TCP, CORK,
-                      &enable, (socklen_t)sizeof(int));
-  if (! err)
-  {
-    return MEM_TRUE;
-  }
-
-  perror(strerror(errno));
-  ptr->cached_errno= errno;
-
-  return MEM_FALSE;
-#else
-  (void)ptr;
-  (void)enable;
+#define memcached_server_response_decrement(A) (A)->cursor_active_--
+#define memcached_server_response_reset(A) (A)->cursor_active_=0
 
-  ptr->cached_errno= 0;
-
-  return MEM_NOT;
-#endif
-}
-
-static inline void libmemcached_free(const memcached_st *ptr, void *mem)
-{
-  ptr->allocators.free(ptr, mem, ptr->allocators.context);
-}
-
-static inline void *libmemcached_malloc(const memcached_st *ptr, const size_t size)
-{
-  return ptr->allocators.malloc(ptr, size, ptr->allocators.context);
-}
-
-static inline void *libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size)
-{
-  return ptr->allocators.realloc(ptr, mem, size, ptr->allocators.context);
-}
-
-static inline void *libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size)
-{
-  return ptr->allocators.calloc(ptr, nelem, size, ptr->allocators.context);
-}
+#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
 
-#endif /* __LIBMEMCACHED_COMMON_H__ */
+#ifdef __cplusplus
+bool memcached_purge(memcached_instance_st*);
+memcached_instance_st* memcached_instance_by_position(const memcached_st *ptr, uint32_t server_key);
+#endif
@@ -1,29 +0,0 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 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: Change the behavior of the memcached connection.
- *
- */
-
-#ifndef __LIBMEMCACHED_CONFIGURE_H
-#define __LIBMEMCACHED_CONFIGURE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-@DEPRECATED@
-@LIBMEMCACHED_WITH_SASL_SUPPORT@
-
-#define LIBMEMCACHED_VERSION_STRING "@VERSION@"
-#define LIBMEMCACHED_VERSION_HEX @PANDORA_HEX_VERSION@
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_CONFIGURE_H */
@@ -1,573 +0,0 @@
-/* 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: Server IO, Not public!
- *
- */
-
-#include "common.h"
-#include <sys/time.h>
-#include <time.h>
-
-static memcached_return_t connect_poll(memcached_server_st *ptr)
-{
-  struct pollfd fds[1];
-  fds[0].fd = ptr->fd;
-  fds[0].events = POLLOUT;
-
-  int timeout= ptr->root->connect_timeout;
-  if (ptr->root->flags.no_block == true)
-    timeout= -1;
-
-  int error;
-  size_t loop_max= 5;
-
-  while (--loop_max) // Should only loop on cases of ERESTART or EINTR
-  {
-    error= poll(fds, 1, timeout);
-
-    switch (error)
-    {
-    case 1:
-      {
-        int err;
-        socklen_t len= sizeof (err);
-        (void)getsockopt(ptr->fd, SOL_SOCKET, SO_ERROR, &err, &len);
-
-        // We check the value to see what happened wth the socket.
-        if (err == 0)
-        {
-          return MEMCACHED_SUCCESS;
-        }
-        else
-        {
-          ptr->cached_errno= errno;
-
-          return MEMCACHED_ERRNO;
-        }
-      }
-    case 0:
-      return MEMCACHED_TIMEOUT;
-    default: // A real error occurred and we need to completely bail
-      WATCHPOINT_ERRNO(get_socket_errno());
-      switch (get_socket_errno())
-      {
-#ifdef TARGET_OS_LINUX
-      case ERESTART:
-#endif
-      case EINTR:
-        continue;
-      default:
-        if (fds[0].revents & POLLERR)
-        {
-          int err;
-          socklen_t len= sizeof (err);
-          (void)getsockopt(ptr->fd, SOL_SOCKET, SO_ERROR, &err, &len);
-          ptr->cached_errno= (err == 0) ? get_socket_errno() : err;
-        }
-        else
-        {
-          ptr->cached_errno= get_socket_errno();
-        }
-
-        (void)closesocket(ptr->fd);
-        ptr->fd= INVALID_SOCKET;
-
-        return MEMCACHED_ERRNO;
-      }
-    }
-  }
-
-  // This should only be possible from ERESTART or EINTR;
-  ptr->cached_errno= get_socket_errno();
-
-  return MEMCACHED_ERRNO;
-}
-
-static memcached_return_t set_hostinfo(memcached_server_st *server)
-{
-  struct addrinfo *ai;
-  struct addrinfo hints;
-  char str_port[NI_MAXSERV];
-  uint32_t counter= 5;
-
-  snprintf(str_port, NI_MAXSERV, "%u", (uint32_t)server->port);
-
-  memset(&hints, 0, sizeof(hints));
-
- // hints.ai_family= AF_INET;
-  if (server->type == MEMCACHED_CONNECTION_UDP)
-  {
-    hints.ai_protocol= IPPROTO_UDP;
-    hints.ai_socktype= SOCK_DGRAM;
-  }
-  else
-  {
-    hints.ai_socktype= SOCK_STREAM;
-    hints.ai_protocol= IPPROTO_TCP;
-  }
-
-  while (--counter)
-  {
-    int e= getaddrinfo(server->hostname, str_port, &hints, &ai);
-
-    if (e == 0)
-    {
-      break;
-    }
-    else if (e == EAI_AGAIN)
-    {
-#ifndef WIN32
-      struct timespec dream, rem;
-
-      dream.tv_nsec= 1000;
-      dream.tv_sec= 0;
-
-      nanosleep(&dream, &rem);
-#endif
-      continue;
-    }
-    else
-    {
-      WATCHPOINT_STRING(server->hostname);
-      WATCHPOINT_STRING(gai_strerror(e));
-      return MEMCACHED_HOST_LOOKUP_FAILURE;
-    }
-  }
-
-  if (server->address_info)
-  {
-    freeaddrinfo(server->address_info);
-    server->address_info= NULL;
-  }
-  server->address_info= ai;
-
-  return MEMCACHED_SUCCESS;
-}
-
-static inline memcached_return_t set_socket_nonblocking(memcached_server_st *ptr)
-{
-#ifdef WIN32
-  u_long arg = 1;
-  if (ioctlsocket(ptr->fd, FIONBIO, &arg) == SOCKET_ERROR)
-  {
-    ptr->cached_errno= get_socket_errno();
-    return MEMCACHED_CONNECTION_FAILURE;
-  }
-#else
-  int flags;
-
-  do
-    flags= fcntl(ptr->fd, F_GETFL, 0);
-  while (flags == -1 && (errno == EINTR || errno == EAGAIN));
-
-  unlikely (flags == -1)
-  {
-    ptr->cached_errno= errno;
-    return MEMCACHED_CONNECTION_FAILURE;
-  }
-  else if ((flags & O_NONBLOCK) == 0)
-  {
-    int rval;
-
-    do
-      rval= fcntl(ptr->fd, F_SETFL, flags | O_NONBLOCK);
-    while (rval == -1 && (errno == EINTR || errno == EAGAIN));
-
-    unlikely (rval == -1)
-    {
-      ptr->cached_errno= errno;
-      return MEMCACHED_CONNECTION_FAILURE;
-    }
-  }
-#endif
-  return MEMCACHED_SUCCESS;
-}
-
-static memcached_return_t set_socket_options(memcached_server_st *ptr)
-{
-  WATCHPOINT_ASSERT(ptr->fd != -1);
-
-  if (ptr->type == MEMCACHED_CONNECTION_UDP)
-    return MEMCACHED_SUCCESS;
-
-#ifdef HAVE_SNDTIMEO
-  if (ptr->root->snd_timeout)
-  {
-    int error;
-    struct timeval waittime;
-
-    waittime.tv_sec= 0;
-    waittime.tv_usec= ptr->root->snd_timeout;
-
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_SNDTIMEO,
-                      &waittime, (socklen_t)sizeof(struct timeval));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-#endif
-
-#ifdef HAVE_RCVTIMEO
-  if (ptr->root->rcv_timeout)
-  {
-    int error;
-    struct timeval waittime;
-
-    waittime.tv_sec= 0;
-    waittime.tv_usec= ptr->root->rcv_timeout;
-
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_RCVTIMEO,
-                      &waittime, (socklen_t)sizeof(struct timeval));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-#endif
-
-
-#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
-  {
-    int set = 1;
-    int error= setsockopt(ptr->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int));
-
-    // This is not considered a fatal error
-    if (error == -1)
-    {
-      WATCHPOINT_ERRNO(get_socket_errno());
-      perror("setsockopt(SO_NOSIGPIPE)");
-    }
-  }
-#endif
-
-  if (ptr->root->flags.no_block)
-  {
-    int error;
-    struct linger linger;
-
-    linger.l_onoff= 1;
-    linger.l_linger= 0; /* By default on close() just drop the socket */
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_LINGER,
-                      &linger, (socklen_t)sizeof(struct linger));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-
-  if (ptr->root->flags.tcp_nodelay)
-  {
-    int flag= 1;
-    int error;
-
-    error= setsockopt(ptr->fd, IPPROTO_TCP, TCP_NODELAY,
-                      &flag, (socklen_t)sizeof(int));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-
-  if (ptr->root->flags.tcp_keepalive)
-  {
-    int flag= 1;
-    int error;
-
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_KEEPALIVE,
-                      &flag, (socklen_t)sizeof(int));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-
-#ifdef TCP_KEEPIDLE
-  if (ptr->root->tcp_keepidle > 0)
-  {
-    int error;
-
-    error= setsockopt(ptr->fd, IPPROTO_TCP, TCP_KEEPIDLE,
-                      &ptr->root->tcp_keepidle, (socklen_t)sizeof(int));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-#endif
-
-  if (ptr->root->send_size > 0)
-  {
-    int error;
-
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_SNDBUF,
-                      &ptr->root->send_size, (socklen_t)sizeof(int));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-
-  if (ptr->root->recv_size > 0)
-  {
-    int error;
-
-    error= setsockopt(ptr->fd, SOL_SOCKET, SO_RCVBUF,
-                      &ptr->root->recv_size, (socklen_t)sizeof(int));
-    WATCHPOINT_ASSERT(error == 0);
-    if (error)
-      return MEMCACHED_FAILURE;
-  }
-
-
-  /* libmemcached will always use nonblocking IO to avoid write deadlocks */
-  return set_socket_nonblocking(ptr);
-}
-
-static memcached_return_t unix_socket_connect(memcached_server_st *ptr)
-{
-#ifndef WIN32
-  struct sockaddr_un servAddr;
-
-  WATCHPOINT_ASSERT(ptr->fd == -1);
-
-  if ((ptr->fd= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
-  {
-    ptr->cached_errno= errno;
-    return MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE;
-  }
-
-  memset(&servAddr, 0, sizeof (struct sockaddr_un));
-  servAddr.sun_family= AF_UNIX;
-  strcpy(servAddr.sun_path, ptr->hostname); /* Copy filename */
-
-test_connect:
-  if (connect(ptr->fd,
-              (struct sockaddr *)&servAddr,
-              sizeof(servAddr)) < 0)
-  {
-    switch (errno)
-    {
-    case EINPROGRESS:
-    case EALREADY:
-    case EINTR:
-      goto test_connect;
-    case EISCONN: /* We were spinning waiting on connect */
-      break;
-    default:
-      WATCHPOINT_ERRNO(errno);
-      ptr->cached_errno= errno;
-      return MEMCACHED_ERRNO;
-    }
-  }
-
-  WATCHPOINT_ASSERT(ptr->fd != -1);
-
-  return MEMCACHED_SUCCESS;
-#else
-  (void)ptr;
-  return MEMCACHED_NOT_SUPPORTED;
-#endif
-}
-
-static memcached_return_t network_connect(memcached_server_st *ptr)
-{
-  bool timeout_error_occured= false;
-
-
-  WATCHPOINT_ASSERT(ptr->fd == INVALID_SOCKET);
-  WATCHPOINT_ASSERT(ptr->cursor_active == 0);
-
-  if (! ptr->options.sockaddr_inited || (!(ptr->root->flags.use_cache_lookups)))
-  {
-    memcached_return_t rc;
-
-    rc= set_hostinfo(ptr);
-    if (rc != MEMCACHED_SUCCESS)
-      return rc;
-    ptr->options.sockaddr_inited= true;
-  }
-
-  struct addrinfo *use= ptr->address_info;
-  /* Create the socket */
-  while (use != NULL)
-  {
-    /* Memcache server does not support IPV6 in udp mode, so skip if not ipv4 */
-    if (ptr->type == MEMCACHED_CONNECTION_UDP && use->ai_family != AF_INET)
-    {
-      use= use->ai_next;
-      continue;
-    }
-
-    if ((ptr->fd= socket(use->ai_family,
-                         use->ai_socktype,
-                         use->ai_protocol)) < 0)
-    {
-      ptr->cached_errno= get_socket_errno();
-      WATCHPOINT_ERRNO(get_socket_errno());
-      return MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE;
-    }
-
-    (void)set_socket_options(ptr);
-
-    /* connect to server */
-    if ((connect(ptr->fd, use->ai_addr, use->ai_addrlen) != SOCKET_ERROR))
-    {
-      break; // Success
-    }
-
-    /* An error occurred */
-    ptr->cached_errno= get_socket_errno();
-    if (ptr->cached_errno == EWOULDBLOCK ||
-        ptr->cached_errno == EINPROGRESS || /* nonblocking mode - first return, */
-        ptr->cached_errno == EALREADY) /* nonblocking mode - subsequent returns */
-    {
-      memcached_return_t rc;
-      rc= connect_poll(ptr);
-
-      if (rc == MEMCACHED_TIMEOUT)
-        timeout_error_occured= true;
-
-      if (rc == MEMCACHED_SUCCESS)
-        break;
-    }
-    else if (get_socket_errno() == EISCONN) /* we are connected :-) */
-    {
-      break;
-    }
-    else if (get_socket_errno() == EINTR) // Special case, we retry ai_addr
-    {
-      (void)closesocket(ptr->fd);
-      ptr->fd= INVALID_SOCKET;
-      continue;
-    }
-
-    (void)closesocket(ptr->fd);
-    ptr->fd= INVALID_SOCKET;
-    use= use->ai_next;
-  }
-
-  if (ptr->fd == INVALID_SOCKET)
-  {
-    WATCHPOINT_STRING("Never got a good file descriptor");
-
-    /* Failed to connect. schedule next retry */
-    if (ptr->root->retry_timeout)
-    {
-      struct timeval next_time;
-
-      if (gettimeofday(&next_time, NULL) == 0)
-        ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout;
-    }
-
-    if (timeout_error_occured)
-      return MEMCACHED_TIMEOUT;
-
-    return MEMCACHED_ERRNO; /* The last error should be from connect() */
-  }
-
-  return MEMCACHED_SUCCESS; /* The last error should be from connect() */
-}
-
-void set_last_disconnected_host(memcached_server_write_instance_st ptr)
-{
-  // const_cast
-  memcached_st *root= (memcached_st *)ptr->root;
-
-#if 0
-  WATCHPOINT_STRING(ptr->hostname);
-  WATCHPOINT_NUMBER(ptr->port);
-  WATCHPOINT_ERRNO(ptr->cached_errno);
-#endif
-  if (root->last_disconnected_server)
-    memcached_server_free(root->last_disconnected_server);
-  root->last_disconnected_server= memcached_server_clone(NULL, ptr);
-}
-
-memcached_return_t memcached_connect(memcached_server_write_instance_st ptr)
-{
-  memcached_return_t rc= MEMCACHED_NO_SERVERS;
-
-  if (ptr->fd != INVALID_SOCKET)
-    return MEMCACHED_SUCCESS;
-
-  LIBMEMCACHED_MEMCACHED_CONNECT_START();
-
-  /* both retry_timeout and server_failure_limit must be set in order to delay retrying a server on error. */
-  WATCHPOINT_ASSERT(ptr->root);
-  if (ptr->root->retry_timeout && ptr->next_retry)
-  {
-    struct timeval curr_time;
-
-    gettimeofday(&curr_time, NULL);
-
-    // We should optimize this to remove the allocation if the server was
-    // the last server to die
-    if (ptr->next_retry > curr_time.tv_sec)
-    {
-      set_last_disconnected_host(ptr);
-
-      return MEMCACHED_SERVER_MARKED_DEAD;
-    }
-  }
-
-  // If we are over the counter failure, we just fail. Reject host only
-  // works if you have a set number of failures.
-  if (ptr->root->server_failure_limit && ptr->server_failure_counter >= ptr->root->server_failure_limit)
-  {
-    set_last_disconnected_host(ptr);
-
-    // @todo fix this by fixing behavior to no longer make use of
-    // memcached_st
-    if (_is_auto_eject_host(ptr->root))
-    {
-      run_distribution((memcached_st *)ptr->root);
-    }
-
-    return MEMCACHED_SERVER_MARKED_DEAD;
-  }
-
-  /* We need to clean up the multi startup piece */
-  switch (ptr->type)
-  {
-  case MEMCACHED_CONNECTION_UNKNOWN:
-    WATCHPOINT_ASSERT(0);
-    rc= MEMCACHED_NOT_SUPPORTED;
-    break;
-  case MEMCACHED_CONNECTION_UDP:
-  case MEMCACHED_CONNECTION_TCP:
-    rc= network_connect(ptr);
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-    if (ptr->fd != INVALID_SOCKET && ptr->root->sasl.callbacks)
-    {
-      rc= memcached_sasl_authenticate_connection(ptr);
-      if (rc != MEMCACHED_SUCCESS)
-      {
-        (void)closesocket(ptr->fd);
-        ptr->fd= INVALID_SOCKET;
-      }
-    }
-#endif
-    break;
-  case MEMCACHED_CONNECTION_UNIX_SOCKET:
-    rc= unix_socket_connect(ptr);
-    break;
-  case MEMCACHED_CONNECTION_MAX:
-  default:
-    WATCHPOINT_ASSERT(0);
-  }
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    ptr->server_failure_counter= 0;
-    ptr->next_retry= 0;
-  }
-  else
-  {
-    ptr->server_failure_counter++;
-
-    set_last_disconnected_host(ptr);
-  }
-
-  LIBMEMCACHED_MEMCACHED_CONNECT_END();
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+
+#include <cassert>
+
+#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);
+}
@@ -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*);
@@ -1,165 +0,0 @@
-/* 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: Constants for libmemcached
- *
- */
-
-#ifndef __LIBMEMCACHED_CONSTANTS_H__
-#define __LIBMEMCACHED_CONSTANTS_H__
-
-/* Public defines */
-#define MEMCACHED_DEFAULT_PORT 11211
-#define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */
-#define MEMCACHED_MAX_BUFFER 8196
-#define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */
-#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_PREFIX_KEY_MAX_SIZE 128
-#define MEMCACHED_EXPIRATION_NOT_ADD 0xffffffffU
-#define MEMCACHED_VERSION_STRING_LENGTH 24
-
-
-typedef enum {
-  MEMCACHED_SUCCESS,
-  MEMCACHED_FAILURE,
-  MEMCACHED_HOST_LOOKUP_FAILURE,
-  MEMCACHED_CONNECTION_FAILURE,
-  MEMCACHED_CONNECTION_BIND_FAILURE,
-  MEMCACHED_WRITE_FAILURE,
-  MEMCACHED_READ_FAILURE,
-  MEMCACHED_UNKNOWN_READ_FAILURE,
-  MEMCACHED_PROTOCOL_ERROR,
-  MEMCACHED_CLIENT_ERROR,
-  MEMCACHED_SERVER_ERROR,
-  MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE,
-  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,
-  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_MAXIMUM_RETURN /* Always add new error code before */
-} memcached_return_t;
-
-
-typedef enum {
-  MEMCACHED_DISTRIBUTION_MODULA,
-  MEMCACHED_DISTRIBUTION_CONSISTENT,
-  MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA,
-  MEMCACHED_DISTRIBUTION_RANDOM,
-  MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY,
-  MEMCACHED_DISTRIBUTION_CONSISTENT_MAX
-} memcached_server_distribution_t;
-
-typedef enum {
-  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_MAX
-} memcached_behavior_t;
-
-typedef enum {
-  MEMCACHED_CALLBACK_PREFIX_KEY = 0,
-  MEMCACHED_CALLBACK_USER_DATA = 1,
-  MEMCACHED_CALLBACK_CLEANUP_FUNCTION = 2,
-  MEMCACHED_CALLBACK_CLONE_FUNCTION = 3,
-#ifdef MEMCACHED_ENABLE_DEPRECATED
-  MEMCACHED_CALLBACK_MALLOC_FUNCTION = 4,
-  MEMCACHED_CALLBACK_REALLOC_FUNCTION = 5,
-  MEMCACHED_CALLBACK_FREE_FUNCTION = 6,
-#endif
-  MEMCACHED_CALLBACK_GET_FAILURE = 7,
-  MEMCACHED_CALLBACK_DELETE_TRIGGER = 8,
-  MEMCACHED_CALLBACK_MAX
-} memcached_callback_t;
-
-typedef enum {
-  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_CUSTOM,
-  MEMCACHED_HASH_MAX
-} memcached_hash_t;
-
-typedef enum {
-  MEMCACHED_CONNECTION_UNKNOWN,
-  MEMCACHED_CONNECTION_TCP,
-  MEMCACHED_CONNECTION_UDP,
-  MEMCACHED_CONNECTION_UNIX_SOCKET,
-  MEMCACHED_CONNECTION_MAX
-} memcached_connection_t;
-
-#endif /* __LIBMEMCACHED_CONSTANTS_H__ */
@@ -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;
+};
@@ -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 <libmemcached/common.h>
+#include <libmemcached/csl/server.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.
+ *
+ */
+
+#include <libmemcached/csl/common.h>
+#include <libmemcached/csl/context.h>
+
+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;
+}
@@ -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;
+}; 
@@ -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) $<
@@ -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 <http://www.gnu.org/licenses/>.  */
+
+/* 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 <libmemcached/csl/common.h>
+
+class Context;
+
+/* Line 371 of yacc.c  */
+#line 60 "libmemcached/csl/parser.yy"
+
+
+#include <libmemcached/options.hpp>
+
+#include <libmemcached/csl/context.h>
+#include <libmemcached/csl/symbol.h>
+#include <libmemcached/csl/scanner.h>
+
+#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 <stddef.h> /* 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 <libintl.h> /* 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 <alloca.h> /* INFRINGES ON USER NAME SPACE */
+#   elif defined _AIX
+#    define YYSTACK_ALLOC __alloca
+#   elif defined _MSC_VER
+#    include <malloc.h> /* 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 <stdlib.h> /* 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 <stdlib.h> /* 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 <stdio.h> /* 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
+       <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+       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);
+}
+
@@ -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 <http://www.gnu.org/licenses/>.  */
+
+/* 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  */
@@ -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 <libmemcached/csl/common.h>
+
+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 <libmemcached/options.hpp>
+
+#include <libmemcached/csl/context.h>
+#include <libmemcached/csl/symbol.h>
+#include <libmemcached/csl/scanner.h>
+
+#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 <boolean> CSL_TRUE
+%token <boolean> CSL_FALSE
+
+%nonassoc ','
+%nonassoc '='
+
+%token <number> CSL_FLOAT
+%token <number> NUMBER
+%token <number> PORT
+%token <number> WEIGHT_START
+%token <server> IPADDRESS
+%token <server> HOSTNAME
+%token <string> STRING
+%token <string> QUOTED_STRING
+%token <string> FILE_PATH
+
+%type <behavior> behavior_boolean
+%type <behavior> behavior_number
+%type <distribution> distribution
+%type <hash> hash
+%type <number> optional_port
+%type <number> optional_weight
+%type <string> 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);
+}
+
@@ -0,0 +1,2938 @@
+#line 2 "libmemcached/csl/scanner.cc"
+#line 39 "libmemcached/csl/scanner.l"
+
+#include <libmemcached/csl/common.h>
+#include <libmemcached/csl/context.h>
+#include <libmemcached/csl/parser.h>
+#include <libmemcached/csl/symbol.h>
+
+#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 <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. 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 <inttypes.h>
+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 <unistd.h>
+#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);
+}
+
+
@@ -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 <libmemcached/csl/common.h>
+#include <libmemcached/csl/context.h>
+#include <libmemcached/csl/parser.h>
+#include <libmemcached/csl/symbol.h>
+
+#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 <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+/* end standard C headers. */
+
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. 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 <inttypes.h>
+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 <unistd.h>
+#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 */
@@ -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 <libmemcached/csl/common.h>
+#include <libmemcached/csl/context.h>
+#include <libmemcached/csl/parser.h>
+#include <libmemcached/csl/symbol.h>
+
+#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);
+}
+
@@ -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 <cstdlib>
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
+struct server_t
+{
+  const char *c_str;
+  size_t size;
+  in_port_t port;
+  uint32_t weight;
+};
@@ -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 <libmemcached/csl/common.h>
+
+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;
@@ -1,219 +0,0 @@
-#include "common.h"
-#include "memcached/protocol_binary.h"
-
-memcached_return_t memcached_delete(memcached_st *ptr, const char *key, size_t key_length,
-                                    time_t expiration)
-{
-  return memcached_delete_by_key(ptr, key, key_length,
-                                 key, key_length, expiration);
-}
-
-static inline memcached_return_t binary_delete(memcached_st *ptr,
-                                               uint32_t server_key,
-                                               const char *key,
-                                               size_t key_length,
-                                               bool flush);
-
-memcached_return_t memcached_delete_by_key(memcached_st *ptr,
-                                           const char *master_key, size_t master_key_length,
-                                           const char *key, size_t key_length,
-                                           time_t expiration)
-{
-  bool to_write;
-  size_t send_length;
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  uint32_t server_key;
-  memcached_server_write_instance_st instance;
-
-  LIBMEMCACHED_MEMCACHED_DELETE_START();
-
-  rc= memcached_validate_key_length(key_length,
-                                    ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  server_key= memcached_generate_hash_with_redistribution(ptr, master_key, master_key_length);
-  instance= memcached_server_instance_fetch(ptr, server_key);
-
-  to_write= (ptr->flags.buffer_requests) ? false : true;
-
-  bool no_reply= (ptr->flags.no_reply);
-
-  if (ptr->flags.binary_protocol)
-  {
-    likely (! expiration)
-    {
-      rc= binary_delete(ptr, server_key, key, key_length, to_write);
-    }
-    else
-    {
-      rc= MEMCACHED_INVALID_ARGUMENTS;
-    }
-  }
-  else
-  {
-    unlikely (expiration)
-    {
-       if ((instance->major_version == 1 &&
-            instance->minor_version > 2) ||
-           instance->major_version > 1)
-       {
-         rc= MEMCACHED_INVALID_ARGUMENTS;
-         goto error;
-       }
-       else
-       {
-          /* ensure that we are connected, otherwise we might bump the
-           * command counter before connection */
-          if ((rc= memcached_connect(instance)) != MEMCACHED_SUCCESS)
-          {
-            WATCHPOINT_ERROR(rc);
-            return rc;
-          }
-
-          if (instance->minor_version == 0)
-          {
-             if (no_reply || ! to_write)
-             {
-                /* We might get out of sync with the server if we
-                 * send this command to a server newer than 1.2.x..
-                 * disable no_reply and buffered mode.
-                 */
-                to_write= true;
-                if (no_reply)
-                   memcached_server_response_increment(instance);
-                no_reply= false;
-             }
-          }
-          send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                         "delete %.*s%.*s %u%s\r\n",
-                                         (int)ptr->prefix_key_length,
-                                         ptr->prefix_key,
-                                         (int) key_length, key,
-                                         (uint32_t)expiration,
-                                         no_reply ? " noreply" :"" );
-       }
-    }
-    else
-    {
-      send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                     "delete %.*s%.*s%s\r\n",
-                                     (int)ptr->prefix_key_length,
-                                     ptr->prefix_key,
-                                     (int)key_length, key, no_reply ? " noreply" :"");
-    }
-
-    if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
-    {
-      rc= MEMCACHED_WRITE_FAILURE;
-      goto error;
-    }
-
-    if (ptr->flags.use_udp && ! to_write)
-    {
-      if (send_length > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
-        return MEMCACHED_WRITE_FAILURE;
-      if (send_length + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
-        memcached_io_write(instance, NULL, 0, true);
-    }
-
-    rc= memcached_do(instance, buffer, send_length, to_write);
-  }
-
-  if (rc != MEMCACHED_SUCCESS)
-    goto error;
-
-  if (! to_write)
-  {
-    rc= MEMCACHED_BUFFERED;
-  }
-  else if (!no_reply)
-  {
-    rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-    if (rc == MEMCACHED_DELETED)
-      rc= MEMCACHED_SUCCESS;
-  }
-
-  if (rc == MEMCACHED_SUCCESS && ptr->delete_trigger)
-    ptr->delete_trigger(ptr, key, key_length);
-
-error:
-  LIBMEMCACHED_MEMCACHED_DELETE_END();
-  return rc;
-}
-
-static inline memcached_return_t binary_delete(memcached_st *ptr,
-                                               uint32_t server_key,
-                                               const char *key,
-                                               size_t key_length,
-                                               bool flush)
-{
-  memcached_server_write_instance_st instance;
-  protocol_binary_request_delete request= {.bytes= {0}};
-
-  instance= memcached_server_instance_fetch(ptr, server_key);
-
-  request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-  if (ptr->flags.no_reply)
-    request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETEQ;
-  else
-    request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETE;
-  request.message.header.request.keylen= htons((uint16_t)(key_length + ptr->prefix_key_length));
-  request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
-  request.message.header.request.bodylen= htonl((uint32_t)(key_length + ptr->prefix_key_length));
-
-  if (ptr->flags.use_udp && ! flush)
-  {
-    size_t cmd_size= sizeof(request.bytes) + key_length;
-    if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
-      return MEMCACHED_WRITE_FAILURE;
-    if (cmd_size + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
-      memcached_io_write(instance, NULL, 0, true);
-  }
-
-  struct libmemcached_io_vector_st vector[]=
-  {
-    { .length= sizeof(request.bytes), .buffer= request.bytes},
-    { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-    { .length= key_length, .buffer= key },
-  };
-
-  memcached_return_t rc= MEMCACHED_SUCCESS;
-
-  if ((rc= memcached_vdo(instance, vector,  3, flush)) != MEMCACHED_SUCCESS)
-  {
-    memcached_io_reset(instance);
-    rc= (rc == MEMCACHED_SUCCESS) ? MEMCACHED_WRITE_FAILURE : rc;
-  }
-
-  unlikely (ptr->number_of_replicas > 0)
-  {
-    request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETEQ;
-
-    for (uint32_t x= 0; x < ptr->number_of_replicas; ++x)
-    {
-      memcached_server_write_instance_st replica;
-
-      ++server_key;
-      if (server_key == memcached_server_count(ptr))
-        server_key= 0;
-
-      replica= memcached_server_instance_fetch(ptr, server_key);
-
-      if (memcached_vdo(replica, vector, 3, flush) != MEMCACHED_SUCCESS)
-      {
-        memcached_io_reset(replica);
-      }
-      else
-      {
-        memcached_server_response_decrement(replica);
-      }
-    }
-  }
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+#include <libmemcached/memcached/protocol_binary.h>
+
+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;
+}
@@ -1,33 +0,0 @@
-/* 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: Delete a key from the server.
- *
- */
-
-#ifndef __LIBMEMCACHED_DELETE_H__
-#define __LIBMEMCACHED_DELETE_H__
-
-#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 *master_key, size_t master_key_length,
-                                           const char *key, size_t key_length,
-                                           time_t expiration);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_DELETE_H__ */
@@ -1,99 +0,0 @@
-/* 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 "common.h"
-
-memcached_return_t memcached_do(memcached_server_write_instance_st ptr, const void *command,
-                                size_t command_length, bool with_flush)
-{
-  memcached_return_t rc;
-  ssize_t sent_length;
-
-  WATCHPOINT_ASSERT(command_length);
-  WATCHPOINT_ASSERT(command);
-
-  if ((rc= memcached_connect(ptr)) != MEMCACHED_SUCCESS)
-  {
-    WATCHPOINT_ERROR(rc);
-    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 (ptr->type == MEMCACHED_CONNECTION_UDP && with_flush && ptr->write_buffer_offset > UDP_DATAGRAM_HEADER_LENGTH)
-  {
-    memcached_io_write(ptr, NULL, 0, true);
-  }
-
-  sent_length= memcached_io_write(ptr, command, command_length, with_flush);
-
-  if (sent_length == -1 || (size_t)sent_length != command_length)
-  {
-    rc= MEMCACHED_WRITE_FAILURE;
-  }
-  else if ((ptr->root->flags.no_reply) == 0)
-  {
-    memcached_server_response_increment(ptr);
-  }
-
-  return rc;
-}
-
-memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
-                                 const struct libmemcached_io_vector_st *vector, size_t count,
-                                 bool with_flush)
-{
-  memcached_return_t rc;
-  ssize_t sent_length;
-
-  WATCHPOINT_ASSERT(count);
-  WATCHPOINT_ASSERT(vector);
-
-  if ((rc= memcached_connect(ptr)) != MEMCACHED_SUCCESS)
-  {
-    WATCHPOINT_ERROR(rc);
-    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 (ptr->type == MEMCACHED_CONNECTION_UDP && with_flush && ptr->write_buffer_offset > UDP_DATAGRAM_HEADER_LENGTH)
-  {
-    memcached_io_write(ptr, NULL, 0, true);
-  }
-
-  sent_length= memcached_io_writev(ptr, vector, count, with_flush);
-
-  size_t command_length= 0;
-  for (uint32_t x= 0; x < count; ++x, vector++)
-  {
-    command_length+= vector->length;
-  }
-
-  if (sent_length == -1 || (size_t)sent_length != command_length)
-  {
-    rc= MEMCACHED_WRITE_FAILURE;
-    WATCHPOINT_ERROR(rc);
-    WATCHPOINT_ERRNO(errno);
-  }
-  else if ((ptr->root->flags.no_reply) == 0)
-  {
-    memcached_server_response_increment(ptr);
-  }
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,34 +0,0 @@
-/* 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: Internal functions used by the library. Not for public use!
- *
- */
-
-#ifndef __LIBMEMCACHED_DO_H__
-#define __LIBMEMCACHED_DO_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_do(memcached_server_write_instance_st ptr,
-                                const void *commmand,
-                                size_t command_length,
-                                bool with_flush);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_vdo(memcached_server_write_instance_st ptr,
-                                 const struct libmemcached_io_vector_st *vector, size_t count,
-                                 bool with_flush);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_DO_H__ */
@@ -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);
@@ -1,93 +0,0 @@
-/*
-  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 "common.h"
-static memcached_return_t ascii_dump(memcached_st *ptr, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks)
-{
-  memcached_return_t rc= MEMCACHED_SUCCESS;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  size_t send_length;
-  uint32_t server_key;
-  uint32_t x;
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  for (server_key= 0; server_key < memcached_server_count(ptr); server_key++)
-  {
-    memcached_server_write_instance_st instance;
-    instance= memcached_server_instance_fetch(ptr, server_key);
-
-    /* 256 I BELIEVE is the upper limit of slabs */
-    for (x= 0; x < 256; x++)
-    {
-      send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                     "stats cachedump %u 0 0\r\n", x);
-
-      rc= memcached_do(instance, buffer, send_length, true);
-
-      unlikely (rc != MEMCACHED_SUCCESS)
-        goto error;
-
-      while (1)
-      {
-        uint32_t callback_counter;
-        rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-
-        if (rc == MEMCACHED_ITEM)
-        {
-          char *string_ptr, *end_ptr;
-          char *key;
-
-          string_ptr= buffer;
-          string_ptr+= 5; /* Move past ITEM */
-          for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++);
-          key= string_ptr;
-          key[(size_t)(end_ptr-string_ptr)]= 0;
-          for (callback_counter= 0; callback_counter < number_of_callbacks; callback_counter++)
-          {
-            rc= (*callback[callback_counter])(ptr, key, (size_t)(end_ptr-string_ptr), context);
-            if (rc != MEMCACHED_SUCCESS)
-              break;
-          }
-        }
-        else if (rc == MEMCACHED_END)
-          break;
-        else if (rc == MEMCACHED_SERVER_ERROR || rc == MEMCACHED_CLIENT_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.
-           */
-          rc= MEMCACHED_END;
-          break;
-        }
-        else
-          goto error;
-      }
-    }
-  }
-
-error:
-  if (rc == MEMCACHED_END)
-    return MEMCACHED_SUCCESS;
-  else
-    return rc;
-}
-
-memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks)
-{
-  /* No support for Binary protocol yet */
-  if (ptr->flags.binary_protocol)
-    return MEMCACHED_FAILURE;
-
-  return ascii_dump(ptr, callback, context, number_of_callbacks);
-}
@@ -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 <libmemcached/common.h>
+
+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);
+}
@@ -1,27 +0,0 @@
-/* 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: Simple method for dumping data from Memcached.
- *
- */
-
-#ifndef __LIBMEMCACHED_DUMP_H__
-#define __LIBMEMCACHED_DUMP_H__
-
-#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
-
-#endif /* __LIBMEMCACHED_DUMP_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.
+ *
+ */
+
+#include <libmemcached/common.h>
+#include <libmemcached/assert.hpp>
+
+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;
+}
@@ -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
@@ -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 <libmemcached/common.h>
+
+#include "libmemcached/assert.hpp"
+
+#include <cerrno>
+#include <cstdarg>
+#include <cstdio>
+
+#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;
+}
@@ -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
@@ -1,63 +0,0 @@
-/*
- * Summary: Exceptions for the C++ interface
- *
- * Copy: See Copyright for the status of this software.
- *
- */
-
-/**
- * @file
- * @brief Exception declarations
- */
-
-#ifndef LIBMEMACHED_EXCEPTION_HPP
-#define LIBMEMACHED_EXCEPTION_HPP
-
-#include <stdexcept>
-#include <string>
-
-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 */
-
-#endif /* LIBMEMACHED_EXCEPTION_HPP */
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,108 +0,0 @@
-#include "common.h"
-
-char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length, 
-                      size_t *value_length, 
-                      uint32_t *flags,
-                      memcached_return_t *error)
-{
-  memcached_result_st *result_buffer= &ptr->result;
-
-  unlikely (ptr->flags.use_udp)
-  {
-    *error= MEMCACHED_NOT_SUPPORTED;
-    return NULL;
-  }
-
-  result_buffer= memcached_fetch_result(ptr, result_buffer, error);
-
-  if (result_buffer == NULL || *error != MEMCACHED_SUCCESS)
-  {
-    WATCHPOINT_ASSERT(result_buffer == NULL);
-    *value_length= 0;
-    return NULL;
-  }
-
-  *value_length= memcached_string_length(&result_buffer->value);
-
-  if (key)
-  {
-    if (result_buffer->key_length > MEMCACHED_MAX_KEY)
-    {
-      *error= MEMCACHED_KEY_TOO_BIG;
-      *value_length= 0;
-
-      return NULL;
-    }
-    strncpy(key, result_buffer->item_key, result_buffer->key_length); // For the binary protocol we will cut off the key :(
-    *key_length= result_buffer->key_length;
-  }
-
-  *flags= result_buffer->item_flags;
-
-  return memcached_string_c_copy(&result_buffer->value);
-}
-
-memcached_result_st *memcached_fetch_result(memcached_st *ptr,
-                                            memcached_result_st *result,
-                                            memcached_return_t *error)
-{
-  memcached_server_st *server;
-
-  unlikely (ptr->flags.use_udp)
-  {
-    *error= MEMCACHED_NOT_SUPPORTED;
-    return NULL;
-  }
-
-  if (result == NULL)
-    if ((result= memcached_result_create(ptr, NULL)) == NULL)
-      return NULL;
-
-  while ((server= memcached_io_get_readable_server(ptr)) != NULL) 
-  {
-    char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-    *error= memcached_response(server, buffer, sizeof(buffer), result);
-
-    if (*error == MEMCACHED_SUCCESS)
-      return result;
-    else if (*error == MEMCACHED_END)
-      memcached_server_response_reset(server);
-    else if (*error != MEMCACHED_NOTFOUND)
-      break;
-  }
-
-  /* We have completed reading data */
-  if (memcached_is_allocated(result))
-  {
-    memcached_result_free(result);
-  }
-  else
-  {
-    memcached_string_reset(&result->value);
-  }
-
-  return NULL;
-}
-
-memcached_return_t memcached_fetch_execute(memcached_st *ptr, 
-                                           memcached_execute_fn *callback,
-                                           void *context,
-                                           uint32_t number_of_callbacks)
-{
-  memcached_result_st *result= &ptr->result;
-  memcached_return_t rc= MEMCACHED_FAILURE;
-
-  while ((result= memcached_fetch_result(ptr, result, &rc)) != NULL) 
-  {
-    if (rc == MEMCACHED_SUCCESS)
-    {
-      for (uint32_t x= 0; x < number_of_callbacks; x++)
-      {
-        rc= (*callback[x])(ptr, result, context);
-        if (rc != MEMCACHED_SUCCESS)
-          break;
-      }
-    }
-  }
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,29 +0,0 @@
-/* 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
- *
- */
-
-#ifndef __LIBMEMCACHED_FETCH_H__
-#define __LIBMEMCACHED_FETCH_H__
-
-#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
-
-#endif /* __LIBMEMCACHED_FETCH_H__ */
@@ -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 <libmemcached/common.h>
+
+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;
+  }
+}
@@ -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);
@@ -1,101 +0,0 @@
-#include "common.h"
-
-static memcached_return_t memcached_flush_binary(memcached_st *ptr, 
-                                                 time_t expiration);
-static memcached_return_t memcached_flush_textual(memcached_st *ptr, 
-                                                  time_t expiration);
-
-memcached_return_t memcached_flush(memcached_st *ptr, time_t expiration)
-{
-  memcached_return_t rc;
-
-  LIBMEMCACHED_MEMCACHED_FLUSH_START();
-  if (ptr->flags.binary_protocol)
-    rc= memcached_flush_binary(ptr, expiration);
-  else
-    rc= memcached_flush_textual(ptr, expiration);
-  LIBMEMCACHED_MEMCACHED_FLUSH_END();
-  return rc;
-}
-
-static memcached_return_t memcached_flush_textual(memcached_st *ptr, 
-                                                  time_t expiration)
-{
-  unsigned int x;
-  size_t send_length;
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  for (x= 0; x < memcached_server_count(ptr); x++)
-  {
-    bool no_reply= ptr->flags.no_reply;
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (expiration)
-      send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, 
-                                     "flush_all %llu%s\r\n",
-                                     (unsigned long long)expiration, no_reply ? " noreply" : "");
-    else
-      send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, 
-                                     "flush_all%s\r\n", no_reply ? " noreply" : "");
-
-    rc= memcached_do(instance, buffer, send_length, true);
-
-    if (rc == MEMCACHED_SUCCESS && !no_reply)
-      (void)memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-static memcached_return_t memcached_flush_binary(memcached_st *ptr, 
-                                                 time_t expiration)
-{
-  protocol_binary_request_flush request= {.bytes= {0}};
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  request.message.header.request.magic= (uint8_t)PROTOCOL_BINARY_REQ;
-  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);
-
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (ptr->flags.no_reply)
-    {
-      request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSHQ;
-    }
-    else
-    {
-      request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSH;
-    }
-
-    if (memcached_do(instance, request.bytes, sizeof(request.bytes), true) != MEMCACHED_SUCCESS) 
-    {
-      memcached_io_reset(instance);
-      return MEMCACHED_WRITE_FAILURE;
-    } 
-  }
-
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (memcached_server_response_count(instance) > 0)
-      (void)memcached_response(instance, NULL, 0, NULL);
-  }
-
-  return MEMCACHED_SUCCESS;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,26 +0,0 @@
-/* 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: Flush connections.
- *
- */
-
-#ifndef __LIBMEMCACHED_FLUSH_H__
-#define __LIBMEMCACHED_FLUSH_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-memcached_return_t memcached_flush(memcached_st *ptr, time_t expiration);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_FLUSH_H__ */
@@ -1,26 +0,0 @@
-#include "common.h"
-
-memcached_return_t memcached_flush_buffers(memcached_st *memc)
-{
-  memcached_return_t ret= MEMCACHED_SUCCESS;
-
-  for (uint32_t x= 0; x < memcached_server_count(memc); ++x)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(memc, x);
-
-    if (instance->write_buffer_offset != 0) 
-    {
-      if (instance->fd == -1 &&
-          (ret= memcached_connect(instance)) != MEMCACHED_SUCCESS)
-      {
-        WATCHPOINT_ERROR(ret);
-        return ret;
-      }
-      if (memcached_io_write(instance, NULL, 0, true) == -1)
-        ret= MEMCACHED_SOME_ERRORS;
-    }
-  }
-
-  return ret;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,26 +0,0 @@
-/* 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
- *
- */
-
-#ifndef __LIBMEMCACHED_FLUSH_BUFFERS_H__
-#define __LIBMEMCACHED_FLUSH_BUFFERS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-memcached_return_t memcached_flush_buffers(memcached_st *mem);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_FLUSH_BUFFERS_H__ */
@@ -1,617 +0,0 @@
-/* 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: Get functions for libmemcached
- *
- */
-
-#include "common.h"
-
-/*
-  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 memcached_mget_by_key_real(memcached_st *ptr,
-                                                     const char *master_key,
-                                                     size_t master_key_length,
-                                                     const char * const *keys,
-                                                     const size_t *key_length,
-                                                     size_t number_of_keys,
-                                                     bool mget_mode);
-
-char *memcached_get_by_key(memcached_st *ptr,
-                           const char *master_key,
-                           size_t master_key_length,
-                           const char *key, size_t key_length,
-                           size_t *value_length,
-                           uint32_t *flags,
-                           memcached_return_t *error)
-{
-  char *value;
-  size_t dummy_length;
-  uint32_t dummy_flags;
-  memcached_return_t dummy_error;
-
-  unlikely (ptr->flags.use_udp)
-  {
-    *error= MEMCACHED_NOT_SUPPORTED;
-    return NULL;
-  }
-
-  /* Request the key */
-  *error= memcached_mget_by_key_real(ptr, master_key, master_key_length,
-                                     (const char * const *)&key,
-                                     &key_length, 1, false);
-
-  value= memcached_fetch(ptr, NULL, NULL,
-                         value_length, flags, error);
-  /* This is for historical reasons */
-  if (*error == MEMCACHED_END)
-    *error= MEMCACHED_NOTFOUND;
-
-  if (value == NULL)
-  {
-    if (ptr->get_key_failure && *error == MEMCACHED_NOTFOUND)
-    {
-      memcached_return_t rc;
-
-      memcached_result_reset(&ptr->result);
-      rc= ptr->get_key_failure(ptr, key, key_length, &ptr->result);
-
-      /* On all failure drop to returning NULL */
-      if (rc == MEMCACHED_SUCCESS || 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(&ptr->result)),
-                            (memcached_result_length(&ptr->result)),
-                            0,
-                            (memcached_result_flags(&ptr->result)));
-
-          if (rc == MEMCACHED_BUFFERED && latch == 0)
-            memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0);
-        }
-        else
-        {
-          rc= memcached_set(ptr, key, key_length,
-                            (memcached_result_value(&ptr->result)),
-                            (memcached_result_length(&ptr->result)),
-                            0,
-                            (memcached_result_flags(&ptr->result)));
-        }
-
-        if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED)
-        {
-          *error= rc;
-          *value_length= memcached_result_length(&ptr->result);
-          *flags= memcached_result_flags(&ptr->result);
-          return memcached_string_c_copy(&ptr->result.value);
-        }
-      }
-    }
-
-    return NULL;
-  }
-
-  (void)memcached_fetch(ptr, NULL, NULL,
-                        &dummy_length, &dummy_flags,
-                        &dummy_error);
-  WATCHPOINT_ASSERT(dummy_length == 0);
-
-  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,
-                                             uint32_t master_server_key,
-                                             bool is_master_key_set,
-                                             const char * const *keys,
-                                             const size_t *key_length,
-                                             size_t number_of_keys,
-                                             bool mget_mode);
-
-static memcached_return_t memcached_mget_by_key_real(memcached_st *ptr,
-                                                     const char *master_key,
-                                                     size_t master_key_length,
-                                                     const char * const *keys,
-                                                     const size_t *key_length,
-                                                     size_t number_of_keys,
-                                                     bool mget_mode)
-{
-  memcached_return_t rc= MEMCACHED_NOTFOUND;
-  const char *get_command= "get ";
-  uint8_t get_command_length= 4;
-  unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */
-  bool is_master_key_set= false;
-
-  unlikely (ptr->flags.use_udp)
-    return MEMCACHED_NOT_SUPPORTED;
-
-  LIBMEMCACHED_MEMCACHED_MGET_START();
-
-  if (number_of_keys == 0)
-    return MEMCACHED_NOTFOUND;
-
-  if (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  if (ptr->flags.verify_key && (memcached_key_test(keys, key_length, number_of_keys) == MEMCACHED_BAD_KEY_PROVIDED))
-    return MEMCACHED_BAD_KEY_PROVIDED;
-
-  if (master_key && master_key_length)
-  {
-    if (ptr->flags.verify_key && (memcached_key_test((const char * const *)&master_key, &master_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
-      return MEMCACHED_BAD_KEY_PROVIDED;
-    master_server_key= memcached_generate_hash_with_redistribution(ptr, master_key, master_key_length);
-    is_master_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_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (memcached_server_response_count(instance))
-    {
-      char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-
-      if (ptr->flags.no_block)
-        (void)memcached_io_write(instance, NULL, 0, true);
-
-      while(memcached_server_response_count(instance))
-        (void)memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, &ptr->result);
-    }
-  }
-
-  if (ptr->flags.binary_protocol)
-  {
-    return binary_mget_by_key(ptr, master_server_key, is_master_key_set, keys,
-                              key_length, number_of_keys, mget_mode);
-  }
-
-  if (ptr->flags.support_cas)
-  {
-    get_command= "gets ";
-    get_command_length= 5;
-  }
-
-  /*
-    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++)
-  {
-    memcached_server_write_instance_st instance;
-    uint32_t server_key;
-
-    if (is_master_key_set)
-    {
-      server_key= master_server_key;
-    }
-    else
-    {
-      server_key= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]);
-    }
-
-    instance= memcached_server_instance_fetch(ptr, server_key);
-
-    struct libmemcached_io_vector_st vector[]=
-    {
-      { .length= get_command_length, .buffer= get_command },
-      { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-      { .length= key_length[x], .buffer= keys[x] },
-      { .length= 1, .buffer= " " }
-    };
-
-
-    if (memcached_server_response_count(instance) == 0)
-    {
-      rc= memcached_connect(instance);
-
-      if (rc != MEMCACHED_SUCCESS)
-        continue;
-
-      if ((memcached_io_writev(instance, vector, 4, false)) == -1)
-      {
-        rc= MEMCACHED_SOME_ERRORS;
-        continue;
-      }
-      WATCHPOINT_ASSERT(instance->cursor_active == 0);
-      memcached_server_response_increment(instance);
-      WATCHPOINT_ASSERT(instance->cursor_active == 1);
-    }
-    else
-    {
-      if ((memcached_io_writev(instance, (vector + 1), 3, false)) == -1)
-      {
-        memcached_server_response_reset(instance);
-        rc= MEMCACHED_SOME_ERRORS;
-        continue;
-      }
-    }
-  }
-
-  /*
-    Should we muddle on if some servers are dead?
-  */
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (memcached_server_response_count(instance))
-    {
-      /* We need to do something about non-connnected hosts in the future */
-      if ((memcached_io_write(instance, "\r\n", 2, true)) == -1)
-      {
-        rc= MEMCACHED_SOME_ERRORS;
-      }
-    }
-  }
-
-  LIBMEMCACHED_MEMCACHED_MGET_END();
-  return rc;
-}
-
-memcached_return_t memcached_mget_by_key(memcached_st *ptr,
-                                         const char *master_key,
-                                         size_t master_key_length,
-                                         const char * const *keys,
-                                         const size_t *key_length,
-                                         size_t number_of_keys)
-{
-  return memcached_mget_by_key_real(ptr, master_key, master_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 *ptr,
-                                                 const char *master_key,
-                                                 size_t master_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)
-{
-  if ((ptr->flags.binary_protocol) == 0)
-    return MEMCACHED_NOT_SUPPORTED;
-
-  memcached_return_t rc;
-  memcached_callback_st *original_callbacks= ptr->callbacks;
-  memcached_callback_st cb= {
-    .callback= callback,
-    .context= context,
-    .number_of_callback= number_of_callbacks
-  };
-
-  ptr->callbacks= &cb;
-  rc= memcached_mget_by_key(ptr, master_key, master_key_length, keys,
-                            key_length, number_of_keys);
-  ptr->callbacks= original_callbacks;
-  return rc;
-}
-
-static memcached_return_t simple_binary_mget(memcached_st *ptr,
-                                             uint32_t master_server_key,
-                                             bool is_master_key_set,
-                                             const char * const *keys,
-                                             const size_t *key_length,
-                                             size_t number_of_keys, bool mget_mode)
-{
-  memcached_return_t rc= MEMCACHED_NOTFOUND;
-
-  int flush= number_of_keys == 1;
-
-  /*
-    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;
-    memcached_server_write_instance_st instance;
-
-    if (is_master_key_set)
-    {
-      server_key= master_server_key;
-    }
-    else
-    {
-      server_key= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]);
-    }
-
-    instance= memcached_server_instance_fetch(ptr, server_key);
-
-    if (memcached_server_response_count(instance) == 0)
-    {
-      rc= memcached_connect(instance);
-      if (rc != MEMCACHED_SUCCESS)
-        continue;
-    }
-
-    protocol_binary_request_getk request= {.bytes= {0}};
-    request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-    if (mget_mode)
-      request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETKQ;
-    else
-      request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK;
-
-    memcached_return_t vk;
-    vk= memcached_validate_key_length(key_length[x],
-                                      ptr->flags.binary_protocol);
-    unlikely (vk != MEMCACHED_SUCCESS)
-    {
-      if (x > 0)
-      {
-        memcached_io_reset(instance);
-      }
-
-      return vk;
-    }
-
-    request.message.header.request.keylen= htons((uint16_t)(key_length[x] + ptr->prefix_key_length));
-    request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
-    request.message.header.request.bodylen= htonl((uint32_t)( key_length[x] + ptr->prefix_key_length));
-
-    struct libmemcached_io_vector_st vector[]=
-    {
-      { .length= sizeof(request.bytes), .buffer= request.bytes },
-      { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-      { .length= key_length[x], .buffer= keys[x] }
-    };
-
-    if (memcached_io_writev(instance, vector, 3, flush) == -1)
-    {
-      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 && x == ptr->io_key_prefetch) && 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.magic= PROTOCOL_BINARY_REQ;
-    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_server_write_instance_st instance=
-        memcached_server_instance_fetch(ptr, x);
-
-      if (memcached_server_response_count(instance))
-      {
-        if (memcached_io_write(instance, NULL, 0, true) == -1)
-        {
-          memcached_server_response_reset(instance);
-          memcached_io_reset(instance);
-          rc= MEMCACHED_SOME_ERRORS;
-        }
-
-        if (memcached_io_write(instance, request.bytes,
-                               sizeof(request.bytes), true) == -1)
-        {
-          memcached_server_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,
-                                                  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)
-    {
-      memcached_server_write_instance_st instance;
-
-      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 && ((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;
-
-      instance= memcached_server_instance_fetch(ptr, server);
-
-      if (memcached_server_response_count(instance) == 0)
-      {
-        rc= memcached_connect(instance);
-        if (rc != MEMCACHED_SUCCESS)
-        {
-          memcached_io_reset(instance);
-          dead_servers[server]= true;
-          success= false;
-          continue;
-        }
-      }
-
-      protocol_binary_request_getk request= {
-        .message.header.request= {
-          .magic= PROTOCOL_BINARY_REQ,
-          .opcode= PROTOCOL_BINARY_CMD_GETK,
-          .keylen= htons((uint16_t)(key_length[x] + ptr->prefix_key_length)),
-          .datatype= PROTOCOL_BINARY_RAW_BYTES,
-          .bodylen= htonl((uint32_t)(key_length[x] + ptr->prefix_key_length))
-        }
-      };
-
-      /*
-       * 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_
-     */
-      struct libmemcached_io_vector_st vector[]=
-      {
-        { .length= sizeof(request.bytes), .buffer= request.bytes },
-        { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-        { .length= key_length[x], .buffer= keys[x] }
-      };
-
-      if (memcached_io_writev(instance, vector, 3, true) == -1)
-      {
-        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,
-                                             uint32_t master_server_key,
-                                             bool is_master_key_set,
-                                             const char * const *keys,
-                                             const size_t *key_length,
-                                             size_t number_of_keys,
-                                             bool mget_mode)
-{
-  memcached_return_t rc;
-
-  if (ptr->number_of_replicas == 0)
-  {
-    rc= simple_binary_mget(ptr, master_server_key, is_master_key_set,
-                           keys, key_length, number_of_keys, mget_mode);
-  }
-  else
-  {
-    uint32_t* hash;
-    bool* dead_servers;
-
-    hash= libmemcached_malloc(ptr, sizeof(uint32_t) * number_of_keys);
-    dead_servers= libmemcached_calloc(ptr, memcached_server_count(ptr), sizeof(bool));
-
-    if (hash == NULL || dead_servers == NULL)
-    {
-      libmemcached_free(ptr, hash);
-      libmemcached_free(ptr, dead_servers);
-      return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    }
-
-    if (is_master_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]);
-      }
-    }
-
-    rc= replication_binary_mget(ptr, hash, dead_servers, keys,
-                                key_length, number_of_keys);
-
-    libmemcached_free(ptr, hash);
-    libmemcached_free(ptr, dead_servers);
-
-    return MEMCACHED_SUCCESS;
-  }
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+
+/*
+  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;
+}
@@ -1,86 +0,0 @@
-/* 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: Get functions for libmemcached
- *
- */
-
-#ifndef __LIBMEMCACHED_GET_H__
-#define __LIBMEMCACHED_GET_H__
-
-#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 *master_key, size_t master_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 *master_key,
-                                         size_t master_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 *master_key,
-                                                 size_t master_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
-
-#endif /* __LIBMEMCACHED_GET_H__ */
@@ -1,138 +0,0 @@
-/* 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 "common.h"
-
-
-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_st *ptr, const char *key, size_t key_length)
-{
-  return hashkit_digest(&ptr->hashkit, key, key_length);
-}
-
-static uint32_t dispatch_host(const memcached_st *ptr, uint32_t hash)
-{
-  switch (ptr->distribution)
-  {
-  case MEMCACHED_DISTRIBUTION_CONSISTENT:
-  case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA:
-  case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY:
-    {
-      uint32_t num= ptr->continuum_points_counter;
-      WATCHPOINT_ASSERT(ptr->continuum);
-
-      hash= hash;
-      memcached_continuum_item_st *begin, *end, *left, *right, *middle;
-      begin= left= ptr->continuum;
-      end= right= ptr->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_CONSISTENT_MAX:
-  default:
-    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_st *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_prefix_key)
-  {
-    size_t temp_length= ptr->prefix_key_length + key_length;
-    char temp[temp_length];
-
-    if (temp_length > MEMCACHED_MAX_KEY -1)
-      return 0;
-
-    strncpy(temp, ptr->prefix_key, ptr->prefix_key_length);
-    strncpy(temp + ptr->prefix_key_length, 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_st *ptr)
-{
-  if (_is_auto_eject_host(ptr) && ptr->next_distribution_rebuild)
-  {
-    struct timeval now;
-
-    if (gettimeofday(&now, NULL) == 0 &&
-        now.tv_sec > ptr->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 *ptr, const char *key, size_t key_length)
-{
-  return dispatch_host(ptr, _generate_hash_wrapper(ptr, key, key_length));
-}
-
-const hashkit_st *memcached_get_hashkit(const memcached_st *ptr)
-{
-  return &ptr->hashkit;
-}
-
-memcached_return_t memcached_set_hashkit(memcached_st *self, hashkit_st *hashk)
-{
-  hashkit_free(&self->hashkit);
-  hashkit_clone(&self->hashkit, hashk);
-
-  return MEMCACHED_SUCCESS;
-}
@@ -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 <libmemcached/common.h>
+
+#include <sys/time.h>
+
+#include <libmemcached/virtual_bucket.h>
+
+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);
+}
@@ -1,42 +0,0 @@
-/* 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: hash interface code
- *
- */
-
-#ifndef __MEMCACHED_HASH_H__
-#define __MEMCACHED_HASH_H__
-
-#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_LOCAL
-uint32_t memcached_generate_hash_with_redistribution(memcached_st *ptr, const char *key, size_t key_length);
-
-LIBMEMCACHED_API
-void memcached_autoeject(memcached_st *ptr);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MEMCACHED_HASH_H__ */
@@ -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);
@@ -1,439 +0,0 @@
-/* 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 "common.h"
-#include <math.h>
-
-/* Protoypes (static) */
-static memcached_return_t server_add(memcached_st *ptr, const char *hostname,
-                                     in_port_t port,
-                                     uint32_t weight,
-                                     memcached_connection_t type);
-static memcached_return_t update_continuum(memcached_st *ptr);
-
-static int compare_servers(const void *p1, const void *p2)
-{
-  int return_value;
-  memcached_server_instance_st a= (memcached_server_instance_st)p1;
-  memcached_server_instance_st b= (memcached_server_instance_st)p2;
-
-  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_st *ptr)
-{
-  if (memcached_server_count(ptr))
-  {
-    memcached_server_write_instance_st instance;
-
-    qsort(memcached_server_list(ptr), memcached_server_count(ptr), sizeof(memcached_server_st), compare_servers);
-    instance= memcached_server_instance_fetch(ptr, 0);
-    instance->number_of_hosts= memcached_server_count(ptr);
-  }
-}
-
-
-memcached_return_t run_distribution(memcached_st *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:
-    return update_continuum(ptr);
-  case MEMCACHED_DISTRIBUTION_MODULA:
-    break;
-  case MEMCACHED_DISTRIBUTION_RANDOM:
-    srandom((uint32_t) time(NULL));
-    break;
-  case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX:
-  default:
-    WATCHPOINT_ASSERT(0); /* We have added a distribution without extending the logic */
-  }
-
-  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_st *ptr)
-{
-  uint32_t host_index;
-  uint32_t continuum_index= 0;
-  uint32_t value;
-  memcached_server_st *list;
-  uint32_t pointer_index;
-  uint32_t pointer_counter= 0;
-  uint32_t pointer_per_server= MEMCACHED_POINTS_PER_SERVER;
-  uint32_t pointer_per_hash= 1;
-  uint64_t total_weight= 0;
-  uint64_t is_ketama_weighted= 0;
-  uint64_t is_auto_ejecting= 0;
-  uint32_t points_per_server= 0;
-  uint32_t live_servers= 0;
-  struct timeval now;
-
-  if (gettimeofday(&now, NULL) != 0)
-  {
-    ptr->cached_errno = errno;
-    return MEMCACHED_ERRNO;
-  }
-
-  list = memcached_server_list(ptr);
-
-  /* count live servers (those without a retry delay set) */
-  is_auto_ejecting= _is_auto_eject_host(ptr);
-  if (is_auto_ejecting)
-  {
-    live_servers= 0;
-    ptr->next_distribution_rebuild= 0;
-    for (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->next_distribution_rebuild == 0 || list[host_index].next_retry < ptr->next_distribution_rebuild)
-          ptr->next_distribution_rebuild= list[host_index].next_retry;
-      }
-    }
-  }
-  else
-  {
-    live_servers= memcached_server_count(ptr);
-  }
-
-  is_ketama_weighted= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  points_per_server= (uint32_t) (is_ketama_weighted ? MEMCACHED_POINTS_PER_SERVER_KETAMA : MEMCACHED_POINTS_PER_SERVER);
-
-  if (live_servers == 0)
-    return MEMCACHED_SUCCESS;
-
-  if (live_servers > ptr->continuum_count)
-  {
-    memcached_continuum_item_st *new_ptr;
-
-    new_ptr= libmemcached_realloc(ptr, ptr->continuum,
-                                  sizeof(memcached_continuum_item_st) * (live_servers + MEMCACHED_CONTINUUM_ADDITION) * points_per_server);
-
-    if (new_ptr == 0)
-      return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-
-    ptr->continuum= new_ptr;
-    ptr->continuum_count= live_servers + MEMCACHED_CONTINUUM_ADDITION;
-  }
-
-  if (is_ketama_weighted)
-  {
-    for (host_index = 0; host_index < memcached_server_count(ptr); ++host_index)
-    {
-      if (list[host_index].weight == 0)
-      {
-        list[host_index].weight = 1;
-      }
-      if (! is_auto_ejecting || list[host_index].next_retry <= now.tv_sec)
-        total_weight += list[host_index].weight;
-    }
-  }
-
-  for (host_index= 0; host_index < memcached_server_count(ptr); ++host_index)
-  {
-    if (is_auto_ejecting && list[host_index].next_retry > now.tv_sec)
-      continue;
-
-    if (is_ketama_weighted)
-    {
-        float pct = (float)list[host_index].weight / (float)total_weight;
-        pointer_per_server= (uint32_t) ((floorf((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001))) * 4);
-        pointer_per_hash= 4;
-#ifdef 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);
-#endif
-    }
-
-
-    if (ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY)
-    {
-      for (pointer_index= 0;
-           pointer_index < pointer_per_server / pointer_per_hash;
-           pointer_index++)
-      {
-        char sort_host[MEMCACHED_MAX_HOST_SORT_LENGTH]= "";
-        size_t sort_host_length;
-
-        // Spymemcached ketema key format is: hostname/ip:port-index
-        // If hostname is not available then: /ip:port-index
-        sort_host_length= (size_t) snprintf(sort_host, MEMCACHED_MAX_HOST_SORT_LENGTH,
-                                            "/%s:%u-%u",
-                                            list[host_index].hostname,
-                                            (uint32_t)list[host_index].port,
-                                            pointer_index);
-#ifdef DEBUG
-        printf("update_continuum: key is %s\n", sort_host);
-#endif
-
-        WATCHPOINT_ASSERT(sort_host_length);
-
-        if (is_ketama_weighted)
-        {
-          for (uint32_t x= 0; x < pointer_per_hash; x++)
-          {
-             value= ketama_server_hash(sort_host, sort_host_length, x);
-             ptr->continuum[continuum_index].index= host_index;
-             ptr->continuum[continuum_index++].value= value;
-          }
-        }
-        else
-        {
-          value= hashkit_digest(&ptr->distribution_hashkit, sort_host, sort_host_length);
-          ptr->continuum[continuum_index].index= host_index;
-          ptr->continuum[continuum_index++].value= value;
-        }
-      }
-    }
-    else
-    {
-      for (pointer_index= 1;
-           pointer_index <= pointer_per_server / pointer_per_hash;
-           pointer_index++)
-      {
-        char sort_host[MEMCACHED_MAX_HOST_SORT_LENGTH]= "";
-        size_t sort_host_length;
-
-        if (list[host_index].port == MEMCACHED_DEFAULT_PORT)
-        {
-          sort_host_length= (size_t) snprintf(sort_host, MEMCACHED_MAX_HOST_SORT_LENGTH,
-                                              "%s-%u",
-                                              list[host_index].hostname,
-                                              pointer_index - 1);
-        }
-        else
-        {
-          sort_host_length= (size_t) snprintf(sort_host, MEMCACHED_MAX_HOST_SORT_LENGTH,
-                                              "%s:%u-%u",
-                                              list[host_index].hostname,
-                                              (uint32_t)list[host_index].port,
-                                              pointer_index - 1);
-        }
-
-        WATCHPOINT_ASSERT(sort_host_length);
-
-        if (is_ketama_weighted)
-        {
-          for (uint32_t x = 0; x < pointer_per_hash; x++)
-          {
-             value= ketama_server_hash(sort_host, sort_host_length, x);
-             ptr->continuum[continuum_index].index= host_index;
-             ptr->continuum[continuum_index++].value= value;
-          }
-        }
-        else
-        {
-          value= hashkit_digest(&ptr->distribution_hashkit, sort_host, sort_host_length);
-          ptr->continuum[continuum_index].index= host_index;
-          ptr->continuum[continuum_index++].value= value;
-        }
-      }
-    }
-
-    pointer_counter+= pointer_per_server;
-  }
-
-  WATCHPOINT_ASSERT(ptr);
-  WATCHPOINT_ASSERT(ptr->continuum);
-  WATCHPOINT_ASSERT(memcached_server_count(ptr) * MEMCACHED_POINTS_PER_SERVER <= MEMCACHED_CONTINUUM_SIZE);
-  ptr->continuum_points_counter= pointer_counter;
-  qsort(ptr->continuum, ptr->continuum_points_counter, sizeof(memcached_continuum_item_st), continuum_item_cmp);
-
-#ifdef DEBUG
-  for (pointer_index= 0; memcached_server_count(ptr) && pointer_index < ((live_servers * MEMCACHED_POINTS_PER_SERVER) - 1); pointer_index++)
-  {
-    WATCHPOINT_ASSERT(ptr->continuum[pointer_index].value <= ptr->continuum[pointer_index + 1].value);
-  }
-#endif
-
-  return MEMCACHED_SUCCESS;
-}
-
-
-memcached_return_t memcached_server_push(memcached_st *ptr, const memcached_server_list_st list)
-{
-  uint32_t count;
-  memcached_server_st *new_host_list;
-
-  if (! list)
-    return MEMCACHED_SUCCESS;
-
-  count= memcached_server_list_count(list);
-  new_host_list= libmemcached_realloc(ptr, memcached_server_list(ptr),
-                                      sizeof(memcached_server_st) * (count + memcached_server_count(ptr)));
-
-  if (! new_host_list)
-    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-
-  memcached_server_list_set(ptr, new_host_list);
-
-  for (uint32_t x= 0; x < count; x++)
-  {
-    memcached_server_write_instance_st instance;
-
-    if ((ptr->flags.use_udp && list[x].type != MEMCACHED_CONNECTION_UDP)
-            || ((list[x].type == MEMCACHED_CONNECTION_UDP)
-            && ! (ptr->flags.use_udp)) )
-      return MEMCACHED_INVALID_HOST_PROTOCOL;
-
-    WATCHPOINT_ASSERT(list[x].hostname[0] != 0);
-
-    instance= memcached_server_instance_fetch(ptr, memcached_server_count(ptr));
-
-    /* TODO check return type */
-    (void)memcached_server_create_with(ptr, instance, list[x].hostname,
-                                       list[x].port, list[x].weight, list[x].type);
-    ptr->number_of_hosts++;
-  }
-
-  // Provides backwards compatibility with server list.
-  {
-    memcached_server_write_instance_st instance;
-    instance= memcached_server_instance_fetch(ptr, 0);
-    instance->number_of_hosts= memcached_server_count(ptr);
-  }
-
-  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 *ptr,
-                                                                const char *filename,
-                                                                uint32_t weight)
-{
-  if (! filename)
-    return MEMCACHED_FAILURE;
-
-  return server_add(ptr, filename, 0, weight, MEMCACHED_CONNECTION_UNIX_SOCKET);
-}
-
-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 *ptr,
-                                                        const char *hostname,
-                                                        in_port_t port,
-                                                        uint32_t weight)
-{
-  if (! port)
-    port= MEMCACHED_DEFAULT_PORT;
-
-  if (! hostname)
-    hostname= "localhost";
-
-  return server_add(ptr, hostname, port, weight, MEMCACHED_CONNECTION_UDP);
-}
-
-memcached_return_t memcached_server_add(memcached_st *ptr,
-                                        const char *hostname,
-                                        in_port_t port)
-{
-  return memcached_server_add_with_weight(ptr, hostname, port, 0);
-}
-
-memcached_return_t memcached_server_add_with_weight(memcached_st *ptr,
-                                                    const char *hostname,
-                                                    in_port_t port,
-                                                    uint32_t weight)
-{
-  if (! port)
-    port= MEMCACHED_DEFAULT_PORT;
-
-  if (! hostname)
-    hostname= "localhost";
-
-  return server_add(ptr, hostname, port, weight, MEMCACHED_CONNECTION_TCP);
-}
-
-static memcached_return_t server_add(memcached_st *ptr, const char *hostname,
-                                     in_port_t port,
-                                     uint32_t weight,
-                                     memcached_connection_t type)
-{
-  memcached_server_st *new_host_list;
-  memcached_server_write_instance_st instance;
-
-  if ( (ptr->flags.use_udp && type != MEMCACHED_CONNECTION_UDP)
-      || ( (type == MEMCACHED_CONNECTION_UDP) && (! ptr->flags.use_udp) ) )
-    return MEMCACHED_INVALID_HOST_PROTOCOL;
-
-  new_host_list= libmemcached_realloc(ptr, memcached_server_list(ptr),
-                                      sizeof(memcached_server_st) * (ptr->number_of_hosts + 1));
-
-  if (new_host_list == NULL)
-    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-
-  memcached_server_list_set(ptr, new_host_list);
-
-  /* TODO: Check return type */
-  instance= memcached_server_instance_fetch(ptr, memcached_server_count(ptr));
-  (void)memcached_server_create_with(ptr, instance, hostname, port, weight, type);
-  ptr->number_of_hosts++;
-
-  instance= memcached_server_instance_fetch(ptr, 0);
-  memcached_servers_set_count(instance, memcached_server_count(ptr));
-
-  return run_distribution(ptr);
-}
@@ -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 <libmemcached/common.h>
+#include "libmemcached/assert.hpp"
+
+#include <cmath>
+#include <sys/time.h>
+
+/* 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);
+}
@@ -2,175 +2,154 @@
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-EXTRA_DIST+= \
-	     libmemcached/configure.h.in \
-	     libmemcached/libmemcached_probes.d \
-	     libmemcached/memcached/README.txt
-
-noinst_HEADERS+= \
-		 libmemcached/byteorder.h \
-		 libmemcached/common.h \
-		 libmemcached/do.h \
-		 libmemcached/internal.h \
-		 libmemcached/io.h \
-		 libmemcached/libmemcached_probes.h \
-		 libmemcached/protocol/ascii_handler.h \
-		 libmemcached/protocol/binary_handler.h \
-		 libmemcached/protocol/common.h \
-		 libmemcached/response.h
-
-nobase_include_HEADERS+= \
-			 libmemcached/allocators.h \
-			 libmemcached/analyze.h \
-			 libmemcached/auto.h \
-			 libmemcached/behavior.h \
-			 libmemcached/callback.h \
-			 libmemcached/configure.h \
-			 libmemcached/constants.h \
-			 libmemcached/delete.h \
-			 libmemcached/dump.h \
-			 libmemcached/exception.hpp \
-			 libmemcached/fetch.h \
-			 libmemcached/flush.h \
-			 libmemcached/flush_buffers.h \
-			 libmemcached/get.h \
-			 libmemcached/hash.h \
-			 libmemcached/memcached.h \
-			 libmemcached/memcached.hpp \
-			 libmemcached/memcached/protocol_binary.h \
-			 libmemcached/parse.h \
-                         libmemcached/platform.h \
-			 libmemcached/protocol/cache.h \
-			 libmemcached/protocol/callback.h \
-			 libmemcached/protocol_handler.h \
-			 libmemcached/quit.h \
-			 libmemcached/result.h \
-                         libmemcached/sasl.h \
-			 libmemcached/server.h \
-			 libmemcached/server_list.h \
-			 libmemcached/stats.h \
-			 libmemcached/storage.h \
-			 libmemcached/strerror.h \
-			 libmemcached/string.h \
-			 libmemcached/types.h \
-			 libmemcached/verbosity.h \
-			 libmemcached/version.h \
-			 libmemcached/visibility.h \
-			 libmemcached/watchpoint.h
-
-lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la
-libmemcached_libmemcachedprotocol_la_SOURCES =  \
-						libmemcached/protocol/ascii_handler.c \
-						libmemcached/protocol/binary_handler.c \
-						libmemcached/protocol/cache.c \
-						libmemcached/protocol/pedantic.c \
-						libmemcached/protocol/protocol_handler.c
-
-libmemcached_libmemcachedprotocol_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION} ${PTHREAD_CFLAGS}
-libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} ${PTHREAD_LIBS} -version-info ${MEMCACHED_PROTOCAL_LIBRARY_VERSION}
-
-noinst_LTLIBRARIES+= \
-		     libmemcached/libmemcachedcallbacks.la
-
-libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING}
-libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
-
-# 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+= libmemcached/libmemcachedinternal.la
-libmemcached_libmemcachedinternal_la_SOURCES= \
-					      libmemcached/string.c
+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
-libmemcached_libmemcached_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION}
-libmemcached_libmemcached_la_SOURCES = \
-				       libmemcached/allocators.c \
-				       libmemcached/analyze.c \
-				       libmemcached/auto.c \
-				       libmemcached/behavior.c \
-				       libmemcached/connect.c \
-				       libmemcached/delete.c \
-				       libmemcached/do.c \
-				       libmemcached/dump.c \
-				       libmemcached/fetch.c \
-				       libmemcached/flush.c \
-				       libmemcached/flush_buffers.c \
-				       libmemcached/get.c \
-				       libmemcached/hash.c \
-				       libmemcached/hosts.c \
-				       libmemcached/io.c \
-				       libmemcached/key.c \
-				       libmemcached/memcached.c \
-				       libmemcached/parse.c \
-				       libmemcached/purge.c \
-				       libmemcached/quit.c \
-				       libmemcached/response.c \
-				       libmemcached/result.c \
-				       libmemcached/server.c \
-				       libmemcached/server_list.c \
-				       libmemcached/stats.c \
-				       libmemcached/storage.c \
-				       libmemcached/strerror.c \
-				       libmemcached/verbosity.c \
-				       libmemcached/version.c
-
-
-libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la libhashkit/libhashkitinc.la
-libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la libhashkit/libhashkitinc.la
-libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info ${MEMCACHED_LIBRARY_VERSION}
-
-if BUILD_LIBMEMCACHEDUTIL
-nobase_include_HEADERS+= \
-			 libmemcached/memcached_util.h \
-			 libmemcached/util.h \
-			 libmemcached/util/ping.h \
-			 libmemcached/util/pool.h \
-			 libmemcached/util/version.h
-lib_LTLIBRARIES+= libmemcached/libmemcachedutil.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_libmemcachedutil_la_SOURCES= \
-					  libmemcached/util/ping.c \
-					  libmemcached/util/pool.c \
-					  libmemcached/util/version.c
-libmemcached_libmemcachedutil_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION} ${PTHREAD_CFLAGS}
-libmemcached_libmemcachedutil_la_LIBADD= libmemcached/libmemcached.la
-libmemcached_libmemcachedutil_la_LDFLAGS= ${AM_LDFLAGS} ${PTHREAD_LIBS} -version-info ${MEMCACHED_UTIL_LIBRARY_VERSION}
-libmemcached_libmemcachedutil_la_DEPENDENCIES= libmemcached/libmemcached.la
-
-if BUILD_BYTEORDER
-noinst_LTLIBRARIES += libmemcached/libbyteorder.la
-libmemcached_libbyteorder_la_SOURCES= libmemcached/byteorder.c
-libmemcached_libmemcached_la_LIBADD += libmemcached/libbyteorder.la
-libmemcached_libmemcached_la_DEPENDENCIES+= libmemcached/libbyteorder.la
-libmemcached_libmemcachedprotocol_la_LIBADD=libmemcached/libbyteorder.la
-libmemcached_libmemcachedprotocol_la_DEPENDENCIES=libmemcached/libbyteorder.la
-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_LDFLAGS+= $(LIBSASL)
-libmemcached_libmemcached_la_SOURCES += libmemcached/sasl.c
+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
-endif
+CLEANFILES+= libmemcached/libmemcached_probes.o
 
-if DTRACE_NEEDS_OBJECTS
+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
-libmemcached_libmemcached_la_DEPENDENCIES += libmemcached/libmemcached_probes.o
-CLEANFILES+= libmemcached/libmemcached_probes.o
 endif
 
 SUFFIXES+= .d
 
 libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d
-	$(DTRACE) $(DTRACEFLAGS) -h -o libmemcached/dtrace_probes.h -s ${top_srcdir}/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} config.h
+libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS}
 
 .d.o:
-	$(DTRACE) $(DTRACEFLAGS) -o libmemcached/libmemcached_probes.o -G -s ${top_srcdir}/libmemcached/libmemcached_probes.d `grep '^pic_object' ${top_builddir}/libmemcached/*.lo | cut -f 2 -d\' | sed "s/^/${top_builddir}\/libmemcached\//"`
-
+	$(DTRACE) $(DTRACEFLAGS) -o $@ -G -s libmemcached/libmemcached_probes.d
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -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);
@@ -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 <libmemcached/common.h>
+
+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<memcached_st *>(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;
+}
@@ -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 <netdb.h>
+# 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 *);
@@ -1,18 +1,41 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary: Internal functions used by the library. Not for public use!
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_INTERNAL_H__
-#define __LIBMEMCACHED_INTERNAL_H__
-
-#if defined(BUILDING_LIBMEMCACHED)
+#pragma once
 
 #ifdef __cplusplus
 extern "C" {
@@ -21,6 +44,3 @@ extern "C" {
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* BUILDING_LIBMEMCACHED */
-#endif /* __LIBMEMCACHED_INTERNAL_H__ */
@@ -1,798 +0,0 @@
-/* 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: Server IO, Not public!
- *
- */
-
-
-#include "common.h"
-
-typedef enum {
-  MEM_READ,
-  MEM_WRITE
-} memc_read_or_write;
-
-static ssize_t io_flush(memcached_server_write_instance_st ptr,
-                        memcached_return_t *error);
-static void increment_udp_message_id(memcached_server_write_instance_st ptr);
-
-static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
-                                  memc_read_or_write read_or_write)
-{
-  struct pollfd fds= {
-    .fd= ptr->fd,
-    .events = POLLIN
-  };
-  int error;
-
-  if (read_or_write == MEM_WRITE) /* write */
-  {
-    fds.events= POLLOUT;
-    WATCHPOINT_SET(ptr->io_wait_count.write++);
-  }
-  else
-  {
-    WATCHPOINT_SET(ptr->io_wait_count.read++);
-  }
-
-  /*
-   ** 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 (read_or_write == MEM_WRITE)
-  {
-    memcached_return_t rc= memcached_purge(ptr);
-    if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
-      return MEMCACHED_FAILURE;
-  }
-
-  int timeout= ptr->root->poll_timeout;
-  if (ptr->root->flags.no_block == false)
-    timeout= -1;
-
-  size_t loop_max= 5;
-  while (--loop_max) // While loop is for ERESTART or EINTR
-  {
-    error= poll(&fds, 1, timeout);
-
-    switch (error)
-    {
-    case 1: // Success!
-      WATCHPOINT_IF_LABELED_NUMBER(read_or_write && loop_max < 4, "read() times we had to loop, decremented down from 5", loop_max);
-      WATCHPOINT_IF_LABELED_NUMBER(!read_or_write && loop_max < 4, "write() times we had to loop, decremented down from 5", loop_max);
-
-      return MEMCACHED_SUCCESS;
-    case 0: // Timeout occured, we let the while() loop do its thing.
-      return MEMCACHED_TIMEOUT;
-    default:
-      WATCHPOINT_ERRNO(get_socket_errno());
-      switch (get_socket_errno())
-      {
-#ifdef TARGET_OS_LINUX
-      case ERESTART:
-#endif
-      case EINTR:
-        break;
-      default:
-        if (fds.revents & POLLERR)
-        {
-          int err;
-          socklen_t len= sizeof (err);
-          (void)getsockopt(ptr->fd, SOL_SOCKET, SO_ERROR, &err, &len);
-          ptr->cached_errno= (err == 0) ? get_socket_errno() : err;
-        }
-        else
-        {
-          ptr->cached_errno= get_socket_errno();
-        }
-        memcached_quit_server(ptr, true);
-
-        return MEMCACHED_FAILURE;
-      }
-    }
-  }
-
-  /* Imposssible for anything other then -1 */
-  WATCHPOINT_ASSERT(error == -1);
-  ptr->cached_errno= get_socket_errno();
-  memcached_quit_server(ptr, true);
-
-  return MEMCACHED_FAILURE;
-}
-
-/**
- * Try to fill the input buffer for a server with as much
- * data as possible.
- *
- * @param ptr the server to pack
- */
-static bool repack_input_buffer(memcached_server_write_instance_st ptr)
-{
-  if (ptr->read_ptr != ptr->read_buffer)
-  {
-    /* Move all of the data to the beginning of the buffer so
-     ** that we can fit more data into the buffer...
-   */
-    memmove(ptr->read_buffer, ptr->read_ptr, ptr->read_buffer_length);
-    ptr->read_ptr= ptr->read_buffer;
-    ptr->read_data_length= ptr->read_buffer_length;
-  }
-
-  /* There is room in the buffer, try to fill it! */
-  if (ptr->read_buffer_length != MEMCACHED_MAX_BUFFER)
-  {
-    /* Just try a single read to grab what's available */
-    ssize_t nr= recv(ptr->fd,
-                     ptr->read_ptr + ptr->read_data_length,
-                     MEMCACHED_MAX_BUFFER - ptr->read_data_length,
-                     0);
-
-    if (nr > 0)
-    {
-      ptr->read_data_length+= (size_t)nr;
-      ptr->read_buffer_length+= (size_t)nr;
-      return true;
-    }
-  }
-  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 ptr the server to star processing iput messages for
- * @return true if we processed anything, false otherwise
- */
-static bool process_input_buffer(memcached_server_write_instance_st ptr)
-{
-  /*
-   ** We might be able to process some of the response messages if we
-   ** have a callback set up
- */
-  if (ptr->root->callbacks != NULL && ptr->root->flags.use_udp == false)
-  {
-    /*
-     * We might have responses... try to read them out and fire
-     * callbacks
-   */
-    memcached_callback_st cb= *ptr->root->callbacks;
-
-    memcached_set_processing_input((memcached_st *)ptr->root, true);
-
-    char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-    memcached_return_t error;
-    memcached_st *root= (memcached_st *)ptr->root;
-    error= memcached_response(ptr, 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])(ptr->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 inline void memcached_io_cork_push(memcached_server_st *ptr)
-{
-  (void)ptr;
-#ifdef CORK
-  if (ptr->root->flags.cork == false || ptr->state.is_corked)
-    return;
-
-  int enable= 1;
-  int err= setsockopt(ptr->fd, IPPROTO_TCP, CORK,
-                      &enable, (socklen_t)sizeof(int));
-  if (! err)
-    ptr->state.is_corked= true;
-
-  WATCHPOINT_ASSERT(ptr->state.is_corked == true);
-#endif
-}
-
-static inline void memcached_io_cork_pop(memcached_server_st *ptr)
-{
-  (void)ptr;
-#ifdef CORK
-  if (ptr->root->flags.cork == false || ptr->state.is_corked == false)
-    return;
-
-  int enable= 0;
-  int err= setsockopt(ptr->fd, IPPROTO_TCP, CORK,
-                      &enable, (socklen_t)sizeof(int));
-  if (! err)
-    ptr->state.is_corked= false;
-
-  WATCHPOINT_ASSERT(ptr->state.is_corked == false);
-#endif
-}
-
-#if 0 // Dead code, this should be removed.
-void memcached_io_preread(memcached_st *ptr)
-{
-  unsigned int x;
-
-  return;
-
-  for (x= 0; x < memcached_server_count(ptr); x++)
-  {
-    if (memcached_server_response_count(ptr, x) &&
-        ptr->hosts[x].read_data_length < MEMCACHED_MAX_BUFFER )
-    {
-      size_t data_read;
-
-      data_read= recv(ptr->hosts[x].fd,
-                      ptr->hosts[x].read_ptr + ptr->hosts[x].read_data_length,
-                      MEMCACHED_MAX_BUFFER - ptr->hosts[x].read_data_length, 0);
-      if (data_read == SOCKET_ERROR)
-        continue;
-
-      ptr->hosts[x].read_buffer_length+= data_read;
-      ptr->hosts[x].read_data_length+= data_read;
-    }
-  }
-}
-#endif
-
-memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr,
-                                     void *buffer, size_t length, ssize_t *nread)
-{
-  char *buffer_ptr;
-
-  buffer_ptr= buffer;
-
-  while (length)
-  {
-    if (!ptr->read_buffer_length)
-    {
-      ssize_t data_read;
-
-      while (1)
-      {
-        data_read= recv(ptr->fd, ptr->read_buffer, MEMCACHED_MAX_BUFFER, 0);
-        if (data_read > 0)
-        {
-          break;
-        }
-        else if (data_read == SOCKET_ERROR)
-        {
-          ptr->cached_errno= get_socket_errno();
-          memcached_return_t rc= MEMCACHED_ERRNO;
-          switch (get_socket_errno())
-          {
-          case EWOULDBLOCK:
-#ifdef USE_EAGAIN
-          case EAGAIN:
-#endif
-          case EINTR:
-#ifdef TARGET_OS_LINUX
-          case ERESTART:
-#endif
-            if ((rc= io_wait(ptr, MEM_READ)) == MEMCACHED_SUCCESS)
-              continue;
-            /* fall through */
-
-          default:
-            {
-              memcached_quit_server(ptr, true);
-              *nread= -1;
-              return rc;
-            }
-          }
-        }
-        else
-        {
-          /*
-            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.
-          */
-          WATCHPOINT_STRING("We had a zero length recv()");
-          memcached_quit_server(ptr, true);
-          *nread= -1;
-          return MEMCACHED_UNKNOWN_READ_FAILURE;
-        }
-      }
-
-      ptr->io_bytes_sent = 0;
-      ptr->read_data_length= (size_t) data_read;
-      ptr->read_buffer_length= (size_t) data_read;
-      ptr->read_ptr= ptr->read_buffer;
-    }
-
-    if (length > 1)
-    {
-      size_t difference;
-
-      difference= (length > ptr->read_buffer_length) ? ptr->read_buffer_length : length;
-
-      memcpy(buffer_ptr, ptr->read_ptr, difference);
-      length -= difference;
-      ptr->read_ptr+= difference;
-      ptr->read_buffer_length-= difference;
-      buffer_ptr+= difference;
-    }
-    else
-    {
-      *buffer_ptr= *ptr->read_ptr;
-      ptr->read_ptr++;
-      ptr->read_buffer_length--;
-      buffer_ptr++;
-      break;
-    }
-  }
-
-  ptr->server_failure_counter= 0;
-  *nread = (ssize_t)(buffer_ptr - (char*)buffer);
-  return MEMCACHED_SUCCESS;
-}
-
-static ssize_t _io_write(memcached_server_write_instance_st ptr,
-                         const void *buffer, size_t length, bool with_flush)
-{
-  size_t original_length;
-  const char* buffer_ptr;
-
-  WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-
-  original_length= length;
-  buffer_ptr= buffer;
-
-  /* more writable data is coming if a flush isn't required, so delay send */
-  if (! with_flush)
-  {
-    memcached_io_cork_push(ptr);
-  }
-
-  while (length)
-  {
-    char *write_ptr;
-    size_t should_write;
-    size_t buffer_end;
-
-    if (ptr->type == MEMCACHED_CONNECTION_UDP)
-    {
-      //UDP does not support partial writes
-      buffer_end= MAX_UDP_DATAGRAM_LENGTH;
-      should_write= length;
-      if (ptr->write_buffer_offset + should_write > buffer_end)
-        return -1;
-    }
-    else
-    {
-      buffer_end= MEMCACHED_MAX_BUFFER;
-      should_write= buffer_end - ptr->write_buffer_offset;
-      should_write= (should_write < length) ? should_write : length;
-    }
-
-    write_ptr= ptr->write_buffer + ptr->write_buffer_offset;
-    memcpy(write_ptr, buffer_ptr, should_write);
-    ptr->write_buffer_offset+= should_write;
-    buffer_ptr+= should_write;
-    length-= should_write;
-
-    if (ptr->write_buffer_offset == buffer_end && ptr->type != MEMCACHED_CONNECTION_UDP)
-    {
-      memcached_return_t rc;
-      ssize_t sent_length;
-
-      WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-      sent_length= io_flush(ptr, &rc);
-      if (sent_length == -1)
-        return -1;
-
-      /* If io_flush calls memcached_purge, sent_length may be 0 */
-      unlikely (sent_length != 0)
-      {
-        WATCHPOINT_ASSERT(sent_length == (ssize_t)buffer_end);
-      }
-    }
-  }
-
-  if (with_flush)
-  {
-    memcached_return_t rc;
-    WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-    if (io_flush(ptr, &rc) == -1)
-    {
-      return -1;
-    }
-
-    memcached_io_cork_pop(ptr);
-  }
-
-  return (ssize_t) original_length;
-}
-
-ssize_t memcached_io_write(memcached_server_write_instance_st ptr,
-                           const void *buffer, size_t length, bool with_flush)
-{
-  return _io_write(ptr, buffer, length, with_flush);
-}
-
-ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
-                            const struct libmemcached_io_vector_st *vector,
-                            size_t number_of, bool with_flush)
-{
-  ssize_t total= 0;
-
-  for (size_t x= 0; x < number_of; x++, vector++)
-  {
-    ssize_t returnable;
-
-    if ((returnable= _io_write(ptr, vector->buffer, vector->length, false)) == -1)
-    {
-      return -1;
-    }
-    total+= returnable;
-  }
-
-  if (with_flush)
-  {
-    if (memcached_io_write(ptr, NULL, 0, true) == -1)
-    {
-      return -1;
-    }
-  }
-
-  return total;
-}
-
-
-memcached_return_t memcached_io_close(memcached_server_write_instance_st ptr)
-{
-  if (ptr->fd == INVALID_SOCKET)
-  {
-    return MEMCACHED_SUCCESS;
-  }
-
-  /* in case of death shutdown to avoid blocking at close() */
-  if (shutdown(ptr->fd, SHUT_RDWR) == SOCKET_ERROR && get_socket_errno() != ENOTCONN)
-  {
-    WATCHPOINT_NUMBER(ptr->fd);
-    WATCHPOINT_ERRNO(get_socket_errno());
-    WATCHPOINT_ASSERT(get_socket_errno());
-  }
-
-  if (closesocket(ptr->fd) == SOCKET_ERROR)
-  {
-    WATCHPOINT_ERRNO(get_socket_errno());
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st *memc)
-{
-#define MAX_SERVERS_TO_POLL 100
-  struct pollfd fds[MAX_SERVERS_TO_POLL];
-  unsigned int host_index= 0;
-
-  for (uint32_t x= 0;
-       x< memcached_server_count(memc) && host_index < MAX_SERVERS_TO_POLL;
-       ++x)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(memc, x);
-
-    if (instance->read_buffer_length > 0) /* I have data in the buffer */
-      return instance;
-
-    if (memcached_server_response_count(instance) > 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_server_write_instance_st instance=
-        memcached_server_instance_fetch(memc, x);
-
-      if (memcached_server_response_count(instance) > 0)
-      {
-        return instance;
-      }
-    }
-
-    return NULL;
-  }
-
-  int err= poll(fds, host_index, memc->poll_timeout);
-  switch (err) {
-  case -1:
-    memc->cached_errno = get_socket_errno();
-    /* FALLTHROUGH */
-  case 0:
-    break;
-  default:
-    for (size_t x= 0; x < host_index; ++x)
-    {
-      if (fds[x].revents & POLLIN)
-      {
-        for (uint32_t y= 0; y < memcached_server_count(memc); ++y)
-        {
-          memcached_server_write_instance_st instance=
-            memcached_server_instance_fetch(memc, y);
-
-          if (instance->fd == fds[x].fd)
-            return instance;
-        }
-      }
-    }
-  }
-
-  return NULL;
-}
-
-static ssize_t io_flush(memcached_server_write_instance_st ptr,
-                        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..
- */
-  {
-    memcached_return_t rc;
-    WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-    rc= memcached_purge(ptr);
-
-    if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
-      return -1;
-  }
-  ssize_t sent_length;
-  size_t return_length;
-  char *local_write_ptr= ptr->write_buffer;
-  size_t write_length= ptr->write_buffer_offset;
-
-  *error= MEMCACHED_SUCCESS;
-
-  WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-
-  // UDP Sanity check, make sure that we are not sending somthing too big
-  if (ptr->type == MEMCACHED_CONNECTION_UDP && write_length > MAX_UDP_DATAGRAM_LENGTH)
-    return -1;
-
-  if (ptr->write_buffer_offset == 0 || (ptr->type == MEMCACHED_CONNECTION_UDP
-                                        && ptr->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH))
-    return 0;
-
-  /* Looking for memory overflows */
-#if defined(DEBUG)
-  if (write_length == MEMCACHED_MAX_BUFFER)
-    WATCHPOINT_ASSERT(ptr->write_buffer == local_write_ptr);
-  WATCHPOINT_ASSERT((ptr->write_buffer + MEMCACHED_MAX_BUFFER) >= (local_write_ptr + write_length));
-#endif
-
-  return_length= 0;
-  while (write_length)
-  {
-    WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
-    WATCHPOINT_ASSERT(write_length > 0);
-    sent_length= 0;
-    if (ptr->type == MEMCACHED_CONNECTION_UDP)
-      increment_udp_message_id(ptr);
-
-    sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
-    if (sent_length == SOCKET_ERROR)
-    {
-      ptr->cached_errno= get_socket_errno();
-#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;
-      case EWOULDBLOCK:
-#ifdef USE_EAGAIN
-      case EAGAIN:
-#endif
-        {
-          /*
-           * 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(ptr) ||
-              process_input_buffer(ptr))
-            continue;
-
-          memcached_return_t rc;
-          rc= io_wait(ptr, MEM_WRITE);
-
-          if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_TIMEOUT)
-            continue;
-
-          memcached_quit_server(ptr, true);
-          return -1;
-        }
-      default:
-        memcached_quit_server(ptr, true);
-        *error= MEMCACHED_ERRNO;
-        return -1;
-      }
-    }
-
-    if (ptr->type == MEMCACHED_CONNECTION_UDP &&
-        (size_t)sent_length != write_length)
-    {
-      memcached_quit_server(ptr, true);
-      return -1;
-    }
-
-    ptr->io_bytes_sent += (uint32_t) sent_length;
-
-    local_write_ptr+= sent_length;
-    write_length-= (uint32_t) sent_length;
-    return_length+= (uint32_t) sent_length;
-  }
-
-  WATCHPOINT_ASSERT(write_length == 0);
-  // Need to study this assert() WATCHPOINT_ASSERT(return_length ==
-  // ptr->write_buffer_offset);
-
-  // if we are a udp server, the begining of the buffer is reserverd for
-  // the upd frame header
-  if (ptr->type == MEMCACHED_CONNECTION_UDP)
-    ptr->write_buffer_offset= UDP_DATAGRAM_HEADER_LENGTH;
-  else
-    ptr->write_buffer_offset= 0;
-
-  return (ssize_t) return_length;
-}
-
-/*
-  Eventually we will just kill off the server with the problem.
-*/
-void memcached_io_reset(memcached_server_write_instance_st ptr)
-{
-  memcached_quit_server(ptr, 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_server_write_instance_st ptr,
-                                       void *dta,
-                                       size_t size)
-{
-  size_t offset= 0;
-  char *data= dta;
-
-  while (offset < size)
-  {
-    ssize_t nread;
-    memcached_return_t rc= memcached_io_read(ptr, data + offset, size - offset,
-                                             &nread);
-    if (rc != MEMCACHED_SUCCESS)
-      return rc;
-
-    offset+= (size_t) nread;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr,
-                                         char *buffer_ptr,
-                                         size_t size)
-{
-  bool line_complete= false;
-  size_t total_nr= 0;
-
-  while (!line_complete)
-  {
-    if (ptr->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(ptr, buffer_ptr, 1, &nread);
-      if (rc != MEMCACHED_SUCCESS)
-        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 (ptr->read_buffer_length && total_nr < size && !line_complete)
-    {
-      *buffer_ptr = *ptr->read_ptr;
-      if (*buffer_ptr == '\n')
-        line_complete = true;
-      --ptr->read_buffer_length;
-      ++ptr->read_ptr;
-      ++total_nr;
-      ++buffer_ptr;
-    }
-
-    if (total_nr == size)
-      return MEMCACHED_PROTOCOL_ERROR;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-/*
- * 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
- */
-static void increment_udp_message_id(memcached_server_write_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));
-}
-
-memcached_return_t memcached_io_init_udp_header(memcached_server_write_instance_st ptr, 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;
-}
@@ -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 <libmemcached/common.h>
+
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#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<char *>(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<const char *>(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<char *>(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;
+}
@@ -1,93 +1,45 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  LibMemcached
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker
+ *  All rights reserved.
  *
- * Summary: Server IO, Not public!
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_IO_H__
-#define __LIBMEMCACHED_IO_H__
-
-#if defined(BUILDING_LIBMEMCACHED)
-
-#include "libmemcached/memcached.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#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;
-};
+#pragma once
 
 struct libmemcached_io_vector_st
 {
-  size_t length;
   const void *buffer;
+  size_t length;
 };
-
-LIBMEMCACHED_LOCAL
-ssize_t memcached_io_writev(memcached_server_write_instance_st ptr,
-                            const struct libmemcached_io_vector_st *vector,
-                            size_t number_of, bool with_flush);
-
-LIBMEMCACHED_LOCAL
-ssize_t memcached_io_write(memcached_server_write_instance_st ptr,
-                           const void *buffer, size_t length, bool with_flush);
-
-LIBMEMCACHED_LOCAL
-void memcached_io_reset(memcached_server_write_instance_st ptr);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr,
-                                     void *buffer, size_t length, ssize_t *nread);
-
-/* Read a line (terminated by '\n') into the buffer */
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr,
-                                         char *buffer_ptr,
-                                         size_t size);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_io_close(memcached_server_write_instance_st ptr);
-
-/* Read n bytes of data from the server and store them in dta */
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_safe_read(memcached_server_write_instance_st ptr,
-                                       void *dta,
-                                       size_t size);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_io_init_udp_header(memcached_server_write_instance_st ptr,
-                                                uint16_t thread_id);
-
-LIBMEMCACHED_LOCAL
-memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st *memc);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BUILDING_LIBMEMCACHED */
-
-#endif /* __LIBMEMCACHED_IO_H__ */
@@ -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);
@@ -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)
@@ -1,27 +0,0 @@
-#include "common.h"
-
-memcached_return_t memcached_key_test(const char * const *keys,
-                                      const size_t *key_length,
-                                      size_t number_of_keys)
-{
-  uint32_t x;
-  memcached_return_t rc;
-
-  for (x= 0; x < number_of_keys; x++)
-  {
-    size_t y;
-
-    rc= memcached_validate_key_length(*(key_length + x), false);
-    if (rc != MEMCACHED_SUCCESS)
-      return rc;
- 
-    for (y= 0; y < *(key_length + x); y++)
-    {
-      if ((isgraph(keys[x][y])) == 0)
-        return MEMCACHED_BAD_KEY_PROVIDED;
-    }
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
@@ -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 <libmemcached/common.h>
+
+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;
+}
+
@@ -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);
+
@@ -19,6 +19,8 @@ provider libmemcached {
 	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();
@@ -1,22 +1,49 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Libmemcached library
  *
- * Summary:
+ *  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 :)
  */
-#ifndef	__LIBMEMCACHED_PROBES_H__
-#define	__LIBMEMCACHED_PROBES_H__
 
 #ifdef HAVE_DTRACE
 /*
@@ -59,6 +86,10 @@
 #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()
@@ -85,5 +116,3 @@
 #define	LIBMEMCACHED_MEMCACHED_SET_START_ENABLED() (0)
 
 #endif
-
-#endif	/* __LIBMEMCACHED_PROBES_H__ */
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 /*
  * Copyright (c) <2008>, Sun Microsystems, Inc.
  * All rights reserved.
@@ -35,6 +36,8 @@
 #ifndef PROTOCOL_BINARY_H
 #define PROTOCOL_BINARY_H
 
+#include <libmemcachedprotocol-0.0/vbucket.h>
+
 /**
  * \addtogroup Protocol
  * @{
@@ -72,14 +75,15 @@ extern "C"
         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_PAUSE = 0xfe00,
-        PROTOCOL_BINARY_RESPONSE_EIO = 0xff00
-
+        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;
 
     /**
@@ -114,6 +118,12 @@ extern "C"
         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,
@@ -135,9 +145,30 @@ extern "C"
         PROTOCOL_BINARY_CMD_RINCR     = 0x39,
         PROTOCOL_BINARY_CMD_RINCRQ    = 0x3a,
         PROTOCOL_BINARY_CMD_RDECR     = 0x3b,
-        PROTOCOL_BINARY_CMD_RDECRQ    = 0x3c
+        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;
 
     /**
@@ -159,7 +190,7 @@ extern "C"
             uint16_t keylen;
             uint8_t extlen;
             uint8_t datatype;
-            uint16_t reserved;
+            uint16_t vbucket;
             uint32_t bodylen;
             uint32_t opaque;
             uint64_t cas;
@@ -189,12 +220,13 @@ extern "C"
     /**
      * Definition of a request-packet containing no extras
      */
-    typedef union {
+    union protocol_binary_request_no_extras {
         struct {
             protocol_binary_request_header header;
         } message;
         uint8_t bytes[sizeof(protocol_binary_request_header)];
-    } protocol_binary_request_no_extras;
+    };
+    typedef union protocol_binary_request_no_extras protocol_binary_request_no_extras;
 
     /**
      * Definition of a response-packet containing no extras
@@ -391,6 +423,64 @@ extern "C"
     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
      *
@@ -425,6 +515,209 @@ extern "C"
     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;
+
+
     /**
      * @}
      */
@@ -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
@@ -1,328 +0,0 @@
-/* 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 "common.h"
-
-static const memcached_st global_copy= {
-  .state= {
-    .is_purging= false,
-    .is_processing_input= false,
-    .is_time_for_rebuild= false,
-  },
-  .flags= {
-    .auto_eject_hosts= false,
-    .binary_protocol= false,
-    .buffer_requests= false,
-    .cork= false,
-    .hash_with_prefix_key= false,
-    .ketama_weighted= false,
-    .no_block= false,
-    .no_reply= false,
-    .randomize_replica_read= false,
-    .reuse_memory= false,
-    .support_cas= false,
-    .tcp_nodelay= false,
-    .use_cache_lookups= false,
-    .use_sort_hosts= false,
-    .use_udp= false,
-    .verify_key= false,
-    .tcp_keepalive= false
-  }
-};
-
-static inline bool _memcached_init(memcached_st *self)
-{
-  self->state= global_copy.state;
-  self->flags= global_copy.flags;
-
-  self->distribution= MEMCACHED_DISTRIBUTION_MODULA;
-
-  hashkit_st *hash_ptr;
-  hash_ptr= hashkit_create(&self->hashkit);
-  if (! hash_ptr)
-    return false;
-
-  self->continuum_points_counter= 0;
-
-  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= 0;
-
-  /* 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->cached_errno= 0;
-  self->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT;
-  self->connect_timeout= MEMCACHED_DEFAULT_CONNECT_TIMEOUT;
-  self->retry_timeout= 0;
-  self->continuum_count= 0;
-
-  self->send_size= -1;
-  self->recv_size= -1;
-
-  self->user_data= NULL;
-  self->next_distribution_rebuild= 0;
-  self->prefix_key_length= 0;
-  self->number_of_replicas= 0;
-  hash_ptr= hashkit_create(&self->distribution_hashkit);
-  if (! hash_ptr)
-    return false;
-  self->continuum= NULL;
-
-  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;
-
-  return true;
-}
-
-memcached_st *memcached_create(memcached_st *ptr)
-{
-  if (ptr == NULL)
-  {
-    ptr= (memcached_st *)malloc(sizeof(memcached_st));
-
-    if (! ptr)
-    {
-      return NULL; /*  MEMCACHED_MEMORY_ALLOCATION_FAILURE */
-    }
-
-    ptr->options.is_allocated= true;
-  }
-  else
-  {
-    ptr->options.is_allocated= false;
-  }
-
-#if 0
-  memcached_set_purging(ptr, false);
-  memcached_set_processing_input(ptr, false);
-#endif
-
-  if (! _memcached_init(ptr))
-  {
-    memcached_free(ptr);
-    return NULL;
-  }
-
-  if (! memcached_result_create(ptr, &ptr->result))
-  {
-    memcached_free(ptr);
-    return NULL;
-  }
-
-  WATCHPOINT_ASSERT_INITIALIZED(&ptr->result);
-
-  return ptr;
-}
-
-void memcached_servers_reset(memcached_st *ptr)
-{
-  memcached_server_list_free(memcached_server_list(ptr));
-
-  memcached_server_list_set(ptr, NULL);
-  ptr->number_of_hosts= 0;
-  if (ptr->last_disconnected_server)
-  {
-    memcached_server_free(ptr->last_disconnected_server);
-  }
-  ptr->last_disconnected_server= NULL;
-  ptr->server_failure_limit= 0;
-}
-
-void memcached_reset_last_disconnected_server(memcached_st *ptr)
-{
-  if (ptr->last_disconnected_server)
-  {
-    memcached_server_free(ptr->last_disconnected_server);
-    ptr->last_disconnected_server= NULL;
-  }
-}
-
-void memcached_free(memcached_st *ptr)
-{
-  /* If we have anything open, lets close it now */
-  memcached_quit(ptr);
-  memcached_server_list_free(memcached_server_list(ptr));
-  memcached_result_free(&ptr->result);
-
-  if (ptr->last_disconnected_server)
-    memcached_server_free(ptr->last_disconnected_server);
-
-  if (ptr->on_cleanup)
-    ptr->on_cleanup(ptr);
-
-  if (ptr->continuum)
-    libmemcached_free(ptr, ptr->continuum);
-
-  if (ptr->sasl.callbacks)
-  {
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-    memcached_destroy_sasl_auth_data(ptr);
-#endif
-  }
-
-  if (memcached_is_allocated(ptr))
-  {
-    libmemcached_free(ptr, ptr);
-  }
-}
-
-/*
-  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)
-{
-  memcached_return_t rc= MEMCACHED_SUCCESS;
-  memcached_st *new_clone;
-
-  if (source == NULL)
-    return memcached_create(clone);
-
-  if (clone && memcached_is_allocated(clone))
-  {
-    return NULL;
-  }
-
-  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->distribution= source->distribution;
-
-  hashkit_st *hash_ptr;
-
-  hash_ptr= hashkit_clone(&new_clone->hashkit, &source->hashkit);
-  if (! hash_ptr)
-  {
-    memcached_free(new_clone);
-    return NULL;
-  }
-
-  hash_ptr= hashkit_clone(&new_clone->distribution_hashkit, &source->distribution_hashkit);
-  if (! hash_ptr)
-  {
-    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->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))
-    rc= memcached_push(new_clone, source);
-
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    memcached_free(new_clone);
-
-    return NULL;
-  }
-
-
-  if (source->prefix_key_length)
-  {
-    strcpy(new_clone->prefix_key, source->prefix_key);
-    new_clone->prefix_key_length= source->prefix_key_length;
-  }
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  if (source->sasl.callbacks)
-  {
-    if (memcached_clone_sasl(new_clone, source) != MEMCACHED_SUCCESS)
-    {
-      memcached_free(new_clone);
-      return NULL;
-    }
-  }
-#endif
-
-  rc= run_distribution(new_clone);
-
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    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 *ptr)
-{
-  return ptr->user_data;
-}
-
-void *memcached_set_user_data(memcached_st *ptr, void *data)
-{
-  void *ret= ptr->user_data;
-  ptr->user_data= data;
-
-  return ret;
-}
-
-memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source)
-{
-  return memcached_server_push(destination, source->servers);
-}
-
-memcached_server_write_instance_st memcached_server_instance_fetch(memcached_st *ptr, uint32_t server_key)
-{
-  return &ptr->servers[server_key];
-}
-
-memcached_server_instance_st memcached_server_instance_by_position(const memcached_st *ptr, uint32_t server_key)
-{
-  return &ptr->servers[server_key];
-}
@@ -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 <libmemcached/common.h>
+
+#include <libmemcached/options.hpp>
+#include <libmemcached/virtual_bucket.h>
+
+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;
+}
+
@@ -1,204 +1,39 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Libmemcached library
  *
- * Summary: interface for memcached server
- * Description: main include file for libmemcached
+ *  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.
  *
  */
 
-#ifndef __LIBMEMCACHED_MEMCACHED_H__
-#define __LIBMEMCACHED_MEMCACHED_H__
-
-#include <inttypes.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-
-#include <libmemcached/visibility.h>
-#include <libmemcached/configure.h>
-#include <libmemcached/platform.h>
-#include <libmemcached/constants.h>
-#include <libmemcached/types.h>
-#include <libmemcached/string.h>
-#include <libmemcached/stats.h>
-#include <libhashkit/hashkit.h>
-// Everything above this line must be in the order specified.
-#include <libmemcached/allocators.h>
-#include <libmemcached/analyze.h>
-#include <libmemcached/auto.h>
-#include <libmemcached/behavior.h>
-#include <libmemcached/callback.h>
-#include <libmemcached/delete.h>
-#include <libmemcached/dump.h>
-#include <libmemcached/fetch.h>
-#include <libmemcached/flush.h>
-#include <libmemcached/flush_buffers.h>
-#include <libmemcached/get.h>
-#include <libmemcached/hash.h>
-#include <libmemcached/parse.h>
-#include <libmemcached/quit.h>
-#include <libmemcached/result.h>
-#include <libmemcached/server.h>
-#include <libmemcached/server_list.h>
-#include <libmemcached/storage.h>
-#include <libmemcached/strerror.h>
-#include <libmemcached/verbosity.h>
-#include <libmemcached/version.h>
-#include <libmemcached/sasl.h>
-
-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;
-  } state;
-  struct {
-    // Everything below here is pretty static.
-    bool auto_eject_hosts:1;
-    bool binary_protocol:1;
-    bool buffer_requests:1;
-    bool cork:1;
-    bool hash_with_prefix_key:1;
-    bool ketama_weighted:1;
-    bool no_block:1; // Don't block
-    bool no_reply:1;
-    bool randomize_replica_read:1;
-    bool reuse_memory:1;
-    bool support_cas:1;
-    bool tcp_nodelay:1;
-    bool use_cache_lookups:1;
-    bool use_sort_hosts:1;
-    bool use_udp:1;
-    bool verify_key:1;
-    bool tcp_keepalive:1;
-  } flags;
-  memcached_server_distribution_t distribution;
-  hashkit_st hashkit;
-  uint32_t continuum_points_counter; // Ketama
-  uint32_t number_of_hosts;
-  memcached_server_st *servers;
-  memcached_server_st *last_disconnected_server;
-  int32_t snd_timeout;
-  int32_t rcv_timeout;
-  uint32_t server_failure_limit;
-  uint32_t io_msg_watermark;
-  uint32_t io_bytes_watermark;
-  uint32_t io_key_prefetch;
-  uint32_t tcp_keepidle;
-  int cached_errno;
-  int32_t poll_timeout;
-  int32_t connect_timeout;
-  int32_t retry_timeout;
-  uint32_t continuum_count; // Ketama
-  int send_size;
-  int recv_size;
-  void *user_data;
-  time_t next_distribution_rebuild; // Ketama
-  size_t prefix_key_length;
-  uint32_t number_of_replicas;
-  hashkit_st distribution_hashkit;
-  memcached_result_st result;
-  memcached_continuum_item_st *continuum; // Ketama
-
-  struct _allocators_st {
-    memcached_calloc_fn calloc;
-    memcached_free_fn free;
-    memcached_malloc_fn malloc;
-    memcached_realloc_fn realloc;
-    void *context;
-  } 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;
-  char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE];
-  struct {
-    bool is_allocated:1;
-  } options;
-
-};
-
-#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
-void memcached_free(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
-memcached_server_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 *);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-
-#ifdef __cplusplus
-class Memcached : private memcached_st {
-public:
-
-  Memcached()
-  {
-    memcached_create(this);
-  }
-
-  ~Memcached()
-  {
-    memcached_free(this);
-  }
-
-  Memcached(const Memcached& source)
-  {
-    memcached_clone(this, &source);
-  }
-
-  Memcached& operator=(const Memcached& source)
-  {
-    memcached_free(this);
-    memcached_clone(this, &source);
-
-    return *this;
-  }
-};
-#endif
-
-#endif /* __LIBMEMCACHED_MEMCACHED_H__ */
+#pragma once
 
+#include <libmemcached-1.0/memcached.h>
@@ -1,999 +1,40 @@
-/*
- * Summary: C++ interface for memcached server
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Copy: See Copyright for the status of this software.
+ *  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.
  *
- * Authors: Padraig O'Sullivan <osullivan.padraig@gmail.com>
- *          Patrick Galbraith <patg@patg.net>
- */
-
-/**
- * @file memcached.hpp
- * @brief Libmemcached C++ interface
- */
-
-#ifndef LIBMEMCACHEDPP_H
-#define LIBMEMCACHEDPP_H
-
-#include <libmemcached/memcached.h>
-#include <libmemcached/exception.hpp>
-
-#include <string.h>
-
-#include <sstream>
-#include <string>
-#include <vector>
-#include <map>
-
-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()
-    :
-      servers_list(),
-      memc(),
-      result()
-  {
-    memcached_create(&memc);
-  }
-
-  Memcache(const std::string &in_servers_list)
-    :
-      servers_list(in_servers_list),
-      memc(),
-      result()
-  {
-    memcached_create(&memc);
-    init();
-  }
-
-  Memcache(const std::string &hostname,
-           in_port_t port)
-    :
-      servers_list(),
-      memc(),
-      result()
-  {
-    memcached_create(&memc);
-
-    servers_list.append(hostname);
-    servers_list.append(":");
-    std::ostringstream strsmt;
-    strsmt << port;
-    servers_list.append(strsmt.str());
-
-    init();
-  }
-
-  Memcache(memcached_st *clone)
-    :
-      servers_list(),
-      memc(),
-      result()
-  {
-    memcached_clone(&memc, clone);
-  }
-
-  Memcache(const Memcache &rhs)
-    :
-      servers_list(rhs.servers_list),
-      memc(),
-      result()
-  {
-    memcached_clone(&memc, const_cast<memcached_st *>(&rhs.getImpl()));
-    init();
-  }
-
-  Memcache &operator=(const Memcache &rhs)
-  {
-    if (this != &rhs)
-    {
-      memcached_clone(&memc, const_cast<memcached_st *>(&rhs.getImpl()));
-      init();
-    }
-
-    return *this;
-  }
-
-  ~Memcache()
-  {
-    memcached_free(&memc);
-  }
-
-  void init()
-  {
-    memcached_server_st *servers;
-    servers= memcached_servers_parse(servers_list.c_str());
-    memcached_server_push(&memc, servers);
-    memcached_server_free(servers);
-  }
-
-  /**
-   * Get the internal memcached_st *
-   */
-  memcached_st &getImpl()
-  {
-    return 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 setBehavior(memcached_behavior_t flag, uint64_t data)
-  {
-    memcached_return_t rc;
-    rc= memcached_behavior_set(&memc, flag, data);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  uint64_t getBehavior(memcached_behavior_t flag) {
-    return memcached_behavior_get(&memc, flag);
-  }
-
-  /**
-   * Return the string which contains the list of memcached servers being
-   * used.
-   *
-   * @return a std::string containing the list of memcached servers
-   */
-  const std::string getServersList() const
-  {
-    return servers_list;
-  }
-
-  /**
-   * Set the list of memcached servers to use.
-   *
-   * @param[in] in_servers_list list of servers
-   * @return true on success; false otherwise
-   */
-  bool setServers(const std::string &in_servers_list)
-  {
-    servers_list.assign(in_servers_list);
-    init();
-
-    return (memcached_server_count(&memc));
-  }
-
-  /**
-   * 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)
-  {
-    memcached_return_t rc;
-
-    rc= memcached_server_add(&memc, server_name.c_str(), port);
-
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &ret_val)
-  {
-    char ret_key[MEMCACHED_MAX_KEY];
-    size_t value_length= 0;
-    size_t key_length= 0;
-    memcached_return_t rc;
-    uint32_t flags= 0;
-    char *value= memcached_fetch(&memc, ret_key, &key_length,
-                                 &value_length, &flags, &rc);
-    if (value && ret_val.empty())
-    {
-      ret_val.reserve(value_length);
-      ret_val.assign(value, value + value_length);
-      key.assign(ret_key);
-      free(value);
-    }
-    else if (value)
-    {
-      free(value);
-    }
-
-    return rc;
-  }
-
-  /**
-   * 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<char> &ret_val) throw (Error)
-  {
-    uint32_t flags= 0;
-    memcached_return_t rc;
-    size_t value_length= 0;
-
-    if (key.empty())
-    {
-      throw(Error("the key supplied is empty!", false));
-    }
-    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);
-      ret_val.assign(value, value + 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<char> &ret_val) throw(Error)
-  {
-    uint32_t flags= 0;
-    memcached_return_t rc;
-    size_t value_length= 0;
-
-    if (master_key.empty() || key.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    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);
-      ret_val.assign(value, value + 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(std::vector<std::string> &keys)
-  {
-    std::vector<const char *> real_keys;
-    std::vector<size_t> 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<std::string>::iterator it= keys.begin();
-
-    while (it != keys.end())
-    {
-      real_keys.push_back(const_cast<char *>((*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 (! real_keys.empty())
-    {
-      memcached_return_t rc= memcached_mget(&memc, &real_keys[0], &key_len[0],
-                                          real_keys.size());
-      return (rc == MEMCACHED_SUCCESS);
-    }
-
-    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<char> &value,
-           time_t expiration,
-           uint32_t flags) throw(Error)
-  {
-    if (key.empty() || value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_set(&memc,
-                                       key.c_str(), key.length(),
-                                       &value[0], value.size(),
-                                       expiration, flags);
-    return (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  /**
-   * 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<char> &value,
-                time_t expiration,
-                uint32_t flags) throw(Error)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_set_by_key(&memc, master_key.c_str(),
-                                              master_key.length(),
-                                              key.c_str(), key.length(),
-                                              &value[0], value.size(),
-                                              expiration,
-                                              flags);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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(std::vector<std::string> &keys,
-              std::vector< std::vector<char> *> &values,
-              time_t expiration,
-              uint32_t flags) throw(Error)
-  {
-    if (keys.size() != values.size())
-    {
-      throw(Error("The number of keys and values do not match!", false));
-    }
-    bool retval= true;
-    std::vector<std::string>::iterator key_it= keys.begin();
-    std::vector< std::vector<char> *>::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(std::map<const std::string, std::vector<char> > &key_value_map,
-              time_t expiration,
-              uint32_t flags) throw(Error)
-  {
-    if (key_value_map.empty())
-    {
-      throw(Error("The key/values are not properly set!", false));
-    }
-    bool retval= true;
-    std::map<const std::string, std::vector<char> >::iterator it=
-      key_value_map.begin();
-    while (it != key_value_map.end())
-    {
-      retval= set(it->first, it->second, expiration, flags);
-      if (retval == false)
-      {
-        std::string err_buff("There was an error setting the key ");
-        err_buff.append(it->first);
-        throw(Error(err_buff, 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) throw(Error)
-  {
-    if (key.empty())
-    {
-      throw(Error("the key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_increment(&memc, key.c_str(), key.length(),
-                                             offset, value);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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)
-    throw(Error)
-  {
-    if (key.empty())
-    {
-      throw(Error("the key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_decrement(&memc, key.c_str(),
-                                             key.length(),
-                                             offset, value);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-
-  /**
-   * 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<char> &value)
-    throw(Error)
-  {
-    if (key.empty() || value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_add(&memc, key.c_str(), key.length(),
-                                       &value[0], value.size(), 0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value) throw(Error)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_add_by_key(&memc,
-                                              master_key.c_str(),
-                                              master_key.length(),
-                                              key.c_str(),
-                                              key.length(),
-                                              &value[0],
-                                              value.size(),
-                                              0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value) throw(Error)
-  {
-    if (key.empty() ||
-        value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_replace(&memc, key.c_str(), key.length(),
-                                           &value[0], value.size(),
-                                           0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_replace_by_key(&memc,
-                                                  master_key.c_str(),
-                                                  master_key.length(),
-                                                  key.c_str(),
-                                                  key.length(),
-                                                  &value[0],
-                                                  value.size(),
-                                                  0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value)
-    throw(Error)
-  {
-    if (key.empty() || value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_prepend(&memc, key.c_str(), key.length(),
-                                           &value[0], value.size(), 0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value)
-      throw(Error)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_prepend_by_key(&memc,
-                                                  master_key.c_str(),
-                                                  master_key.length(),
-                                                  key.c_str(),
-                                                  key.length(),
-                                                  &value[0],
-                                                  value.size(),
-                                                  0,
-                                                  0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value)
-    throw(Error)
-  {
-    if (key.empty() || value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_append(&memc,
-                                          key.c_str(),
-                                          key.length(),
-                                          &value[0],
-                                          value.size(),
-                                          0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value)
-    throw(Error)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_append_by_key(&memc,
-                                                 master_key.c_str(),
-                                                 master_key.length(),
-                                                 key.c_str(),
-                                                 key.length(),
-                                                 &value[0],
-                                                 value.size(),
-                                                 0, 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value,
-           uint64_t cas_arg) throw(Error)
-  {
-    if (key.empty() || value.empty())
-    {
-      throw(Error("the key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_cas(&memc, key.c_str(), key.length(),
-                                       &value[0], value.size(),
-                                       0, 0, cas_arg);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<char> &value,
-                uint64_t cas_arg) throw(Error)
-  {
-    if (master_key.empty() ||
-        key.empty() ||
-        value.empty())
-    {
-      throw(Error("the master key, key or value supplied is empty!", false));
-    }
-    memcached_return_t rc= 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);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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) throw(Error)
-  {
-    if (key.empty())
-    {
-      throw(Error("the key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_delete(&memc, key.c_str(), key.length(), 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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) throw(Error)
-  {
-    if (key.empty())
-    {
-      throw(Error("the key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_delete(&memc,
-                                          key.c_str(),
-                                          key.length(),
-                                          expiration);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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) throw(Error)
-  {
-    if (master_key.empty() || key.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_delete_by_key(&memc,
-                                                 master_key.c_str(),
-                                                 master_key.length(),
-                                                 key.c_str(),
-                                                 key.length(),
-                                                 0);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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) throw(Error)
-  {
-    if (master_key.empty() || key.empty())
-    {
-      throw(Error("the master key or key supplied is empty!", false));
-    }
-    memcached_return_t rc= memcached_delete_by_key(&memc,
-                                                 master_key.c_str(),
-                                                 master_key.length(),
-                                                 key.c_str(),
-                                                 key.length(),
-                                                 expiration);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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)
-  {
-    memcached_return_t rc= memcached_flush(&memc, expiration);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * Callback function for result sets. It passes the result
-   * sets to the list of functions provided.
-   *
-   * @param[in] callback list of callback functions
-   * @param[in] context pointer to memory reference that is
-   *                    supplied to the calling function
-   * @param[in] num_of_callbacks number of callback functions
-   * @return true on success; false otherwise
-   */
-  bool fetchExecute(memcached_execute_fn *callback,
-                    void *context,
-                    uint32_t num_of_callbacks)
-  {
-    memcached_return_t rc= memcached_fetch_execute(&memc,
-                                                 callback,
-                                                 context,
-                                                 num_of_callbacks);
-    return (rc == MEMCACHED_SUCCESS);
-  }
-
-  /**
-   * 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<std::string, std::string> >
-                &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++)
-    {
-      memcached_server_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<std::string, std::string> server_stats;
-      char **list= NULL;
-      char **ptr= NULL;
-
-      list= memcached_stat_get_keys(&memc, &stats[x], &rc);
-      for (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:
 
-  std::string servers_list;
-  memcached_st memc;
-  memcached_result_st result;
-};
+#pragma once
 
-}
+#include <libmemcached-1.0/memcached.hpp>
 
-#endif /* LIBMEMCACHEDPP_H */
@@ -1,22 +0,0 @@
-/* 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: Connection pool library.
- *
- * Author: Trond Norbye, Brian Aker
- *
- */
-
-
-#ifndef __LIBMEMCACHED__MEMCACHED_UTIL_H__
-#define __LIBMEMCACHED__MEMCACHED_UTIL_H__
-
-#include <libmemcached/util/ping.h>
-#include <libmemcached/util/pool.h>
-#include <libmemcached/util/version.h>
-
-#endif /* __LIBMEMCACHED__MEMCACHED_UTIL_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 <mem_config.h>
+
+#include <libmemcached/common.h>
+
+#ifdef __cplusplus
+#include <cstddef>
+#include <cstdlib>
+#else
+#include <stddef.h>
+#include <stdlib.h>
+#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)))
@@ -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);
+}
@@ -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
@@ -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 <libmemcached/common.h>
+#include <libmemcached/options.hpp>
+
+#include <libmemcached/csl/context.h>
+
+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);
+}
@@ -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);
@@ -1,74 +0,0 @@
-/* 
-  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 "common.h"
-
-memcached_server_list_st memcached_servers_parse(const char *server_strings)
-{
-  char *string;
-  in_port_t port;
-  uint32_t weight;
-  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= index(server_strings, ','); 
-       begin_ptr != end_ptr; 
-       string= index(begin_ptr, ','))
-  {
-    char buffer[HUGE_STRING_LEN];
-    char *ptr, *ptr2;
-    port= 0;
-    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, ':');
-
-    if (ptr)
-    {
-      ptr[0]= 0;
-
-      ptr++;
-
-      port= (in_port_t) strtoul(ptr, (char **)NULL, 10);
-
-      ptr2= index(ptr, ' ');
-      if (! ptr2)
-        ptr2= index(ptr, ':');
-      if (ptr2)
-      {
-        ptr2++;
-        weight = (uint32_t) strtoul(ptr2, (char **)NULL, 10);
-      }
-    }
-
-    servers= memcached_server_list_append_with_weight(servers, buffer, port, weight, &rc);
-
-    if (isspace(*begin_ptr))
-      begin_ptr++;
-  }
-
-  return servers;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,26 +0,0 @@
-/* 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
- *
- */
-
-#ifndef __LIBMEMCACHED_PARSE_H__
-#define __LIBMEMCACHED_PARSE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-memcached_server_list_st memcached_servers_parse(const char *server_strings);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_PARSE_H__ */
@@ -1,32 +0,0 @@
-/* LibMemcached
- * Copyright (C) 2006-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: Try to hide platform-specific stuff
- *
- */
-#ifndef LIBMEMCACHED_PLATFORM_H
-#define LIBMEMCACHED_PLATFORM_H 1
-
-#ifdef WIN32
-
-#include <winsock2.h>
-#include <ws2tcpip.h>
-typedef short in_port_t;
-typedef SOCKET memcached_socket_t;
-#else
-typedef int memcached_socket_t;
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/un.h>
-#include <netinet/tcp.h>
-#include <netinet/in.h>
-
-#endif /* WIN32 */
-
-
-#endif /* LIBMEMCACHED_PLATFORM_H */
@@ -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 <sys/time.h>
+#include <strings.h>
+
+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)
@@ -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 <winsock2.h>
+
+#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)
@@ -1,925 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/protocol/common.h"
-
-#include <ctype.h>
-#include <string.h>
-#include <strings.h>
-#include <stdio.h>
-
-/**
- * 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
-spool_string(memcached_protocol_client_st *client, const char *text)
-{
-  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 <key>*\r\n",
-    [GETS_CMD]= "CLIENT_ERROR: Syntax error: gets <key>*\r\n",
-    [SET_CMD]= "CLIENT_ERROR: Syntax error: set <key> <flags> <exptime> <bytes> [noreply]\r\n",
-    [ADD_CMD]= "CLIENT_ERROR: Syntax error: add <key> <flags> <exptime> <bytes> [noreply]\r\n",
-    [REPLACE_CMD]= "CLIENT_ERROR: Syntax error: replace <key> <flags> <exptime> <bytes> [noreply]\r\n",
-    [CAS_CMD]= "CLIENT_ERROR: Syntax error: cas <key> <flags> <exptime> <bytes> <casid> [noreply]\r\n",
-    [APPEND_CMD]= "CLIENT_ERROR: Syntax error: append <key> <flags> <exptime> <bytes> [noreply]\r\n",
-    [PREPEND_CMD]= "CLIENT_ERROR: Syntax error: prepend <key> <flags> <exptime> <bytes> [noreply]\r\n",
-    [DELETE_CMD]= "CLIENT_ERROR: Syntax error: delete <key> [noreply]\r\n",
-    [INCR_CMD]= "CLIENT_ERROR: Syntax error: incr <key> <value> [noreply]\r\n",
-    [DECR_CMD]= "CLIENT_ERROR: Syntax error: decr <key> <value> [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 <num>\r\n",
-    [UNKNOWN_CMD]= "CLIENT_ERROR: Unknown command\r\n",
-  };
-
-  client->mute = false;
-  spool_string(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= (void*)cookie;
-  spool_string(client, "VERSION ");
-  client->root->spool(client, text, textlen);
-  spool_string(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)
-  {
-    spool_string(client, "STAT ");
-    client->root->spool(client, key, keylen);
-    spool_string(client, " ");
-    client->root->spool(client, body, bodylen);
-    spool_string(client, "\r\n");
-  }
-  else
-  {
-    spool_string(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", .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 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 == NULL)
-  {
-    spool_string(client, "SERVER_ERROR: callback not implemented\r\n");
-    return;
-  }
-
-  protocol_binary_response_status rval;
-  rval= client->root->callback->interface.v1.delete(client, key, nkey, 0);
-
-  if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS)
-  {
-    spool_string(client, "DELETED\r\n");
-  }
-  else if (rval == PROTOCOL_BINARY_RESPONSE_KEY_ENOENT)
-  {
-    spool_string(client, "NOT_FOUND\r\n");
-  }
-  else
-  {
-    char msg[80];
-    snprintf(msg, sizeof(msg), "SERVER_ERROR: delete failed %u\r\n",(uint32_t)rval);
-    spool_string(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;
-  uint64_t delta= strtoull(tokens[2], NULL, 10);
-
-  protocol_binary_response_status rval;
-  if (client->ascii_command == INCR_CMD)
-  {
-    if (client->root->callback->interface.v1.increment == NULL)
-    {
-      spool_string(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)
-    {
-      spool_string(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);
-    spool_string(client, buffer);
-  }
-  else
-  {
-    spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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 == NULL)
-  {
-    spool_string(client, "SERVER_ERROR: callback not implemented\r\n");
-    return;
-  }
-
-  uint32_t timeout= 0;
-  if (ntokens == 2)
-  {
-    timeout= (uint32_t)strtoul(tokens[1], NULL, 10);
-  }
-
-  protocol_binary_response_status rval;
-  rval= client->root->callback->interface.v1.flush(client, timeout);
-  if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS)
-    spool_string(client, "OK\r\n");
-  else
-    spool_string(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 */
-    spool_string(client, "CLIENT_ERROR: bad key\r\n");
-    return -1;
-  }
-
-  uint32_t flags= (uint32_t)strtoul(tokens[2], NULL, 10);
-  uint32_t timeout= (uint32_t)strtoul(tokens[3], NULL, 10);
-  unsigned long nbytes= strtoul(tokens[4], NULL, 10);
-
-  /* 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:
-    cas= strtoull(tokens[5], NULL, 10);
-    /* 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)
-  {
-    spool_string(client, "STORED\r\n");
-  }
-  else
-  {
-    if (client->ascii_command == CAS_CMD)
-    {
-      if (rval == PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS)
-      {
-        spool_string(client, "EXISTS\r\n");
-      }
-      else if (rval == PROTOCOL_BINARY_RESPONSE_KEY_ENOENT)
-      {
-        spool_string(client, "NOT_FOUND\r\n");
-      }
-      else
-      {
-        spool_string(client, "NOT_STORED\r\n");
-      }
-    }
-    else
-    {
-      spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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)
-  {
-    spool_string(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));
-
-    /* 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
-        spool_string(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;
-
-      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
-          spool_string(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;
-    }
-
-    /* Move past \n */
-    ++end;
-    *length -= end - ptr;
-    ptr= end;
-  } while (*length > 0);
-
-  *endptr= ptr;
-  return MEMCACHED_PROTOCOL_READ_EVENT;
-}
@@ -1,8 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#ifndef LIBMEMCACHED_PROTOCOL_ASCII_HANDLER_H
-#define LIBMEMCACHED_PROTOCOL_ASCII_HANDLER_H
-
-LIBMEMCACHED_LOCAL
-memcached_protocol_event_t memcached_ascii_protocol_process_data(memcached_protocol_client_st *client, ssize_t *length, void **endptr);
-
-#endif
@@ -1,1083 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/protocol/common.h"
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <string.h>
-#include <stdio.h>
-
-/*
-** **********************************************************************
-** 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))
-  {
-    return PROTOCOL_BINARY_RESPONSE_EIO;
-  }
-
-  size_t len= sizeof(*response) + 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_EIO;
-        }
-      }
-      else
-      {
-        offset += (size_t)nw;
-      }
-    } while (offset < len);
-  }
-
-  return client->root->spool(client, ptr, len - offset);
-}
-
-/*
- * 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= 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),
-    },
-  };
-
-  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),
-    },
-  };
-
-  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= 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= ntohll(request->message.body.initial);
-    uint64_t delta= 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= ntohll(cas),
-            .bodylen= htonl(8)
-          },
-          .body.value= 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 != NULL)
-  {
-    uint16_t keylen= ntohs(header->request.keylen);
-    void *key= (header + 1);
-    uint64_t cas= ntohll(header->request.cas);
-    rval= client->root->callback->interface.v1.delete(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 != NULL)
-  {
-    protocol_binary_request_flush *flush= (void*)header;
-    uint32_t timeout= 0;
-    if (htonl(header->request.bodylen) == 4)
-    {
-      timeout= ntohl(flush->message.body.expiration);
-    }
-
-    rval= client->root->callback->interface.v1.flush(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= ntohll(request->message.body.initial);
-    uint64_t delta= 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= ntohll(cas),
-            .bodylen= htonl(8)
-          },
-          .body.value= 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= 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= 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= 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= 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_EIO;
-}
-
-/**
- * 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= 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= 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= 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= 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;
-  rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND;
-  uint8_t cc= header->request.opcode;
-
-  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_EIO &&
-      rval != PROTOCOL_BINARY_RESPONSE_PAUSE)
-  {
-    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_EIO)
-    {
-      *length= len;
-      *endptr= (void*)header;
-      return MEMCACHED_PROTOCOL_ERROR_EVENT;
-    } else if (rv == PROTOCOL_BINARY_RESPONSE_PAUSE)
-      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;
-}
-
@@ -1,15 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#ifndef LIBMEMCACHED_PROTOCOL_BINARY_HANDLER_H
-#define LIBMEMCACHED_PROTOCOL_BINARY_HANDLER_H
-
-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);
-
-#endif
@@ -1,149 +0,0 @@
-/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#ifndef NDEBUG
-#include <signal.h>
-#endif
-
-#include "cache.h"
-
-#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));
-    char* nm = strdup(name);
-    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);
-}
-
@@ -1,116 +0,0 @@
-/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#ifndef CACHE_H
-#define CACHE_H
-#include <pthread.h>
-
-#ifdef HAVE_UMEM_H
-#include <umem.h>
-#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
-
-#endif
@@ -1,418 +0,0 @@
-/*
- * Summary: Definition of the callback interface
- *
- * Copy: See Copyright for the status of this software.
- *
- * Author: Trond Norbye
- */
-#ifndef LIBMEMCACHEDPROTOCOL_CALLBACK_H
-#define LIBMEMCACHEDPROTOCOL_CALLBACK_H
-
-/**
- * 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
- *               <u>anything</u> 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 <b>existing</b> 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
-    * @param len the length of the key
-    * @param cas the CAS in the request
-    */
-   protocol_binary_response_status (*delete)(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)(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 <b>existing</b> 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 <b>existing</b> 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 <b>must</b> 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 <b>must</b> 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 <b>must</b>
-    *               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;
-
-#endif
@@ -1,136 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#ifndef LIBMEMCACHED_PROTOCOL_COMMON_H
-#define LIBMEMCACHED_PROTOCOL_COMMON_H
-
-#include "config.h"
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-#include <assert.h>
-
-/* Define this here, which will turn on the visibilty controls while we're
- * building libmemcached.
- */
-#define BUILDING_LIBMEMCACHED 1
-
-#include <libmemcached/byteorder.h>
-#include <libmemcached/protocol_handler.h>
-#include <libmemcached/protocol/cache.h>
-
-/*
- * 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 {
-  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"
-
-#endif
@@ -1,202 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/protocol/common.h"
-
-#include <sys/types.h>
-#include <inttypes.h>
-
-#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;
-}
@@ -1,365 +0,0 @@
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/protocol/common.h"
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <string.h>
-#include <strings.h>
-#include <ctype.h>
-#include <stdio.h>
-
-/*
-** **********************************************************************
-** 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, 0);
-}
-
-/**
- * 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)
-{
-  ssize_t len;
-
-  /* Do we have pending data to send? */
-  while (client->output != NULL)
-  {
-    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->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)
-  {
-    client->work= memcached_binary_protocol_process_data;
-  }
-  else if (client->root->callback->interface_version == 1)
-  {
-    /*
-     * 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
-  {
-    /* 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);
-    }
-  }
-
-  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(*ret));
-  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);
-}
-
-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;
-}
@@ -1,218 +0,0 @@
-/* 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
- *
- */
-
-#ifndef __LIBMEMCACHED_PROTOCOL_H__
-#define __LIBMEMCACHED_PROTOCOL_H__
-
-#include <sys/types.h>
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-
-#include <libmemcached/platform.h>
-#include <libmemcached/memcached/protocol_binary.h>
-#include <libmemcached/visibility.h>
-#include <libmemcached/protocol/callback.h>
-
-/* 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
- * <b>before</b> 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);
-
-/**
- * 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
-
-#endif
@@ -1,90 +0,0 @@
-#include "common.h"
-
-memcached_return_t memcached_purge(memcached_server_write_instance_st ptr)
-{
-  uint32_t x;
-  memcached_return_t ret= MEMCACHED_SUCCESS;
-  memcached_st *root= (memcached_st *)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 MEMCACHED_SUCCESS;
-  }
-
-  /* memcached_io_write and memcached_response may call memcached_purge
-    so we need to be able stop any recursion.. */
-  memcached_set_purging(root, true);
-
-  WATCHPOINT_ASSERT(ptr->fd != -1);
-  /* 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, NULL, 0, true) == -1)
-  {
-    memcached_set_purging(root, true);
-
-    return MEMCACHED_WRITE_FAILURE;
-  }
-  WATCHPOINT_ASSERT(ptr->fd != -1);
-
-  uint32_t no_msg= memcached_server_response_count(ptr) - 1;
-  if (no_msg > 0)
-  {
-    memcached_result_st result;
-    memcached_result_st *result_ptr;
-    char buffer[SMALL_STRING_LEN];
-
-    /*
-     * 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
-   */
-    const int32_t timeo= ptr->root->poll_timeout;
-    root->poll_timeout= 2000;
-
-    result_ptr= memcached_result_create(root, &result);
-    WATCHPOINT_ASSERT(result_ptr);
-
-    for (x= 0; x < no_msg; x++)
-    {
-      memcached_result_reset(result_ptr);
-      memcached_return_t rc= memcached_read_one_response(ptr, buffer,
-                                                         sizeof (buffer),
-                                                         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 || rc == MEMCACHED_UNKNOWN_READ_FAILURE)
-      {
-        WATCHPOINT_ERROR(rc);
-        ret = rc;
-        memcached_io_reset(ptr);
-      }
-
-      if (ptr->root->callbacks != NULL)
-      {
-        memcached_callback_st cb = *ptr->root->callbacks;
-        if (rc == MEMCACHED_SUCCESS)
-        {
-          for (uint32_t y= 0; y < cb.number_of_callback; y++)
-          {
-            rc = (*cb.callback[y])(ptr->root, result_ptr, cb.context);
-            if (rc != MEMCACHED_SUCCESS)
-              break;
-          }
-        }
-      }
-    }
-
-    memcached_result_free(result_ptr);
-    root->poll_timeout= timeo;
-  }
-  memcached_set_purging(root, false);
-
-  return ret;
-}
@@ -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 <libmemcached/common.h>
+
+#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;
+}
@@ -1,98 +0,0 @@
-#include "common.h"
-
-/*
-  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_server_st *ptr, bool io_death)
-{
-  if (ptr->fd != -1)
-  {
-    if (io_death == false && ptr->type != MEMCACHED_CONNECTION_UDP && ptr->options.is_shutting_down == false)
-    {
-      memcached_return_t rc;
-      char buffer[MEMCACHED_MAX_BUFFER];
-
-      ptr->options.is_shutting_down= true;
-
-      if (ptr->root->flags.binary_protocol)
-      {
-        protocol_binary_request_quit request = {.bytes= {0}};
-        request.message.header.request.magic = PROTOCOL_BINARY_REQ;
-        request.message.header.request.opcode = PROTOCOL_BINARY_CMD_QUIT;
-        request.message.header.request.datatype = PROTOCOL_BINARY_RAW_BYTES;
-        rc= memcached_do(ptr, request.bytes, sizeof(request.bytes), true);
-      }
-      else
-      {
-        rc= memcached_do(ptr, "quit\r\n", strlen("quit\r\n"), true);
-      }
-
-      WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_FETCH_NOTFINISHED);
-      (void)rc; // Shut up ICC
-
-      /* 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 (ptr->root->flags.buffer_requests || ptr->root->number_of_replicas)
-      {
-        ssize_t nread;
-        while (memcached_io_read(ptr, buffer, sizeof(buffer)/sizeof(*buffer),
-                                 &nread) == MEMCACHED_SUCCESS);
-      }
-
-
-      /*
-       * 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.
-       */
-      ptr->server_failure_counter= 0;
-    }
-    memcached_io_close(ptr);
-  }
-
-  ptr->fd= -1;
-  ptr->write_buffer_offset= (size_t) ((ptr->type == MEMCACHED_CONNECTION_UDP) ? UDP_DATAGRAM_HEADER_LENGTH : 0);
-  ptr->read_buffer_length= 0;
-  ptr->read_ptr= ptr->read_buffer;
-  ptr->options.is_shutting_down= false;
-  memcached_server_response_reset(ptr);
-
-  if (io_death)
-  {
-    ptr->server_failure_counter++;
-    set_last_disconnected_host(ptr);
-  }
-}
-
-void memcached_quit(memcached_st *ptr)
-{
-  uint32_t x;
-
-  if (memcached_server_count(ptr) == 0)
-    return;
-
-  if (memcached_server_count(ptr))
-  {
-    for (x= 0; x < memcached_server_count(ptr); x++)
-    {
-      memcached_server_write_instance_st instance=
-        memcached_server_instance_fetch(ptr, x);
-
-      memcached_quit_server(instance, false);
-    }
-  }
-}
@@ -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 <libmemcached/common.h>
+
+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);
+}
@@ -1,29 +0,0 @@
-/* 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: returns a human readable string for the error message
- *
- */
-
-#ifndef __LIBMEMCACHED_QUIT_H__
-#define __LIBMEMCACHED_QUIT_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-void memcached_quit(memcached_st *ptr);
-
-LIBMEMCACHED_LOCAL
-void memcached_quit_server(memcached_server_st *ptr, bool io_death);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_QUIT_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
+
+void memcached_quit_server(memcached_instance_st* ptr, bool io_death);
+
+void send_quit(memcached_st *ptr);
@@ -1,584 +0,0 @@
-/* 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: memcached_response() is used to determine the return result from an issued command.
- *
-*/
-
-#include "common.h"
-
-static memcached_return_t textual_read_one_response(memcached_server_write_instance_st ptr,
-                                                    char *buffer, size_t buffer_length,
-                                                    memcached_result_st *result);
-static memcached_return_t binary_read_one_response(memcached_server_write_instance_st ptr,
-                                                   char *buffer, size_t buffer_length,
-                                                   memcached_result_st *result);
-
-memcached_return_t memcached_read_one_response(memcached_server_write_instance_st ptr,
-                                               char *buffer, size_t buffer_length,
-                                               memcached_result_st *result)
-{
-  memcached_server_response_decrement(ptr);
-
-  if (result == NULL)
-  {
-    memcached_st *root= (memcached_st *)ptr->root;
-    result = &root->result;
-  }
-
-  memcached_return_t rc;
-  if (ptr->root->flags.binary_protocol)
-    rc= binary_read_one_response(ptr, buffer, buffer_length, result);
-  else
-    rc= textual_read_one_response(ptr, buffer, buffer_length, result);
-
-  unlikely(rc == MEMCACHED_UNKNOWN_READ_FAILURE ||
-           rc == MEMCACHED_PROTOCOL_ERROR ||
-           rc == MEMCACHED_CLIENT_ERROR ||
-           rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
-    memcached_io_reset(ptr);
-
-  return rc;
-}
-
-memcached_return_t memcached_response(memcached_server_write_instance_st ptr,
-                                      char *buffer, size_t buffer_length,
-                                      memcached_result_st *result)
-{
-  /* We may have old commands in the buffer not set, first purge */
-  if ((ptr->root->flags.no_block) && (memcached_is_processing_input(ptr->root) == false))
-  {
-    (void)memcached_io_write(ptr, NULL, 0, true);
-  }
-
-  /*
-   * The previous implementation purged all pending requests and just
-   * returned the last one. Purge all pending messages to ensure backwards
-   * compatibility.
- */
-  if (ptr->root->flags.binary_protocol == false)
-  {
-    while (memcached_server_response_count(ptr) > 1)
-    {
-      memcached_return_t rc= memcached_read_one_response(ptr, buffer, buffer_length, result);
-
-      unlikely (rc != MEMCACHED_END &&
-                rc != MEMCACHED_STORED &&
-                rc != MEMCACHED_SUCCESS &&
-                rc != MEMCACHED_STAT &&
-                rc != MEMCACHED_DELETED &&
-                rc != MEMCACHED_NOTFOUND &&
-                rc != MEMCACHED_NOTSTORED &&
-                rc != MEMCACHED_DATA_EXISTS)
-        return rc;
-    }
-  }
-
-  return memcached_read_one_response(ptr, buffer, buffer_length, result);
-}
-
-static memcached_return_t textual_value_fetch(memcached_server_write_instance_st ptr,
-                                              char *buffer,
-                                              memcached_result_st *result)
-{
-  memcached_return_t rc= MEMCACHED_SUCCESS;
-  char *string_ptr;
-  char *end_ptr;
-  char *next_ptr;
-  size_t value_length;
-  size_t to_read;
-  char *value_ptr;
-  ssize_t read_length= 0;
-  memcached_return_t rrc;
-
-  if (ptr->root->flags.use_udp)
-    return MEMCACHED_NOT_SUPPORTED;
-
-  WATCHPOINT_ASSERT(ptr->root);
-  end_ptr= buffer + MEMCACHED_DEFAULT_COMMAND_SIZE;
-
-  memcached_result_reset(result);
-
-  string_ptr= buffer;
-  string_ptr+= 6; /* "VALUE " */
-
-
-  /* We load the key */
-  {
-    char *key;
-    size_t prefix_length;
-
-    key= result->item_key;
-    result->key_length= 0;
-
-    for (prefix_length= ptr->root->prefix_key_length; !(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++);
-  result->item_flags= (uint32_t) strtoul(next_ptr, &string_ptr, 10);
-
-  if (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++);
-  value_length= (size_t)strtoull(next_ptr, &string_ptr, 10);
-
-  if (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++);
-    result->item_cas= strtoull(next_ptr, &string_ptr, 10);
-  }
-
-  if (end_ptr < string_ptr)
-    goto read_error;
-
-  /* We add two bytes so that we can walk the \r\n */
-  rc= memcached_string_check(&result->value, value_length+2);
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    value_length= 0;
-    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-  }
-
-  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.
-  */
-  to_read= (value_length) + 2;
-  rrc= memcached_io_read(ptr, value_ptr, to_read, &read_length);
-  if (rrc != MEMCACHED_SUCCESS)
-    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);
-  }
-
-  return MEMCACHED_SUCCESS;
-
-read_error:
-  memcached_io_reset(ptr);
-
-  return MEMCACHED_PARTIAL_READ;
-}
-
-static memcached_return_t textual_read_one_response(memcached_server_write_instance_st ptr,
-                                                    char *buffer, size_t buffer_length,
-                                                    memcached_result_st *result)
-{
-  memcached_return_t rc= memcached_io_readline(ptr, buffer, buffer_length);
-  if (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  switch(buffer[0])
-  {
-  case 'V': /* VALUE || VERSION */
-    if (buffer[1] == 'A') /* VALUE */
-    {
-      /* We add back in one because we will need to search for END */
-      memcached_server_response_increment(ptr);
-      return textual_value_fetch(ptr, buffer, result);
-    }
-    else if (buffer[1] == 'E') /* VERSION */
-    {
-      return MEMCACHED_SUCCESS;
-    }
-    else
-    {
-      WATCHPOINT_STRING(buffer);
-      return MEMCACHED_UNKNOWN_READ_FAILURE;
-    }
-  case 'O': /* OK */
-    return MEMCACHED_SUCCESS;
-  case 'S': /* STORED STATS SERVER_ERROR */
-    {
-      if (buffer[2] == 'A') /* STORED STATS */
-      {
-        memcached_server_response_increment(ptr);
-        return MEMCACHED_STAT;
-      }
-      else if (buffer[1] == 'E') /* SERVER_ERROR */
-      {
-        char *rel_ptr;
-        char *startptr= buffer + 13, *endptr= startptr;
-
-        while (*endptr != '\r' && *endptr != '\n') endptr++;
-
-        /*
-          Yes, we could make this "efficent" but to do that we would need
-          to maintain more state for the size of the buffer. Why waste
-          memory in the struct, which is important, for something that
-          rarely should happen?
-        */
-        rel_ptr= (char *)libmemcached_realloc(ptr->root,
-                                              ptr->cached_server_error,
-                                              (size_t) (endptr - startptr + 1));
-
-        if (rel_ptr == NULL)
-        {
-          /* If we happened to have some memory, we just null it since we don't know the size */
-          if (ptr->cached_server_error)
-            ptr->cached_server_error[0]= 0;
-          return MEMCACHED_SERVER_ERROR;
-        }
-        ptr->cached_server_error= rel_ptr;
-
-        memcpy(ptr->cached_server_error, startptr, (size_t) (endptr - startptr));
-        ptr->cached_server_error[endptr - startptr]= 0;
-        return MEMCACHED_SERVER_ERROR;
-      }
-      else if (buffer[1] == 'T')
-        return MEMCACHED_STORED;
-      else
-      {
-        WATCHPOINT_STRING(buffer);
-        return MEMCACHED_UNKNOWN_READ_FAILURE;
-      }
-    }
-  case 'D': /* DELETED */
-    return MEMCACHED_DELETED;
-  case 'N': /* NOT_FOUND */
-    {
-      if (buffer[4] == 'F')
-        return MEMCACHED_NOTFOUND;
-      else if (buffer[4] == 'S')
-        return MEMCACHED_NOTSTORED;
-      else
-      {
-        WATCHPOINT_STRING(buffer);
-        return MEMCACHED_UNKNOWN_READ_FAILURE;
-      }
-    }
-  case 'E': /* PROTOCOL ERROR or END */
-    {
-      if (buffer[1] == 'N')
-        return MEMCACHED_END;
-      else if (buffer[1] == 'R')
-        return MEMCACHED_PROTOCOL_ERROR;
-      else if (buffer[1] == 'X')
-        return MEMCACHED_DATA_EXISTS;
-      else
-      {
-        WATCHPOINT_STRING(buffer);
-        return MEMCACHED_UNKNOWN_READ_FAILURE;
-      }
-
-    }
-  case 'I': /* CLIENT ERROR */
-    /* We add back in one because we will need to search for END */
-    memcached_server_response_increment(ptr);
-    return MEMCACHED_ITEM;
-  case 'C': /* CLIENT ERROR */
-    return MEMCACHED_CLIENT_ERROR;
-  default:
-    {
-      unsigned long long auto_return_value;
-
-      if (sscanf(buffer, "%llu", &auto_return_value) == 1)
-        return MEMCACHED_SUCCESS;
-
-      WATCHPOINT_STRING(buffer);
-      return MEMCACHED_UNKNOWN_READ_FAILURE;
-    }
-  }
-
-  /* NOTREACHED */
-}
-
-static memcached_return_t binary_read_one_response(memcached_server_write_instance_st ptr,
-                                                   char *buffer, size_t buffer_length,
-                                                   memcached_result_st *result)
-{
-  memcached_return_t rc;
-  protocol_binary_response_header header;
-
-  if ((rc= memcached_safe_read(ptr, &header.bytes, sizeof(header.bytes))) != MEMCACHED_SUCCESS)
-  {
-    WATCHPOINT_ERROR(rc);
-    return rc;
-  }
-
-  if (header.response.magic != PROTOCOL_BINARY_RES)
-  {
-    return MEMCACHED_PROTOCOL_ERROR;
-  }
-
-  /*
-   ** 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= ntohll(header.response.cas);
-  uint32_t bodylen= header.response.bodylen;
-
-  if (header.response.status == PROTOCOL_BINARY_RESPONSE_SUCCESS ||
-      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(ptr);
-      /* 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(ptr, &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 ((rc= memcached_safe_read(ptr, result->item_key, keylen)) != MEMCACHED_SUCCESS)
-        {
-          WATCHPOINT_ERROR(rc);
-          return MEMCACHED_UNKNOWN_READ_FAILURE;
-        }
-
-        bodylen -= keylen;
-        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(ptr, vptr, bodylen)) != MEMCACHED_SUCCESS)
-        {
-          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) || buffer_length != sizeof(uint64_t))
-          return MEMCACHED_PROTOCOL_ERROR;
-
-        WATCHPOINT_ASSERT(bodylen == buffer_length);
-        uint64_t val;
-        if ((rc= memcached_safe_read(ptr, &val, sizeof(val))) != MEMCACHED_SUCCESS)
-        {
-          WATCHPOINT_ERROR(rc);
-          return MEMCACHED_UNKNOWN_READ_FAILURE;
-        }
-
-        val= ntohll(val);
-        memcpy(buffer, &val, sizeof(val));
-      }
-      break;
-    case PROTOCOL_BINARY_CMD_SASL_LIST_MECHS:
-    case PROTOCOL_BINARY_CMD_VERSION:
-      {
-        memset(buffer, 0, buffer_length);
-        if (bodylen >= buffer_length)
-        {
-          /* not enough space in buffer.. should not happen... */
-          return MEMCACHED_UNKNOWN_READ_FAILURE;
-        }
-        else if ((rc= memcached_safe_read(ptr, buffer, bodylen)) != MEMCACHED_SUCCESS)
-        {
-          WATCHPOINT_ERROR(rc);
-          return MEMCACHED_UNKNOWN_READ_FAILURE;
-        }
-      }
-      break;
-    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(ptr, buffer, keylen)) != MEMCACHED_SUCCESS ||
-              (rc= memcached_safe_read(ptr, 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(ptr, 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! */
-        WATCHPOINT_ASSERT(0);
-        return MEMCACHED_PROTOCOL_ERROR;
-      }
-    }
-  }
-  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(ptr, hole, nr)) != MEMCACHED_SUCCESS)
-      {
-        WATCHPOINT_ERROR(rc);
-        return MEMCACHED_UNKNOWN_READ_FAILURE;
-      }
-      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(ptr, buffer, buffer_length, result);
-    default:
-      break;
-    }
-  }
-
-  rc= MEMCACHED_SUCCESS;
-  unlikely(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:
-      /* @todo fix the error mappings */
-      rc= MEMCACHED_PROTOCOL_ERROR;
-      break;
-    }
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+#include <libmemcached/string.hpp>
+
+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);
+}
@@ -1,34 +1,49 @@
-/* LibMemcached
- * Copyright (C) 2010 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2010 Brian Aker All rights reserved.
  *
- * Summary: Change the behavior of the memcached connection.
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_RESPONSE_H__
-#define __LIBMEMCACHED_RESPONSE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
+#pragma once
 
 /* Read a single response from the server */
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_read_one_response(memcached_server_write_instance_st ptr,
-                                               char *buffer, size_t buffer_length,
+memcached_return_t memcached_read_one_response(memcached_instance_st* ptr,
                                                memcached_result_st *result);
 
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_response(memcached_server_write_instance_st ptr,
-                                      char *buffer, size_t buffer_length,
+memcached_return_t memcached_response(memcached_instance_st* ptr,
                                       memcached_result_st *result);
 
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_RESPONSE_H__ */
+memcached_return_t memcached_response(memcached_instance_st* ptr,
+                                      char *buffer, size_t buffer_length,
+                                      memcached_result_st *result);
@@ -1,138 +0,0 @@
-/* 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: Functions to manipulate the result structure.
- *
- */
-
-/*
-  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 "common.h"
-
-static inline void _result_init(memcached_result_st *self,
-                                const memcached_st *memc)
-{
-  self->item_flags= 0;
-  self->item_expiration= 0;
-  self->key_length= 0;
-  self->item_cas= 0;
-  self->root= memc;
-  self->item_key[0]= 0;
-}
-
-memcached_result_st *memcached_result_create(const memcached_st *memc,
-                                             memcached_result_st *ptr)
-{
-  WATCHPOINT_ASSERT(memc);
-
-  /* Saving malloc calls :) */
-  if (ptr)
-  {
-    ptr->options.is_allocated= false;
-  }
-  else
-  {
-    ptr= libmemcached_malloc(memc, sizeof(memcached_result_st));
-
-    if (ptr == NULL)
-      return NULL;
-
-    ptr->options.is_allocated= true;
-  }
-
-  ptr->options.is_initialized= true;
-
-  _result_init(ptr, memc);
-
-  ptr->root= memc;
-  WATCHPOINT_SET(ptr->value.options.is_initialized= false);
-  memcached_string_create(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;
-}
-
-void memcached_result_free(memcached_result_st *ptr)
-{
-  if (ptr == NULL)
-    return;
-
-  memcached_string_free(&ptr->value);
-
-  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->options.is_initialized= false;
-  }
-}
-
-memcached_return_t memcached_result_set_value(memcached_result_st *ptr,
-                                              const char *value,
-                                              size_t length)
-{
-  return memcached_string_append(&ptr->value, value, length);
-}
-
-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);
-}
-
-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;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,77 +1,39 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary: Functions to manipulate the result structure.
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_RESULT_H__
-#define __LIBMEMCACHED_RESULT_H__
-
-struct memcached_result_st {
-  uint32_t item_flags;
-  time_t item_expiration;
-  size_t key_length;
-  uint64_t item_cas;
-  const memcached_st *root;
-  memcached_string_st value;
-  char item_key[MEMCACHED_MAX_KEY];
-  struct {
-    bool is_allocated:1;
-    bool is_initialized:1;
-  } options;
-  /* Add result callback function */
-};
-
-#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
-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
-
-
-#endif /* __LIBMEMCACHED_RESULT_H__ */
+#pragma once
+void memcached_result_reset_value(memcached_result_st *ptr);
@@ -1,375 +0,0 @@
-/* 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: interface for memcached server
- * Description: main include file for libmemcached
- *
- */
-#include "common.h"
-
-void memcached_set_sasl_callbacks(memcached_st *ptr,
-                                  const sasl_callback_t *callbacks)
-{
-  ptr->sasl.callbacks= callbacks;
-  ptr->sasl.is_allocated= false;
-}
-
-const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr)
-{
-  return ptr->sasl.callbacks;
-}
-
-/**
- * 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 bool resolve_names(int fd, char *laddr, char *raddr)
-{
-  char host[NI_MAXHOST];
-  char port[NI_MAXSERV];
-  struct sockaddr_storage saddr;
-  socklen_t salen= sizeof(saddr);
-
-  if ((getsockname(fd, (struct sockaddr *)&saddr, &salen) < 0) ||
-      (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host),
-                   port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0))
-  {
-    return false;
-  }
-
-  (void)sprintf(laddr, "%s;%s", host, port);
-  salen= sizeof(saddr);
-
-  if ((getpeername(fd, (struct sockaddr *)&saddr, &salen) < 0) ||
-      (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host),
-                   port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0))
-  {
-    return false;
-  }
-
-  (void)sprintf(raddr, "%s;%s", host, port);
-
-  return true;
-}
-
-memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *server)
-{
-  memcached_return_t rc;
-
-  /* SANITY CHECK: SASL can only be used with the binary protocol */
-  unlikely (!server->root->flags.binary_protocol)
-    return MEMCACHED_FAILURE;
-
-  /* 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= {
-    .message.header.request= {
-      .magic= PROTOCOL_BINARY_REQ,
-      .opcode= PROTOCOL_BINARY_CMD_SASL_LIST_MECHS
-    }
-  };
-
-  if (memcached_io_write(server, request.bytes,
-			 sizeof(request.bytes), 1) != sizeof(request.bytes))
-  {
-    return MEMCACHED_WRITE_FAILURE;
-  }
-
-  memcached_server_response_increment(server);
-
-  char mech[MEMCACHED_MAX_BUFFER];
-  rc= memcached_response(server, mech, sizeof(mech), NULL);
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    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;
-  }
-
-  /* set ip addresses */
-  char laddr[NI_MAXHOST + NI_MAXSERV];
-  char raddr[NI_MAXHOST + NI_MAXSERV];
-
-  unlikely (!resolve_names(server->fd, laddr, raddr))
-  {
-    server->cached_errno= errno;
-    return MEMCACHED_ERRNO;
-  }
-
-  sasl_conn_t *conn;
-  int ret= sasl_client_new("memcached", server->hostname, laddr, raddr,
-			   server->root->sasl.callbacks, 0, &conn);
-  if (ret != SASL_OK)
-  {
-    return MEMCACHED_AUTH_PROBLEM;
-  }
-
-  const char *data;
-  const char *chosenmech;
-  unsigned int len;
-  ret= sasl_client_start(conn, mech, NULL, &data, &len, &chosenmech);
-
-  if (ret != SASL_OK && ret != SASL_CONTINUE)
-  {
-    rc= MEMCACHED_AUTH_PROBLEM;
-    goto end;
-  }
-
-  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 */
-
-    struct libmemcached_io_vector_st vector[]=
-    {
-      { .length= sizeof(request.bytes), .buffer= request.bytes },
-      { .length= keylen, .buffer= chosenmech },
-      { .length= len, .buffer= data }
-    };
-
-    if (memcached_io_writev(server, vector, 3, true) == -1)
-    {
-      rc= MEMCACHED_WRITE_FAILURE;
-      goto end;
-    }
-    memcached_server_response_increment(server);
-
-    /* read the response */
-    rc= memcached_response(server, NULL, 0, NULL);
-    if (rc != MEMCACHED_AUTH_CONTINUE)
-    {
-      goto end;
-    }
-
-    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;
-      goto end;
-    }
-
-    request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SASL_STEP;
-    request.message.header.request.bodylen= htonl(len + keylen);
-  } while (true);
-
-end:
-  /* Release resources */
-  sasl_dispose(&conn);
-
-  return rc;
-}
-
-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= 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= context;
-
-  return SASL_OK;
-}
-
-memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr,
-                                                const char *username,
-                                                const char *password)
-{
-  if (ptr == NULL || username == NULL ||
-      password == NULL || ptr->sasl.callbacks != NULL)
-  {
-    return MEMCACHED_FAILURE;
-  }
-
-  sasl_callback_t *cb= libmemcached_calloc(ptr, 4, sizeof(sasl_callback_t));
-  char *name= libmemcached_malloc(ptr, strlen(username) + 1);
-  sasl_secret_t *secret= libmemcached_malloc(ptr, strlen(password) + 1 + sizeof(*secret))
-;
-  if (cb == NULL || name == NULL || secret == NULL)
-  {
-    libmemcached_free(ptr, cb);
-    libmemcached_free(ptr, name);
-    libmemcached_free(ptr, secret);
-    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-  }
-
-  secret->len= strlen(password);
-  strcpy((void*)secret->data, password);
-
-  cb[0].id= SASL_CB_USER;
-  cb[0].proc= get_username;
-  cb[0].context= strcpy(name, username);
-  cb[1].id= SASL_CB_AUTHNAME;
-  cb[1].proc= get_username;
-  cb[1].context= name;
-  cb[2].id= SASL_CB_PASS;
-  cb[2].proc= get_password;
-  cb[2].context= secret;
-  cb[3].id= SASL_CB_LIST_END;
-
-  ptr->sasl.callbacks= cb;
-  ptr->sasl.is_allocated= true;
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr)
-{
-   if (ptr == NULL || ptr->sasl.callbacks == NULL)
-   {
-     return MEMCACHED_FAILURE;
-   }
-
-   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 (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 == get_username &&
-      source->sasl.callbacks[1].id == SASL_CB_AUTHNAME &&
-      source->sasl.callbacks[1].proc == get_username &&
-      source->sasl.callbacks[2].id == SASL_CB_PASS &&
-      source->sasl.callbacks[2].proc == get_password &&
-      source->sasl.callbacks[3].id == SASL_CB_LIST_END)
-  {
-    sasl_secret_t *secret= source->sasl.callbacks[2].context;
-    return memcached_set_sasl_auth_data(clone,
-                                        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...
-   */
-  size_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 *cb= libmemcached_calloc(clone, total + 1, sizeof(sasl_callback_t));
-  if (cb == NULL)
-  {
-    return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-  }
-  memcpy(cb, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t));
-
-  /* Now update the context... */
-  for (size_t x= 0; x < total; ++x)
-  {
-    if (cb[x].id == SASL_CB_USER || cb[x].id == SASL_CB_AUTHNAME)
-    {
-      cb[x].context= libmemcached_malloc(clone, strlen(source->sasl.callbacks[x].context));
-
-      if (cb[x].context == NULL)
-      {
-        /* Failed to allocate memory, clean up previously allocated memory */
-        for (size_t y= 0; y < x; ++y)
-        {
-          libmemcached_free(clone, clone->sasl.callbacks[y].context);
-        }
-
-        libmemcached_free(clone, cb);
-        return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-      }
-      strcpy(cb[x].context, source->sasl.callbacks[x].context);
-    }
-    else
-    {
-      sasl_secret_t *src = source->sasl.callbacks[x].context;
-      sasl_secret_t *n = libmemcached_malloc(clone, src->len + 1 + sizeof(*n));
-      if (n == NULL)
-      {
-        /* Failed to allocate memory, clean up previously allocated memory */
-        for (size_t y= 0; y < x; ++y)
-        {
-          libmemcached_free(clone, clone->sasl.callbacks[y].context);
-        }
-
-        libmemcached_free(clone, cb);
-        return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-      }
-      memcpy(n, src, src->len + 1 + sizeof(*n));
-      cb[x].context= n;
-    }
-  }
-
-  clone->sasl.callbacks= cb;
-  clone->sasl.is_allocated= true;
-
-  return MEMCACHED_SUCCESS;
-}
@@ -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 <cassert>
+
+#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+
+#if defined(HAVE_LIBSASL) && HAVE_LIBSASL
+#include <sasl/sasl.h>
+#endif
+
+#include <pthread.h>
+
+void memcached_set_sasl_callbacks(memcached_st *shell,
+                                  const sasl_callback_t *callbacks)
+{
+  Memcached* self= memcached2Memcached(shell);
+  if (self)
+  {
+    self->sasl.callbacks= const_cast<sasl_callback_t *>(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
@@ -1,65 +0,0 @@
-/* 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: interface for memcached server
- * Description: main include file for libmemcached
- *
- */
-#ifndef LIBMEMCACHED_MEMCACHED_SASL_H
-#define LIBMEMCACHED_MEMCACHED_SASL_H
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-#include <sasl/sasl.h>
-
-#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
-const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_clone_sasl(memcached_st *clone, const  memcached_st *source);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_sasl_authenticate_connection(memcached_server_st *server);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* LIBMEMCACHED_WITH_SASL_SUPPORT */
-
-struct memcached_sasl_st {
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-    const sasl_callback_t *callbacks;
-#else
-    const void *callbacks;
-#endif
-    /*
-    ** Did we allocate data inside the callbacks, or did the user
-    ** supply that.
-    */
-    bool is_allocated;
-};
-
-
-
-#endif /* LIBMEMCACHED_MEMCACHED_SASL_H */
@@ -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);
@@ -1,294 +0,0 @@
-/* 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: String structure used for libmemcached.
- *
- */
-
-/*
-  This is a partial implementation for fetching/creating memcached_server_st objects.
-*/
-#include "common.h"
-
-static inline void _server_init(memcached_server_st *self, const memcached_st *root,
-                                const char *hostname, in_port_t port,
-                                uint32_t weight, memcached_connection_t type)
-{
-  self->options.sockaddr_inited= false;
-  self->options.is_shutting_down= false;
-  self->number_of_hosts= 0;
-  self->cursor_active= 0;
-  self->port= port;
-  self->cached_errno= 0;
-  self->fd= -1;
-  self->io_bytes_sent= 0;
-  self->server_failure_counter= 0;
-  self->weight= weight;
-  self->state.is_corked= false;
-  self->state.is_dead= false;
-  WATCHPOINT_SET(self->io_wait_count.read= 0);
-  WATCHPOINT_SET(self->io_wait_count.write= 0);
-  self->major_version= 0;
-  self->micro_version= 0;
-  self->minor_version= 0;
-  self->type= type;
-  self->read_ptr= self->read_buffer;
-  self->cached_server_error= NULL;
-  self->read_buffer_length= 0;
-  self->read_data_length= 0;
-  self->write_buffer_offset= 0;
-  self->address_info= NULL;
-
-  if (root)
-  {
-    self->next_retry= root->retry_timeout;
-  }
-  else
-  {
-    self->next_retry= 0;
-  }
-
-  self->root= root;
-  self->limit_maxbytes= 0;
-  if (hostname == NULL)
-    self->hostname[0]= 0;
-  else
-    strncpy(self->hostname, hostname, NI_MAXHOST - 1);
-}
-
-static memcached_server_st *_server_create(memcached_server_st *self, const memcached_st *memc)
-{
-  if (self == NULL)
-  {
-   self= (memcached_server_st *)libmemcached_malloc(memc, sizeof(memcached_server_st));
-
-    if (! self)
-      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 *memcached_server_create_with(const memcached_st *memc,
-                                                  memcached_server_write_instance_st self,
-                                                  const char *hostname, in_port_t port,
-                                                  uint32_t weight, memcached_connection_t type)
-{
-  self= _server_create(self, memc);
-
-  if (self == NULL)
-    return NULL;
-
-  _server_init(self, memc, hostname, port, weight, type);
-
-
-  if (type == MEMCACHED_CONNECTION_UDP)
-  {
-    self->write_buffer_offset= UDP_DATAGRAM_HEADER_LENGTH;
-    memcached_io_init_udp_header(self, 0);
-  }
-
-  return self;
-}
-
-void memcached_server_free(memcached_server_st *self)
-{
-  memcached_quit_server(self, false);
-
-  if (self->cached_server_error)
-    free(self->cached_server_error);
-
-  if (self->address_info)
-    freeaddrinfo(self->address_info);
-
-  if (memcached_is_allocated(self))
-  {
-    libmemcached_free(self->root, self);
-  }
-  else
-  {
-    self->options.is_initialized= false;
-  }
-}
-
-/*
-  If we do not have a valid object to clone from, we toss an error.
-*/
-memcached_server_st *memcached_server_clone(memcached_server_st *destination,
-                                            const memcached_server_st *source)
-{
-  /* We just do a normal create if source is missing */
-  if (source == NULL)
-    return NULL;
-
-  destination= memcached_server_create_with(source->root, destination,
-                                            source->hostname, source->port, source->weight,
-                                            source->type);
-  if (destination != NULL)
-  {
-    destination->cached_errno= source->cached_errno;
-
-    if (source->cached_server_error)
-      destination->cached_server_error= strdup(source->cached_server_error);
-  }
-
-  return destination;
-
-}
-
-memcached_return_t memcached_server_cursor(const memcached_st *ptr,
-                                           const memcached_server_fn *callback,
-                                           void *context,
-                                           uint32_t number_of_callbacks)
-{
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(ptr, x);
-
-    for (uint32_t y= 0; y < number_of_callbacks; y++)
-    {
-      unsigned int iferror;
-
-      iferror= (*callback[y])(ptr, instance, context);
-
-      if (iferror)
-        continue;
-    }
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_return_t memcached_server_execute(memcached_st *ptr,
-                                            memcached_server_execute_fn callback,
-                                            void *context)
-{
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    unsigned int iferror;
-
-    iferror= (*callback)(ptr, instance, context);
-
-    if (iferror)
-      continue;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_server_instance_st memcached_server_by_key(const memcached_st *ptr,
-                                                     const char *key,
-                                                     size_t key_length,
-                                                     memcached_return_t *error)
-{
-  uint32_t server_key;
-  memcached_server_instance_st instance;
-
-  *error= memcached_validate_key_length(key_length,
-                                        ptr->flags.binary_protocol);
-  unlikely (*error != MEMCACHED_SUCCESS)
-    return NULL;
-
-  unlikely (memcached_server_count(ptr) == 0)
-  {
-    *error= MEMCACHED_NO_SERVERS;
-    return NULL;
-  }
-
-  if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
-  {
-    *error= MEMCACHED_BAD_KEY_PROVIDED;
-    return NULL;
-  }
-
-  server_key= memcached_generate_hash(ptr, key, key_length);
-  instance= memcached_server_instance_by_position(ptr, server_key);
-
-  return instance;
-
-}
-
-void memcached_server_error_reset(memcached_server_st *ptr)
-{
-  ptr->cached_server_error[0]= 0;
-}
-
-memcached_server_instance_st memcached_server_get_last_disconnect(const memcached_st *ptr)
-{
-  return ptr->last_disconnected_server;
-}
-
-void memcached_server_list_free(memcached_server_list_st self)
-{
-  if (self == NULL)
-    return;
-
-  const memcached_st *root= self->root;
-
-  for (uint32_t x= 0; x < memcached_server_list_count(self); x++)
-  {
-    if (self[x].address_info)
-    {
-      freeaddrinfo(self[x].address_info);
-      self[x].address_info= NULL;
-    }
-  }
-
-  if (root)
-  {
-    libmemcached_free(root, self);
-  }
-  else
-  {
-    free(self);
-  }
-}
-
-uint32_t memcached_servers_set_count(memcached_server_st *servers, uint32_t count)
-{
-  return servers->number_of_hosts= count;
-}
-
-uint32_t memcached_server_count(const memcached_st *self)
-{
-  return self->number_of_hosts;
-}
-
-const char *memcached_server_name(memcached_server_instance_st self)
-{
-  return self->hostname;
-}
-
-in_port_t memcached_server_port(memcached_server_instance_st self)
-{
-  return self->port;
-}
-
-uint32_t memcached_server_response_count(memcached_server_instance_st self)
-{
-  return self->cursor_active;
-}
-
-const char *memcached_server_error(memcached_server_instance_st ptr)
-{
-  return ptr
-    ?  ptr->cached_server_error
-    : NULL;
-}
-
@@ -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 <libmemcached/common.h>
+
+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<Memcached *>(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;
+}
@@ -1,134 +0,0 @@
-/* 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: String structure used for libmemcached.
- *
- */
-
-#ifndef __LIBMEMCACHED_SERVER_H__
-#define __LIBMEMCACHED_SERVER_H__
-
-
-struct memcached_server_st {
-  struct {
-    bool is_allocated:1;
-    bool is_initialized:1;
-    bool sockaddr_inited:1;
-    bool is_shutting_down:1;
-  } options;
-  uint32_t number_of_hosts;
-  uint32_t cursor_active;
-  in_port_t port;
-  int cached_errno;
-  memcached_socket_t fd;
-  uint32_t io_bytes_sent; /* # bytes sent since last read */
-  uint32_t server_failure_counter;
-  uint32_t weight;
-  struct { // Place any "state" sort variables in here.
-    bool is_corked:1;
-    bool is_dead:1;
-  } state;
-  struct {
-    uint32_t read;
-    uint32_t write;
-  } io_wait_count;
-  uint8_t major_version;
-  uint8_t micro_version;
-  uint8_t minor_version;
-  memcached_connection_t type;
-  char *read_ptr;
-  char *cached_server_error;
-  size_t read_buffer_length;
-  size_t read_data_length;
-  size_t write_buffer_offset;
-  struct addrinfo *address_info;
-  time_t next_retry;
-  const memcached_st *root;
-  uint64_t limit_maxbytes;
-  char read_buffer[MEMCACHED_MAX_BUFFER];
-  char write_buffer[MEMCACHED_MAX_BUFFER];
-  char hostname[NI_MAXHOST];
-};
-
-
-#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
-  memcached_server_instance_st memcached_server_by_key(const 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_LOCAL
-memcached_server_st *memcached_server_clone(memcached_server_st *destination,
-                                            const memcached_server_st *source);
-
-LIBMEMCACHED_API
-memcached_server_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(memcached_server_instance_st self);
-
-LIBMEMCACHED_API
-const char *memcached_server_name(memcached_server_instance_st self);
-
-LIBMEMCACHED_API
-in_port_t memcached_server_port(memcached_server_instance_st self);
-
-LIBMEMCACHED_API
-const char *memcached_server_error(memcached_server_instance_st ptr);
-
-
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif /* __LIBMEMCACHED_SERVER_H__ */
@@ -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 <sys/time.h>
+#endif
+
+#include <cassert>
+
+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);
+    }
+  }
+}
@@ -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
+
+
@@ -1,77 +0,0 @@
-/* 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 "common.h"
-
-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)
-{
-  uint32_t count;
-  memcached_server_list_st new_host_list;
-
-  if (hostname == NULL || error == NULL)
-    return NULL;
-
-  if (! port)
-    port= MEMCACHED_DEFAULT_PORT;
-
-  /* Increment count for hosts */
-  count= 1;
-  if (ptr != NULL)
-  {
-    count+= memcached_server_list_count(ptr);
-  }
-
-  new_host_list= (memcached_server_write_instance_st)realloc(ptr, sizeof(memcached_server_st) * count);
-  if (!new_host_list)
-  {
-    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    return NULL;
-  }
-
-  /* TODO: Check return type */
-  memcached_server_create_with(NULL, &new_host_list[count-1], hostname, port, weight, MEMCACHED_CONNECTION_TCP);
-
-  /* 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;
-}
-
-memcached_server_st *memcached_server_list(const memcached_st *self)
-{
-  return self->servers;
-}
-
-void memcached_server_list_set(memcached_st *self, memcached_server_st *list)
-{
-  self->servers= list;
-}
@@ -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 <libmemcached/common.h>
+
+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);
+  }
+}
@@ -1,53 +0,0 @@
-/* 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: Types for libmemcached
- *
- */
-
-#ifndef __LIBMEMCACHED_SERVER_LIST_H__
-#define __LIBMEMCACHED_SERVER_LIST_H__
-
-#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);
-
-LIBMEMCACHED_LOCAL
-  uint32_t memcached_servers_set_count(memcached_server_list_st servers, uint32_t count);
-
-LIBMEMCACHED_LOCAL
-  memcached_server_st *memcached_server_list(const memcached_st *);
-
-LIBMEMCACHED_LOCAL
-  void memcached_server_list_set(memcached_st *self, memcached_server_list_st list);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif /* __LIBMEMCACHED_SERVER_LIST_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
+
+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);
@@ -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 <unistd.h>
+# 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
+
+
@@ -1,552 +0,0 @@
-/*
-*/
-
-#include "common.h"
-
-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;
-};
-
-
-static memcached_return_t set_data(memcached_stat_st *memc_stat, char *key, char *value)
-{
-
-  if (strlen(key) < 1)
-  {
-    WATCHPOINT_STRING(key);
-    return MEMCACHED_UNKNOWN_STAT_KEY;
-  }
-  else if (!strcmp("pid", key))
-  {
-    memc_stat->pid= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("uptime", key))
-  {
-    memc_stat->uptime= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("time", key))
-  {
-    memc_stat->time= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("version", key))
-  {
-    memcpy(memc_stat->version, value, strlen(value));
-    memc_stat->version[strlen(value)]= 0;
-  }
-  else if (!strcmp("pointer_size", key))
-  {
-    memc_stat->pointer_size= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("rusage_user", key))
-  {
-    char *walk_ptr;
-    for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
-    *walk_ptr= 0;
-    walk_ptr++;
-    memc_stat->rusage_user_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
-    memc_stat->rusage_user_microseconds= (uint32_t) strtol(walk_ptr, (char **)NULL, 10);
-  }
-  else if (!strcmp("rusage_system", key))
-  {
-    char *walk_ptr;
-    for (walk_ptr= value; (!ispunct(*walk_ptr)); walk_ptr++);
-    *walk_ptr= 0;
-    walk_ptr++;
-    memc_stat->rusage_system_seconds= (uint32_t) strtol(value, (char **)NULL, 10);
-    memc_stat->rusage_system_microseconds= (uint32_t) strtol(walk_ptr, (char **)NULL, 10);
-  }
-  else if (!strcmp("curr_items", key))
-  {
-    memc_stat->curr_items= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("total_items", key))
-  {
-    memc_stat->total_items= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("bytes_read", key))
-  {
-    memc_stat->bytes_read= (uint32_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("bytes_written", key))
-  {
-    memc_stat->bytes_written= (uint32_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("bytes", key))
-  {
-    memc_stat->bytes= (uint32_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("curr_connections", key))
-  {
-    memc_stat->curr_connections= (uint32_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("total_connections", key))
-  {
-    memc_stat->total_connections= (uint32_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("connection_structures", key))
-  {
-    memc_stat->connection_structures= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("cmd_get", key))
-  {
-    memc_stat->cmd_get= (uint64_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("cmd_set", key))
-  {
-    memc_stat->cmd_set= (uint64_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("get_hits", key))
-  {
-    memc_stat->get_hits= (uint64_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("get_misses", key))
-  {
-    memc_stat->get_misses= (uint64_t)strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("evictions", key))
-  {
-    memc_stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("limit_maxbytes", key))
-  {
-    memc_stat->limit_maxbytes= (uint64_t) strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("threads", key))
-  {
-    memc_stat->threads= (uint32_t) strtol(value, (char **)NULL, 10);
-  }
-  else if (!(strcmp("delete_misses", key) == 0 ||/* New stats in the 1.3 beta */
-             strcmp("delete_hits", key) == 0 ||/* Just swallow them for now.. */
-             strcmp("incr_misses", key) == 0 ||
-             strcmp("incr_hits", key) == 0 ||
-             strcmp("decr_misses", key) == 0 ||
-             strcmp("decr_hits", key) == 0 ||
-             strcmp("cas_misses", key) == 0 ||
-             strcmp("cas_hits", key) == 0 ||
-             strcmp("cas_badval", key) == 0 ||
-             strcmp("cmd_flush", key) == 0 ||
-             strcmp("accepting_conns", key) == 0 ||
-             strcmp("listen_disabled_num", key) == 0 ||
-             strcmp("conn_yields", key) == 0 ||
-             strcmp("auth_cmds", key) == 0 ||
-             strcmp("auth_errors", key) == 0 ||
-             strcmp("reclaimed", key) == 0))
-  {
-    WATCHPOINT_STRING(key);
-    return MEMCACHED_UNKNOWN_STAT_KEY;
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
-char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_stat,
-                               const char *key, memcached_return_t *error)
-{
-  char buffer[SMALL_STRING_LEN];
-  int length;
-  char *ret;
-
-  *error= MEMCACHED_SUCCESS;
-
-  if (!memcmp("pid", key, strlen("pid")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->pid);
-  else if (!memcmp("uptime", key, strlen("uptime")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->uptime);
-  else if (!memcmp("time", key, strlen("time")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->time);
-  else if (!memcmp("version", key, strlen("version")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%s", memc_stat->version);
-  else if (!memcmp("pointer_size", key, strlen("pointer_size")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->pointer_size);
-  else if (!memcmp("rusage_user", key, strlen("rusage_user")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u", memc_stat->rusage_user_seconds, memc_stat->rusage_user_microseconds);
-  else if (!memcmp("rusage_system", key, strlen("rusage_system")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u.%u", memc_stat->rusage_system_seconds, memc_stat->rusage_system_microseconds);
-  else if (!memcmp("curr_items", key, strlen("curr_items")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->curr_items);
-  else if (!memcmp("total_items", key, strlen("total_items")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->total_items);
-  else if (!memcmp("curr_connections", key, strlen("curr_connections")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->curr_connections);
-  else if (!memcmp("total_connections", key, strlen("total_connections")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->total_connections);
-  else if (!memcmp("connection_structures", key, strlen("connection_structures")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->connection_structures);
-  else if (!memcmp("cmd_get", key, strlen("cmd_get")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_get);
-  else if (!memcmp("cmd_set", key, strlen("cmd_set")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_set);
-  else if (!memcmp("get_hits", key, strlen("get_hits")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_hits);
-  else if (!memcmp("get_misses", key, strlen("get_misses")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_misses);
-  else if (!memcmp("evictions", key, strlen("evictions")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->evictions);
-  else if (!memcmp("bytes_read", key, strlen("bytes_read")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_read);
-  else if (!memcmp("bytes_written", key, strlen("bytes_written")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_written);
-  else if (!memcmp("bytes", key, strlen("bytes")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes);
-  else if (!memcmp("limit_maxbytes", key, strlen("limit_maxbytes")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->limit_maxbytes);
-  else if (!memcmp("threads", key, strlen("threads")))
-    length= snprintf(buffer, SMALL_STRING_LEN,"%u", memc_stat->threads);
-  else
-  {
-    *error= MEMCACHED_NOTFOUND;
-    return NULL;
-  }
-
-  ret= libmemcached_malloc(ptr, (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,
-                                             memcached_server_write_instance_st instance,
-                                             struct local_context *check)
-{
-  memcached_return_t rc;
-
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  protocol_binary_request_stats request= {.bytes= {0}};
-  request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-  request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT;
-  request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
-
-  if (args != NULL)
-  {
-    size_t len= strlen(args);
-
-    rc= memcached_validate_key_length(len, true);
-    unlikely (rc != MEMCACHED_SUCCESS)
-      return rc;
-
-    request.message.header.request.keylen= htons((uint16_t)len);
-    request.message.header.request.bodylen= htonl((uint32_t) len);
-
-    struct libmemcached_io_vector_st vector[]=
-    {
-      { .length= sizeof(request.bytes), .buffer= request.bytes },
-      { .length= len, .buffer= args }
-    };
-
-    if (memcached_vdo(instance, vector, 2, true) != MEMCACHED_SUCCESS)
-    {
-      memcached_io_reset(instance);
-      return MEMCACHED_WRITE_FAILURE;
-    }
-  }
-  else
-  {
-    if (memcached_do(instance, request.bytes,
-                     sizeof(request.bytes), true) != MEMCACHED_SUCCESS)
-    {
-      memcached_io_reset(instance);
-      return MEMCACHED_WRITE_FAILURE;
-    }
-  }
-
-  memcached_server_response_decrement(instance);
-  do
-  {
-    rc= memcached_response(instance, buffer, sizeof(buffer), NULL);
-
-    if (rc == MEMCACHED_END)
-      break;
-
-    unlikely (rc != MEMCACHED_SUCCESS)
-    {
-      memcached_io_reset(instance);
-      return rc;
-    }
-
-    if (memc_stat)
-    {
-      unlikely((set_data(memc_stat, buffer, buffer + strlen(buffer) + 1)) == MEMCACHED_UNKNOWN_STAT_KEY)
-      {
-        WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
-        WATCHPOINT_ASSERT(0);
-      }
-    }
-
-    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);
-    }
-  } while (1);
-
-  /* shit... 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,
-                                            memcached_server_write_instance_st instance,
-                                            struct local_context *check)
-{
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  size_t send_length;
-
-  if (args)
-    send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                   "stats %s\r\n", args);
-  else
-    send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                   "stats\r\n");
-
-  if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
-    return MEMCACHED_WRITE_FAILURE;
-
-  rc= memcached_do(instance, buffer, send_length, true);
-  if (rc != MEMCACHED_SUCCESS)
-    goto error;
-
-  while (1)
-  {
-    rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-
-    if (rc == MEMCACHED_STAT)
-    {
-      char *string_ptr, *end_ptr;
-      char *key, *value;
-
-      string_ptr= buffer;
-      string_ptr+= 5; /* Move past STAT */
-      for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++);
-      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++);
-      value= string_ptr;
-      value[(size_t)(end_ptr-string_ptr)]= 0;
-      string_ptr= end_ptr + 2;
-      if (memc_stat)
-      {
-        unlikely((set_data(memc_stat, key, value)) == MEMCACHED_UNKNOWN_STAT_KEY)
-        {
-          WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY);
-          WATCHPOINT_ASSERT(0);
-        }
-      }
-
-      if (check && check->func)
-      {
-        check->func(instance,
-                    key, strlen(key),
-                    value, strlen(value),
-                    check->context);
-      }
-    }
-    else
-      break;
-  }
-
-error:
-  if (rc == MEMCACHED_END)
-    return MEMCACHED_SUCCESS;
-  else
-    return rc;
-}
-
-memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_return_t *error)
-{
-  memcached_return_t rc;
-  memcached_stat_st *stats;
-
-  unlikely (ptr->flags.use_udp)
-  {
-    *error= MEMCACHED_NOT_SUPPORTED;
-    return NULL;
-  }
-
-  stats= libmemcached_calloc(ptr, memcached_server_count(ptr), sizeof(memcached_stat_st));
-
-  if (! stats)
-  {
-    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    return NULL;
-  }
-
-  rc= MEMCACHED_SUCCESS;
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_return_t temp_return;
-    memcached_server_write_instance_st instance;
-    memcached_stat_st *stat_instance;
-
-    stat_instance= stats + x;
-
-    stat_instance->root= ptr;
-
-    instance= memcached_server_instance_fetch(ptr, x);
-
-    if (ptr->flags.binary_protocol)
-    {
-      temp_return= binary_stats_fetch(stat_instance, args, instance, NULL);
-    }
-    else
-    {
-      temp_return= ascii_stats_fetch(stat_instance, args, instance, NULL);
-    }
-
-    if (temp_return != MEMCACHED_SUCCESS)
-      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_return_t rc;
-  memcached_st memc;
-  memcached_st *memc_ptr;
-  memcached_server_write_instance_st instance;
-
-  memset(memc_stat, 0, sizeof(memcached_stat_st));
-
-  memc_ptr= memcached_create(&memc);
-  WATCHPOINT_ASSERT(memc_ptr);
-
-  memcached_server_add(&memc, hostname, port);
-
-  instance= memcached_server_instance_fetch(memc_ptr, 0);
-
-  if (memc.flags.binary_protocol)
-  {
-    rc= binary_stats_fetch(memc_stat, args, instance, NULL);
-  }
-  else
-  {
-    rc= ascii_stats_fetch(memc_stat, args, 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(const memcached_st *ptr,
-                                memcached_stat_st *memc_stat,
-                                memcached_return_t *error)
-{
-  char **list;
-  size_t length= sizeof(memcached_stat_keys);
-
-  (void)memc_stat;
-
-  list= libmemcached_malloc(ptr, length);
-
-  if (! list)
-  {
-    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-    return NULL;
-  }
-
-  memcpy(list, memcached_stat_keys, sizeof(memcached_stat_keys));
-
-  *error= MEMCACHED_SUCCESS;
-
-  return list;
-}
-
-void memcached_stat_free(const memcached_st *ptr, memcached_stat_st *memc_stat)
-{
-  if (memc_stat == NULL)
-  {
-    WATCHPOINT_ASSERT(0); /* Be polite, but when debugging catch this as an error */
-    return;
-  }
-
-  if (memc_stat->root)
-  {
-    libmemcached_free(memc_stat->root, memc_stat);
-  }
-  else if (ptr)
-  {
-    libmemcached_free(ptr, memc_stat);
-  }
-  else
-  {
-    free(memc_stat);
-  }
-}
-
-static memcached_return_t call_stat_fn(memcached_st *ptr,
-                                       memcached_server_write_instance_st instance,
-                                       void *context)
-{
-  memcached_return_t rc;
-  struct local_context *check= (struct local_context *)context;
-
-  if (ptr->flags.binary_protocol)
-  {
-    rc= binary_stats_fetch(NULL, check->args, instance, check);
-  }
-  else
-  {
-    rc= ascii_stats_fetch(NULL, check->args, instance, check);
-  }
-
-  return rc;
-}
-
-memcached_return_t memcached_stat_execute(memcached_st *memc, const char *args,  memcached_stat_fn func, void *context)
-{
-  memcached_version(memc);
-
- struct local_context check= { .func= func, .context= context, .args= args };
-
- return memcached_server_execute(memc, call_stat_fn, (void *)&check);
-}
@@ -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 <libmemcached/common.h>
+
+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= &not_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<char *>(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<char **>(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);
+}
@@ -1,72 +0,0 @@
-/* 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: Collect up the stats for a memcached server.
- *
- */
-
-#ifndef __LIBMEMCACHED_STATS_H__
-#define __LIBMEMCACHED_STATS_H__
-
-struct memcached_stat_st {
-  uint32_t connection_structures;
-  uint32_t curr_connections;
-  uint32_t curr_items;
-  uint32_t pid;
-  uint32_t pointer_size;
-  uint32_t rusage_system_microseconds;
-  uint32_t rusage_system_seconds;
-  uint32_t rusage_user_microseconds;
-  uint32_t rusage_user_seconds;
-  uint32_t threads;
-  uint32_t time;
-  uint32_t total_connections;
-  uint32_t total_items;
-  uint32_t uptime;
-  uint64_t bytes;
-  uint64_t bytes_read;
-  uint64_t bytes_written;
-  uint64_t cmd_get;
-  uint64_t cmd_set;
-  uint64_t evictions;
-  uint64_t get_hits;
-  uint64_t get_misses;
-  uint64_t limit_maxbytes;
-  char version[MEMCACHED_VERSION_STRING_LENGTH];
-  memcached_st *root;
-};
-
-#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(const 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
-
-#endif /* __LIBMEMCACHED_STATS_H__ */
@@ -1,549 +0,0 @@
-/* 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: Storage related functions, aka set, replace,..
- *
- */
-
-#include "common.h"
-
-typedef enum {
-  SET_OP,
-  REPLACE_OP,
-  ADD_OP,
-  PREPEND_OP,
-  APPEND_OP,
-  CAS_OP,
-} memcached_storage_action_t;
-
-/* Inline this */
-static inline const char *storage_op_string(memcached_storage_action_t verb)
-{
-  switch (verb)
-  {
-  case SET_OP:
-    return "set ";
-  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 ";
-  default:
-    return "tosserror"; /* This is impossible, fixes issue for compiler warning in VisualStudio */
-  }
-
-  /* NOTREACHED */
-}
-
-static memcached_return_t memcached_send_binary(memcached_st *ptr,
-                                                memcached_server_write_instance_st server,
-                                                uint32_t server_key,
-                                                const char *key,
-                                                size_t key_length,
-                                                const char *value,
-                                                size_t value_length,
-                                                time_t expiration,
-                                                uint32_t flags,
-                                                uint64_t cas,
-                                                memcached_storage_action_t verb);
-
-static inline memcached_return_t memcached_send(memcached_st *ptr,
-                                                const char *master_key, size_t master_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,
-                                                memcached_storage_action_t verb)
-{
-  bool to_write;
-  size_t write_length;
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  uint32_t server_key;
-  memcached_server_write_instance_st instance;
-
-  WATCHPOINT_ASSERT(!(value == NULL && value_length > 0));
-
-  rc= memcached_validate_key_length(key_length, ptr->flags.binary_protocol);
-  unlikely (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  unlikely (memcached_server_count(ptr) == 0)
-    return MEMCACHED_NO_SERVERS;
-
-  if (ptr->flags.verify_key && (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED))
-    return MEMCACHED_BAD_KEY_PROVIDED;
-
-  server_key= memcached_generate_hash_with_redistribution(ptr, master_key, master_key_length);
-  instance= memcached_server_instance_fetch(ptr, server_key);
-
-  WATCHPOINT_SET(instance->io_wait_count.read= 0);
-  WATCHPOINT_SET(instance->io_wait_count.write= 0);
-
-  if (ptr->flags.binary_protocol)
-  {
-    rc= memcached_send_binary(ptr, instance, server_key,
-                              key, key_length,
-                              value, value_length, expiration,
-                              flags, cas, verb);
-    WATCHPOINT_IF_LABELED_NUMBER(instance->io_wait_count.read > 2, "read IO_WAIT", instance->io_wait_count.read);
-    WATCHPOINT_IF_LABELED_NUMBER(instance->io_wait_count.write > 2, "write_IO_WAIT", instance->io_wait_count.write);
-  }
-  else
-  {
-
-    if (cas)
-    {
-      write_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                      "%s %.*s%.*s %u %llu %zu %llu%s\r\n",
-                                      storage_op_string(verb),
-                                      (int)ptr->prefix_key_length,
-                                      ptr->prefix_key,
-                                      (int)key_length, key, flags,
-                                      (unsigned long long)expiration, value_length,
-                                      (unsigned long long)cas,
-                                      (ptr->flags.no_reply) ? " noreply" : "");
-    }
-    else
-    {
-      char *buffer_ptr= buffer;
-      const char *command= storage_op_string(verb);
-
-      /* Copy in the command, no space needed, we handle that in the command function*/
-      memcpy(buffer_ptr, command, strlen(command));
-
-      /* Copy in the key prefix, switch to the buffer_ptr */
-      buffer_ptr= memcpy((buffer_ptr + strlen(command)), ptr->prefix_key, ptr->prefix_key_length);
-
-      /* Copy in the key, adjust point if a key prefix was used. */
-      buffer_ptr= memcpy(buffer_ptr + (ptr->prefix_key_length ? ptr->prefix_key_length : 0),
-                         key, key_length);
-      buffer_ptr+= key_length;
-      buffer_ptr[0]=  ' ';
-      buffer_ptr++;
-
-      write_length= (size_t)(buffer_ptr - buffer);
-      write_length+= (size_t) snprintf(buffer_ptr, MEMCACHED_DEFAULT_COMMAND_SIZE,
-                                       "%u %llu %zu%s\r\n",
-                                       flags,
-                                       (unsigned long long)expiration, value_length,
-                                       ptr->flags.no_reply ? " noreply" : "");
-    }
-
-    if (ptr->flags.use_udp && ptr->flags.buffer_requests)
-    {
-      size_t cmd_size= write_length + value_length + 2;
-      if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
-        return MEMCACHED_WRITE_FAILURE;
-      if (cmd_size + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
-        memcached_io_write(instance, NULL, 0, true);
-    }
-
-    if (write_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
-    {
-      rc= MEMCACHED_WRITE_FAILURE;
-    }
-    else
-    {
-      struct libmemcached_io_vector_st vector[]=
-      {
-        { .length= write_length, .buffer= buffer },
-        { .length= value_length, .buffer= value },
-        { .length= 2, .buffer= "\r\n" }
-      };
-
-      if (ptr->flags.buffer_requests && verb == SET_OP)
-      {
-        to_write= false;
-      }
-      else
-      {
-        to_write= true;
-      }
-
-      /* Send command header */
-      rc=  memcached_vdo(instance, vector, 3, to_write);
-      if (rc == MEMCACHED_SUCCESS)
-      {
-
-        if (ptr->flags.no_reply)
-        {
-          rc= (to_write == false) ? MEMCACHED_BUFFERED : MEMCACHED_SUCCESS;
-        }
-        else if (to_write == false)
-        {
-          rc= MEMCACHED_BUFFERED;
-        }
-        else
-        {
-          rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-
-          if (rc == MEMCACHED_STORED)
-            rc= MEMCACHED_SUCCESS;
-        }
-      }
-    }
-
-    if (rc == MEMCACHED_WRITE_FAILURE)
-      memcached_io_reset(instance);
-  }
-
-  WATCHPOINT_IF_LABELED_NUMBER(instance->io_wait_count.read > 2, "read IO_WAIT", instance->io_wait_count.read);
-  WATCHPOINT_IF_LABELED_NUMBER(instance->io_wait_count.write > 2, "write_IO_WAIT", instance->io_wait_count.write);
-
-  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 *master_key __attribute__((unused)),
-                                        size_t master_key_length __attribute__((unused)),
-                                        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, master_key, master_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 *master_key, size_t master_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, master_key, master_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 *master_key, size_t master_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, master_key, master_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 *master_key, size_t master_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;
-  rc= memcached_send(ptr, master_key, master_key_length,
-                     key, key_length, value, value_length,
-                     expiration, flags, 0, PREPEND_OP);
-  return rc;
-}
-
-memcached_return_t memcached_append_by_key(memcached_st *ptr,
-                                           const char *master_key, size_t master_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;
-  rc= memcached_send(ptr, master_key, master_key_length,
-                     key, key_length, value, value_length,
-                     expiration, flags, 0, APPEND_OP);
-  return rc;
-}
-
-memcached_return_t memcached_cas_by_key(memcached_st *ptr,
-                                        const char *master_key, size_t master_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)
-{
-  memcached_return_t rc;
-  rc= memcached_send(ptr, master_key, master_key_length,
-                     key, key_length, value, value_length,
-                     expiration, flags, cas, CAS_OP);
-  return rc;
-}
-
-static inline uint8_t get_com_code(memcached_storage_action_t verb, bool noreply)
-{
-  /* 0 isn't a value we want, but GCC 4.2 seems to think ret can otherwise
-   * be used uninitialized in this function. FAIL */
-  uint8_t ret= 0;
-
-  if (noreply)
-    switch (verb)
-    {
-    case SET_OP:
-      ret=PROTOCOL_BINARY_CMD_SETQ;
-      break;
-    case ADD_OP:
-      ret=PROTOCOL_BINARY_CMD_ADDQ;
-      break;
-    case CAS_OP: /* FALLTHROUGH */
-    case REPLACE_OP:
-      ret=PROTOCOL_BINARY_CMD_REPLACEQ;
-      break;
-    case APPEND_OP:
-      ret=PROTOCOL_BINARY_CMD_APPENDQ;
-      break;
-    case PREPEND_OP:
-      ret=PROTOCOL_BINARY_CMD_PREPENDQ;
-      break;
-    default:
-      WATCHPOINT_ASSERT(verb);
-      break;
-    }
-  else
-    switch (verb)
-    {
-    case SET_OP:
-      ret=PROTOCOL_BINARY_CMD_SET;
-      break;
-    case ADD_OP:
-      ret=PROTOCOL_BINARY_CMD_ADD;
-      break;
-    case CAS_OP: /* FALLTHROUGH */
-    case REPLACE_OP:
-      ret=PROTOCOL_BINARY_CMD_REPLACE;
-      break;
-    case APPEND_OP:
-      ret=PROTOCOL_BINARY_CMD_APPEND;
-      break;
-    case PREPEND_OP:
-      ret=PROTOCOL_BINARY_CMD_PREPEND;
-      break;
-    default:
-      WATCHPOINT_ASSERT(verb);
-      break;
-    }
-
-  return ret;
-}
-
-
-
-static memcached_return_t memcached_send_binary(memcached_st *ptr,
-                                                memcached_server_write_instance_st server,
-                                                uint32_t server_key,
-                                                const char *key,
-                                                size_t key_length,
-                                                const char *value,
-                                                size_t value_length,
-                                                time_t expiration,
-                                                uint32_t flags,
-                                                uint64_t cas,
-                                                memcached_storage_action_t verb)
-{
-  bool flush;
-  protocol_binary_request_set request= {.bytes= {0}};
-  size_t send_length= sizeof(request.bytes);
-
-  bool noreply= server->root->flags.no_reply;
-
-  request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-  request.message.header.request.opcode= get_com_code(verb, noreply);
-  request.message.header.request.keylen= htons((uint16_t)(key_length + ptr->prefix_key_length));
-  request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
-  if (verb == APPEND_OP || 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 + ptr->prefix_key_length + value_length +
-                                                            request.message.header.request.extlen));
-
-  if (cas)
-    request.message.header.request.cas= htonll(cas);
-
-  flush= (bool) ((server->root->flags.buffer_requests && verb == SET_OP) ? 0 : 1);
-
-  if (server->root->flags.use_udp && ! flush)
-  {
-    size_t cmd_size= send_length + key_length + value_length;
-
-    if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
-    {
-      return MEMCACHED_WRITE_FAILURE;
-    }
-    if (cmd_size + server->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
-    {
-      memcached_io_write(server, NULL, 0, true);
-    }
-  }
-
-  struct libmemcached_io_vector_st vector[]=
-  {
-    { .length= send_length, .buffer= request.bytes },
-    { .length= ptr->prefix_key_length, .buffer= ptr->prefix_key },
-    { .length= key_length, .buffer= key },
-    { .length= value_length, .buffer= value }
-  };
-
-  /* write the header */
-  memcached_return_t rc;
-  if ((rc= memcached_vdo(server, vector, 4, flush)) != MEMCACHED_SUCCESS)
-  {
-    memcached_io_reset(server);
-    return (rc == MEMCACHED_SUCCESS) ? MEMCACHED_WRITE_FAILURE : rc;
-  }
-
-  if (verb == SET_OP && 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++)
-    {
-      memcached_server_write_instance_st instance;
-
-      ++server_key;
-      if (server_key == memcached_server_count(ptr))
-        server_key= 0;
-
-      instance= memcached_server_instance_fetch(ptr, server_key);
-
-      if (memcached_vdo(instance, vector, 4, false) != MEMCACHED_SUCCESS)
-      {
-        memcached_io_reset(instance);
-      }
-      else
-      {
-        memcached_server_response_decrement(instance);
-      }
-    }
-  }
-
-  if (flush == false)
-  {
-    return MEMCACHED_BUFFERED;
-  }
-
-  if (noreply)
-  {
-    return MEMCACHED_SUCCESS;
-  }
-
-  return memcached_response(server, NULL, 0, NULL);
-}
-
@@ -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 <libmemcached/common.h>
+
+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);
+}
+
@@ -1,110 +0,0 @@
-/* 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: Storage related functions, aka set, replace,..
- *
- */
-
-#ifndef __LIBMEMCACHED_STORAGE_H__
-#define __LIBMEMCACHED_STORAGE_H__
-
-#include "libmemcached/memcached.h"
-
-#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 *master_key, size_t master_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 *master_key, size_t master_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 *master_key, size_t master_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 *master_key, size_t master_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 *master_key, size_t master_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 *master_key, size_t master_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
-
-#endif /* __LIBMEMCACHED_STORAGE_H__ */
@@ -1,98 +0,0 @@
-#include "common.h"
-
-const char *memcached_strerror(memcached_st *ptr __attribute__((unused)), memcached_return_t rc)
-{
-  switch (rc)
-  {
-  case MEMCACHED_SUCCESS:
-    return "SUCCESS";
-  case MEMCACHED_FAILURE:
-    return "FAILURE";
-  case MEMCACHED_HOST_LOOKUP_FAILURE:
-    return "HOSTNAME LOOKUP FAILURE";
-  case MEMCACHED_CONNECTION_FAILURE:
-    return "CONNECTION FAILURE";
-  case MEMCACHED_CONNECTION_BIND_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_CONNECTION_SOCKET_CREATE_FAILURE:
-    return "CONNECTION SOCKET CREATE FAILURE";
-  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_MAXIMUM_RETURN:
-    return "Gibberish returned!";
-  default:
-    return "Gibberish returned!";
-  }
-}
@@ -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 <libmemcached/common.h>
+
+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";
+  }
+}
@@ -1,26 +0,0 @@
-/* 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: returns a human readable string for the error message
- *
- */
-
-#ifndef __LIBMEMCACHED_STRERROR_H__
-#define __LIBMEMCACHED_STRERROR_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-const char *memcached_strerror(memcached_st *ptr, memcached_return_t rc);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_STRERROR_H__ */
@@ -1,203 +0,0 @@
-/* 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: String structure used for libmemcached.
- *
- */
-
-#include "common.h"
-
-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);
-    char *new_value;
-    size_t adjust;
-    size_t new_size;
-
-    /* This is the block multiplier. To keep it larger and surive division errors we must round it up */
-    adjust= (need - (size_t)(string->current_size - (size_t)(string->end - string->string))) / MEMCACHED_BLOCK_SIZE;
-    adjust++;
-
-    new_size= sizeof(char) * (size_t)((adjust * MEMCACHED_BLOCK_SIZE) + string->current_size);
-    /* Test for overflow */
-    if (new_size < need)
-      return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-
-    new_value= libmemcached_realloc(string->root, string->string, new_size);
-
-    if (new_value == NULL)
-      return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
-
-    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(const memcached_st *memc, memcached_string_st *self, size_t initial_size)
-{
-  memcached_return_t rc;
-
-  WATCHPOINT_ASSERT(memc);
-
-  /* Saving malloc calls :) */
-  if (self)
-  {
-    WATCHPOINT_ASSERT(self->options.is_initialized == false);
-
-    self->options.is_allocated= false;
-  }
-  else
-  {
-    self= libmemcached_malloc(memc, sizeof(memcached_string_st));
-
-    if (self == NULL)
-    {
-      return NULL;
-    }
-
-    self->options.is_allocated= true;
-  }
-  self->root= memc;
-
-  _init_string(self);
-
-  rc=  _string_check(self, initial_size);
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    libmemcached_free(memc, self);
-    return NULL;
-  }
-
-  self->options.is_initialized= true;
-
-  WATCHPOINT_ASSERT(self->string == self->end);
-
-  return self;
-}
-
-memcached_return_t memcached_string_append_character(memcached_string_st *string,
-                                                     char character)
-{
-  memcached_return_t rc;
-
-  rc=  _string_check(string, 1);
-
-  if (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  *string->end= character;
-  string->end++;
-
-  return MEMCACHED_SUCCESS;
-}
-
-memcached_return_t memcached_string_append(memcached_string_st *string,
-                                           const char *value, size_t length)
-{
-  memcached_return_t rc;
-
-  rc= _string_check(string, length);
-
-  if (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  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)
-{
-  char *c_ptr;
-
-  if (memcached_string_length(string) == 0)
-    return NULL;
-
-  c_ptr= 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;
-}
-
-memcached_return_t memcached_string_reset(memcached_string_st *string)
-{
-  string->end= string->string;
-
-  return MEMCACHED_SUCCESS;
-}
-
-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);
-}
-
-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;
-}
-
-char *memcached_string_value_mutable(const memcached_string_st *self)
-{
-  return self->string;
-}
-
-void memcached_string_set_length(memcached_string_st *self, size_t length)
-{
-  self->end= self->string + length;
-}
@@ -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 <libmemcached/common.h>
+
+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<char *>(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;
+}
@@ -1,82 +0,0 @@
-/* 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: String structure used for libmemcached.
- *
- */
-
-#ifndef __LIBMEMCACHED_STRING_H__
-#define __LIBMEMCACHED_STRING_H__
-
-/**
-  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;
-  const memcached_st *root;
-  struct {
-    bool is_allocated:1;
-    bool is_initialized:1;
-  } options;
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_LOCAL
-memcached_string_st *memcached_string_create(const memcached_st *ptr,
-                                             memcached_string_st *string,
-                                             size_t initial_size);
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_string_check(memcached_string_st *string, size_t need);
-
-LIBMEMCACHED_LOCAL
-char *memcached_string_c_copy(memcached_string_st *string);
-
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_string_append_character(memcached_string_st *string,
-                                                     char character);
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_string_append(memcached_string_st *string,
-                                           const char *value, size_t length);
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_string_reset(memcached_string_st *string);
-
-LIBMEMCACHED_LOCAL
-void memcached_string_free(memcached_string_st *string);
-
-LIBMEMCACHED_LOCAL
-size_t memcached_string_length(const memcached_string_st *self);
-
-LIBMEMCACHED_LOCAL
-size_t memcached_string_size(const memcached_string_st *self);
-
-LIBMEMCACHED_LOCAL
-const char *memcached_string_value(const memcached_string_st *self);
-
-LIBMEMCACHED_LOCAL
-char *memcached_string_value_mutable(const memcached_string_st *self);
-
-LIBMEMCACHED_LOCAL
-void memcached_string_set_length(memcached_string_st *self, size_t length);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __LIBMEMCACHED_STRING_H__ */
@@ -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&);
@@ -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 <libmemcached/common.h>
+#include <libmemcached/memcached/protocol_binary.h>
+
+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"));
+}
@@ -1,90 +0,0 @@
-/* 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: Types for libmemcached
- *
- */
-
-#ifndef __LIBMEMCACHED_TYPES_H__
-#define __LIBMEMCACHED_TYPES_H__
-
-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;
-
-// All of the flavors of memcache_server_st
-typedef struct memcached_server_st memcached_server_st;
-typedef const struct memcached_server_st *memcached_server_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_continuum_item_st memcached_continuum_item_st;
-
-
-#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);
-
-/**
-  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);
-
-
-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, memcached_server_instance_st server, void *context);
-typedef memcached_return_t (*memcached_stat_fn)(memcached_server_instance_st server,
-                                                const char *key, size_t key_length,
-                                                const char *value, size_t value_length,
-                                                void *context);
-
-/**
-  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
-
-/**
-  @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;
-
-#endif /* __LIBMEMCACHED_TYPES_H__ */
@@ -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 <libmemcached/common.h>
+
+/*
+ * 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;
+}
@@ -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*);
@@ -1,38 +0,0 @@
-/* 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: connects to a host, and makes sure it is alive.
- *
- */
-
-#include "libmemcached/common.h"
-#include "libmemcached/memcached_util.h"
-
-
-bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret)
-{
-  memcached_return_t rc;
-  memcached_st memc, *memc_ptr;
-
-  memc_ptr= memcached_create(&memc);
-
-  rc= memcached_server_add(memc_ptr, hostname, port);
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    rc= memcached_version(memc_ptr);
-  }
-
-  memcached_free(memc_ptr);
-
-  if (ret)
-  {
-    *ret= rc;
-  }
-
-  return rc == MEMCACHED_SUCCESS;
-}
@@ -1,26 +0,0 @@
-/* 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: connects to a host, and makes sure it is alive.
- *
- */
-
-#ifndef __LIBMEMCACHED_PING_H__
-#define __LIBMEMCACHED_PING_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_PING_H__ */
@@ -1,268 +0,0 @@
-/* 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: connects to a host, and makes sure it is alive.
- *
- */
-
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/common.h"
-#include "libmemcached/memcached_util.h"
-
-#include <errno.h>
-#include <pthread.h>
-
-struct memcached_pool_st
-{
-  pthread_mutex_t mutex;
-  pthread_cond_t cond;
-  memcached_st *master;
-  memcached_st **mmc;
-  int firstfree;
-  uint32_t size;
-  uint32_t current_size;
-  char *version;
-};
-
-static memcached_return_t mutex_enter(pthread_mutex_t *mutex)
-{
-  int ret;
-  do
-    ret= pthread_mutex_lock(mutex);
-  while (ret == -1 && errno == EINTR);
-
-  return (ret == -1) ? MEMCACHED_ERRNO : MEMCACHED_SUCCESS;
-}
-
-static memcached_return_t mutex_exit(pthread_mutex_t *mutex)
-{
-  int ret;
-  do
-    ret= pthread_mutex_unlock(mutex);
-  while (ret == -1 && errno == EINTR);
-
-  return (ret == -1) ? MEMCACHED_ERRNO : MEMCACHED_SUCCESS;
-}
-
-/**
- * Grow the connection pool by creating a connection structure and clone the
- * original memcached handle.
- */
-static int grow_pool(memcached_pool_st* pool)
-{
-  memcached_st *obj= calloc(1, sizeof(*obj));
-
-  if (obj == NULL)
-    return -1;
-
-  if (memcached_clone(obj, pool->master) == NULL)
-  {
-    free(obj);
-    return -1;
-  }
-
-  pool->mmc[++pool->firstfree] = obj;
-  pool->current_size++;
-
-  return 0;
-}
-
-memcached_pool_st *memcached_pool_create(memcached_st* mmc,
-                                         uint32_t initial, uint32_t max)
-{
-  memcached_pool_st* ret = NULL;
-  memcached_pool_st object = { .mutex = PTHREAD_MUTEX_INITIALIZER,
-    .cond = PTHREAD_COND_INITIALIZER,
-    .master = mmc,
-    .mmc = calloc(max, sizeof(memcached_st*)),
-    .firstfree = -1,
-    .size = max,
-    .current_size = 0 };
-
-  if (object.mmc != NULL)
-  {
-    ret= calloc(1, sizeof(*ret));
-    if (ret == NULL)
-    {
-      free(object.mmc);
-      return NULL;
-    }
-
-    *ret = object;
-
-    /*
-      Try to create the initial size of the pool. An allocation failure at
-      this time is not fatal..
-    */
-    for (unsigned int ii= 0; ii < initial; ++ii)
-    {
-      if (grow_pool(ret) == -1)
-        break;
-    }
-  }
-
-  return ret;
-}
-
-memcached_st*  memcached_pool_destroy(memcached_pool_st* pool)
-{
-  memcached_st *ret = pool->master;
-
-  for (int xx= 0; xx <= pool->firstfree; ++xx)
-  {
-    memcached_free(pool->mmc[xx]);
-    free(pool->mmc[xx]);
-    pool->mmc[xx] = NULL;
-  }
-
-  pthread_mutex_destroy(&pool->mutex);
-  pthread_cond_destroy(&pool->cond);
-  free(pool->mmc);
-  free(pool);
-
-  return ret;
-}
-
-memcached_st* memcached_pool_pop(memcached_pool_st* pool,
-                                 bool block,
-                                 memcached_return_t *rc)
-{
-  memcached_st *ret= NULL;
-  if ((*rc= mutex_enter(&pool->mutex)) != MEMCACHED_SUCCESS)
-    return NULL;
-
-  do
-  {
-    if (pool->firstfree > -1)
-      ret= pool->mmc[pool->firstfree--];
-    else if (pool->current_size == pool->size)
-    {
-      if (!block)
-      {
-        *rc= mutex_exit(&pool->mutex);
-        return NULL;
-      }
-
-      if (pthread_cond_wait(&pool->cond, &pool->mutex) == -1)
-      {
-        int err = errno;
-        mutex_exit(&pool->mutex);
-        errno = err;
-        *rc= MEMCACHED_ERRNO;
-        return NULL;
-      }
-    }
-    else if (grow_pool(pool) == -1)
-    {
-      *rc= mutex_exit(&pool->mutex);
-      return NULL;
-    }
-  }
-  while (ret == NULL);
-
-  *rc= mutex_exit(&pool->mutex);
-
-  return ret;
-}
-
-memcached_return_t memcached_pool_push(memcached_pool_st* pool,
-                                       memcached_st *mmc)
-{
-  memcached_return_t rc= mutex_enter(&pool->mutex);
-
-  if (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  char* version= memcached_get_user_data(mmc);
-  /* Someone updated the behavior on the object.. */
-  if (version != pool->version)
-  {
-    memcached_free(mmc);
-    memset(mmc, 0, sizeof(*mmc));
-    if (memcached_clone(mmc, pool->master) == NULL)
-    {
-      rc= MEMCACHED_SOME_ERRORS;
-    }
-  }
-
-  pool->mmc[++pool->firstfree]= mmc;
-
-  if (pool->firstfree == 0 && pool->current_size == pool->size)
-  {
-    /* we might have people waiting for a connection.. wake them up :-) */
-    pthread_cond_broadcast(&pool->cond);
-  }
-
-  memcached_return_t rval= mutex_exit(&pool->mutex);
-  if (rc == MEMCACHED_SOME_ERRORS)
-    return rc;
-
-  return rval;
-}
-
-
-memcached_return_t memcached_pool_behavior_set(memcached_pool_st *pool,
-                                               memcached_behavior_t flag,
-                                               uint64_t data)
-{
-
-  memcached_return_t rc= mutex_enter(&pool->mutex);
-  if (rc != MEMCACHED_SUCCESS)
-    return rc;
-
-  /* update the master */
-  rc= memcached_behavior_set(pool->master, flag, data);
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    mutex_exit(&pool->mutex);
-    return rc;
-  }
-
-  ++pool->version;
-  memcached_set_user_data(pool->master, pool->version);
-  /* update the clones */
-  for (int xx= 0; xx <= pool->firstfree; ++xx)
-  {
-    rc= memcached_behavior_set(pool->mmc[xx], flag, data);
-    if (rc == MEMCACHED_SUCCESS)
-      memcached_set_user_data(pool->mmc[xx], pool->version);
-    else
-    {
-      memcached_free(pool->mmc[xx]);
-      memset(pool->mmc[xx], 0, sizeof(*pool->mmc[xx]));
-      if (memcached_clone(pool->mmc[xx], pool->master) == NULL)
-      {
-        /* 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....
-        */
-        free(pool->mmc[xx]);
-        pool->mmc[xx]= NULL;
-      }
-    }
-  }
-
-  return mutex_exit(&pool->mutex);
-}
-
-memcached_return_t memcached_pool_behavior_get(memcached_pool_st *pool,
-                                               memcached_behavior_t flag,
-                                               uint64_t *value)
-{
-  memcached_return_t rc= mutex_enter(&pool->mutex);
-
-  if (rc != MEMCACHED_SUCCESS)
-  {
-    return rc;
-  }
-
-  *value= memcached_behavior_get(pool->master, flag);
-
-  return mutex_exit(&pool->mutex);
-}
@@ -1,51 +0,0 @@
-/* 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: Connection pool implementation for libmemcached.
- *
- */
-
-
-#ifndef __LIMEMCACHED_UTIL_POOL_H__
-#define __LIMEMCACHED_UTIL_POOL_H__
-
-#include <libmemcached/memcached.h>
-
-#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_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_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
-
-#endif /* __LIMEMCACHED_UTIL_POOL_H__ */
@@ -1,59 +0,0 @@
-/* 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: connect to all hosts, and make sure they meet a minimum version
- *
- */
-
-/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
-#include "libmemcached/common.h"
-#include "libmemcached/memcached_util.h"
-
-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 *ptr __attribute__((unused)),
-                                               const memcached_server_st *instance,
-                                               void *context)
-{
-  /* Do Nothing */
-  struct local_context *check= (struct local_context *)context;
-
-  if (instance->major_version >= check->major_version &&
-      instance->minor_version >= check->minor_version &&
-      instance->micro_version >= 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)
-{
-  memcached_server_fn callbacks[1];
-  memcached_version(memc);
-
-  struct local_context check= { .major_version= major_version, .minor_version= minor_version, .micro_version= micro_version, .truth= true };
-  memcached_version(memc);
-
-  callbacks[0]= check_server_version;
-  memcached_server_cursor(memc, callbacks, (void *)&check,  1);
-
-  return check.truth;
-}
@@ -1,29 +0,0 @@
-/* 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: connect to all hosts, and make sure they meet a minimum version
- *
- */
-
-#ifndef __LIBMEMCACHED_UTIL_VERSION_H__
-#define __LIBMEMCACHED_UTIL_VERSION_H__
-
-#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
-
-#endif /* __LIBMEMCACHED__UTIL_VERSION_H__ */
@@ -1,20 +1,40 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
  *
- * Summary: Connection pool library.
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
  *
- * Author: Trond Norbye, Brian Aker
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (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 __LIBMEMCACHED__UTIL_H__
-#define __LIBMEMCACHED__UTIL_H__
-
-#include <libmemcached/memcached_util.h>
+#include <libmemcachedutil-1.0/util.h>
 
-#endif /* __LIBMEMCACHED__UTIL_H__ */
@@ -1,59 +0,0 @@
-#include "common.h"
-
-struct context_st 
-{
-  size_t length;
-  const char *buffer;
-};
-
-static memcached_return_t _set_verbosity(const memcached_st *ptr __attribute__((unused)),
-                                         const memcached_server_st *server,
-                                         void *context)
-{
-  memcached_return_t rc;
-  memcached_st local_memc;
-  memcached_st *memc_ptr;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-
-  struct context_st *execute= (struct context_st *)context;
-
-  memc_ptr= memcached_create(&local_memc);
-
-  rc= memcached_server_add(memc_ptr, memcached_server_name(server), memcached_server_port(server));
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(memc_ptr, 0);
-
-    rc= memcached_do(instance, execute->buffer, execute->length, true);
-
-    if (rc == MEMCACHED_SUCCESS)
-    {
-      rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-    }
-  }
-
-  memcached_free(memc_ptr);
-
-  return rc;
-}
-
-memcached_return_t memcached_verbosity(memcached_st *ptr, uint32_t verbosity)
-{
-  size_t send_length;
-  memcached_server_fn callbacks[1];
-
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-
-  send_length= (size_t) snprintf(buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, 
-                                 "verbosity %u\r\n", verbosity);
-  unlikely (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE)
-    return MEMCACHED_WRITE_FAILURE;
-
-  struct context_st context = { .length= send_length, .buffer= buffer };
-
-  callbacks[0]= _set_verbosity;
-
-  return memcached_server_cursor(ptr, callbacks, &context, 1);
-}
@@ -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 <libmemcached/common.h>
+
+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);
+}
@@ -1,27 +0,0 @@
-/* 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: Change the verbository level of the memcached server
- *
- */
-
-#ifndef __LIBMEMCACHED_VERBOSITY_H__
-#define __LIBMEMCACHED_VERBOSITY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-LIBMEMCACHED_API
-memcached_return_t memcached_verbosity(memcached_st *ptr, uint32_t verbosity);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBMEMCACHED_VERBOSITY_H__ */
@@ -1,129 +0,0 @@
-#include "common.h"
-
-const char * memcached_lib_version(void) 
-{
-  return LIBMEMCACHED_VERSION_STRING;
-}
-
-static inline memcached_return_t memcached_version_binary(memcached_st *ptr);
-static inline memcached_return_t memcached_version_textual(memcached_st *ptr);
-
-memcached_return_t memcached_version(memcached_st *ptr)
-{
-  if (ptr->flags.use_udp)
-    return MEMCACHED_NOT_SUPPORTED;
-
-  bool was_blocking= ptr->flags.no_block;
-  memcached_return_t rc;
-
-  ptr->flags.no_block= false;
-
-  if (ptr->flags.binary_protocol)
-    rc= memcached_version_binary(ptr);
-  else
-    rc= memcached_version_textual(ptr);      
-
-  ptr->flags.no_block= was_blocking;
-
-  return rc;
-}
-
-static inline memcached_return_t memcached_version_textual(memcached_st *ptr)
-{
-  size_t send_length;
-  memcached_return_t rc;
-  char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE];
-  char *response_ptr;
-  const char *command= "version\r\n";
-
-  send_length= strlen(command);
-
-  rc= MEMCACHED_SUCCESS;
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++)
-  {
-    memcached_return_t rrc;
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    rrc= memcached_do(instance, command, send_length, true);
-    if (rrc != MEMCACHED_SUCCESS)
-    {
-      rc= MEMCACHED_SOME_ERRORS;
-      continue;
-    }
-
-    rrc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
-    if (rrc != MEMCACHED_SUCCESS)
-    {
-      rc= MEMCACHED_SOME_ERRORS;
-      continue;
-    }
-
-    /* Find the space, and then move one past it to copy version */
-    response_ptr= index(buffer, ' ');
-    response_ptr++;
-
-    instance->major_version= (uint8_t)strtol(response_ptr, (char **)NULL, 10);
-    response_ptr= index(response_ptr, '.');
-    response_ptr++;
-    instance->minor_version= (uint8_t)strtol(response_ptr, (char **)NULL, 10);
-    response_ptr= index(response_ptr, '.');
-    response_ptr++;
-    instance->micro_version= (uint8_t)strtol(response_ptr, (char **)NULL, 10);
-  }
-
-  return rc;
-}
-
-static inline memcached_return_t memcached_version_binary(memcached_st *ptr)
-{
-  memcached_return_t rc;
-  protocol_binary_request_version request= { .bytes= {0}};
-  request.message.header.request.magic= PROTOCOL_BINARY_REQ;
-  request.message.header.request.opcode= PROTOCOL_BINARY_CMD_VERSION;
-  request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES;
-
-  rc= MEMCACHED_SUCCESS;
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++) 
-  {
-    memcached_return_t rrc;
-
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    rrc= memcached_do(instance, request.bytes, sizeof(request.bytes), true);
-    if (rrc != MEMCACHED_SUCCESS) 
-    {
-      memcached_io_reset(instance);
-      rc= MEMCACHED_SOME_ERRORS;
-      continue;
-    }
-  }
-
-  for (uint32_t x= 0; x < memcached_server_count(ptr); x++) 
-  {
-    memcached_server_write_instance_st instance=
-      memcached_server_instance_fetch(ptr, x);
-
-    if (memcached_server_response_count(instance) > 0) 
-    {
-      memcached_return_t rrc;
-      char buffer[32];
-      char *p;
-
-      rrc= memcached_response(instance, buffer, sizeof(buffer), NULL);
-      if (rrc != MEMCACHED_SUCCESS) 
-      {
-        memcached_io_reset(instance);
-        rc= MEMCACHED_SOME_ERRORS;
-        continue;
-      }
-
-      instance->major_version= (uint8_t)strtol(buffer, &p, 10);
-      instance->minor_version= (uint8_t)strtol(p + 1, &p, 10);
-      instance->micro_version= (uint8_t)strtol(p + 1, NULL, 10);
-    }
-  }
-
-  return rc;
-}
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -1,29 +0,0 @@
-/* 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: Find version information
- *
- */
-
-#ifndef __LIBMEMCACHED_VERSION_H__
-#define __LIBMEMCACHED_VERSION_H__
-
-#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
-
-#endif /* __LIBMEMCACHED_VERSION_H__ */
@@ -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*);
@@ -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 <libmemcached/common.h>
+
+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;
+}
@@ -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
@@ -1,54 +0,0 @@
-/* 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
- */
-
-#ifndef __LIBMEMCACHED_VISIBILITY_H__
-#define __LIBMEMCACHED_VISIBILITY_H__
-
-/**
- *
- * 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_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 /* __LIBMEMCACHED_VISIBILITY_H__ */
@@ -1,87 +1,51 @@
-/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached library
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker All rights reserved.
  *
- * Summary: Localized copy of WATCHPOINT debug symbols
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifndef __LIBMEMCACHED_WATCHPOINT_H__
-#define __LIBMEMCACHED_WATCHPOINT_H__
-
-/* Some personal debugging functions */
-#if defined(DEBUG)
-
-#ifdef TARGET_OS_LINUX
-static inline void libmemcached_stack_dump(void)
-{
-  void *array[10];
-  int size;
-  char **strings;
-
-  size= backtrace(array, 10);
-  strings= backtrace_symbols(array, size);
-
-  fprintf(stderr, "Found %d stack frames.\n", size);
-
-  for (int x= 0; x < size; x++)
-    fprintf(stderr, "%s\n", strings[x]);
-
-  free (strings);
-
-  fflush(stderr);
-}
-
-#elif defined(__sun)
-#include <ucontext.h>
-
-static inline void libmemcached_stack_dump(void)
-{
-   fflush(stderr);
-   printstack(fileno(stderr));
-}
-
-#else
-
-static inline void libmemcached_stack_dump(void)
-{ }
-
-#endif // libmemcached_stack_dump()
-
-#include <assert.h>
-
-#define WATCHPOINT do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout); } while (0)
-#define WATCHPOINT_ERROR(A) do {fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); } while (0)
-#define WATCHPOINT_IFERROR(A) do { if(A != MEMCACHED_SUCCESS)fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); } while (0)
-#define WATCHPOINT_STRING(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__,A);fflush(stdout); } while (0)
-#define WATCHPOINT_STRING_LENGTH(A,B) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout); } while (0)
-#define WATCHPOINT_NUMBER(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); } while (0)
-#define WATCHPOINT_LABELED_NUMBER(A,B) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(A),(size_t)(B));fflush(stdout); } while (0)
-#define WATCHPOINT_IF_LABELED_NUMBER(A,B,C) do { if(A) {fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(B),(size_t)(C));fflush(stdout);} } while (0)
-#define WATCHPOINT_ERRNO(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__, strerror(A));fflush(stdout); } while (0)
-#define WATCHPOINT_ASSERT_PRINT(A,B,C) do { if(!(A)){fprintf(stderr, "\nWATCHPOINT ASSERT %s:%d (%s) ", __FILE__, __LINE__,__func__);fprintf(stderr, (B),(C));fprintf(stderr,"\n");fflush(stdout); libmemcached_stack_dump(); } assert((A)); } while (0)
-#define WATCHPOINT_ASSERT(A) do { if (! (A)) {libmemcached_stack_dump();} assert((A)); } while (0)
-#define WATCHPOINT_ASSERT_INITIALIZED(A) do { if (! (A)) { libmemcached_stack_dump(); } assert(memcached_is_initialized((A))); } while (0);
-#define WATCHPOINT_SET(A) do { A; } while(0);
-
-#else
+#pragma once
 
 #define WATCHPOINT
 #define WATCHPOINT_ERROR(A)
-#define WATCHPOINT_IFERROR(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)
+#define WATCHPOINT_ASSERT(A) (void)(A)
 #define WATCHPOINT_ASSERT_INITIALIZED(A)
 #define WATCHPOINT_SET(A)
-
-#endif /* DEBUG */
-
-#endif /* __LIBMEMCACHED_WATCHPOINT_H__ */
@@ -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 <cerrno>
+#else
+# include <errno.h>
+#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 <winsock2.h>
+#endif
+
+#if defined(HAVE_WS2TCPIP_H) && HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
+#if defined(HAVE_IO_H) && HAVE_IO_H
+# include <io.h>
+#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;
+}
@@ -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
@@ -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
@@ -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 <libmemcached-1.0/struct/analysis.h>
+
+#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
@@ -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
@@ -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
+
@@ -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
@@ -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
@@ -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
@@ -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 0
+
+#define LIBMEMCACHED_VERSION_STRING "1.0.18"
+#define LIBMEMCACHED_VERSION_HEX 0x01000018
+
+#ifdef __cplusplus
+}
+#endif
@@ -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
@@ -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
+
@@ -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
@@ -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;
+
@@ -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
@@ -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
@@ -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
@@ -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 <stdexcept>
+#include <string>
+
+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 */
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 CINTTYPES_H	/* defined in libmemcached/mem_config.h */
+#  include <cstddef>
+#  include <cstdlib>
+#else
+#  include <inttypes.h>
+#  include <stddef.h>
+#  include <stdlib.h>
+#  include <stdbool.h>
+#endif
+
+#include <sys/types.h>
+
+#include <libmemcached-1.0/visibility.h>
+#include <libmemcached-1.0/configure.h>
+#include <libmemcached-1.0/platform.h>
+
+#include <libmemcached-1.0/limits.h>
+#include <libmemcached-1.0/defaults.h>
+
+#include <libmemcached-1.0/types/behavior.h>
+#include <libmemcached-1.0/types/callback.h>
+#include <libmemcached-1.0/types/connection.h>
+#include <libmemcached-1.0/types/hash.h>
+#include <libmemcached-1.0/types/return.h>
+#include <libmemcached-1.0/types/server_distribution.h>
+
+#include <libmemcached-1.0/return.h>
+
+#include <libmemcached-1.0/types.h>
+#include <libmemcached-1.0/callbacks.h>
+#include <libmemcached-1.0/alloc.h>
+#include <libmemcached-1.0/triggers.h>
+
+#include <libhashkit-1.0/hashkit.h>
+
+#include <libmemcached-1.0/struct/callback.h>
+#include <libmemcached-1.0/struct/string.h>
+#include <libmemcached-1.0/struct/result.h>
+#include <libmemcached-1.0/struct/allocator.h>
+#include <libmemcached-1.0/struct/sasl.h>
+#include <libmemcached-1.0/struct/memcached.h>
+#include <libmemcached-1.0/struct/server.h>
+#include <libmemcached-1.0/struct/stat.h>
+
+#include <libmemcached-1.0/basic_string.h>
+#include <libmemcached-1.0/error.h>
+#include <libmemcached-1.0/stats.h>
+
+// Everything above this line must be in the order specified.
+#include <libmemcached-1.0/allocators.h>
+#include <libmemcached-1.0/analyze.h>
+#include <libmemcached-1.0/auto.h>
+#include <libmemcached-1.0/behavior.h>
+#include <libmemcached-1.0/callback.h>
+#include <libmemcached-1.0/delete.h>
+#include <libmemcached-1.0/dump.h>
+#include <libmemcached-1.0/encoding_key.h>
+#include <libmemcached-1.0/exist.h>
+#include <libmemcached-1.0/fetch.h>
+#include <libmemcached-1.0/flush.h>
+#include <libmemcached-1.0/flush_buffers.h>
+#include <libmemcached-1.0/get.h>
+#include <libmemcached-1.0/hash.h>
+#include <libmemcached-1.0/options.h>
+#include <libmemcached-1.0/parse.h>
+#include <libmemcached-1.0/quit.h>
+#include <libmemcached-1.0/result.h>
+#include <libmemcached-1.0/server.h>
+#include <libmemcached-1.0/server_list.h>
+#include <libmemcached-1.0/storage.h>
+#include <libmemcached-1.0/strerror.h>
+#include <libmemcached-1.0/touch.h>
+#include <libmemcached-1.0/verbosity.h>
+#include <libmemcached-1.0/version.h>
+#include <libmemcached-1.0/sasl.h>
+
+#include <libmemcached-1.0/deprecated_types.h>
+
+#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
@@ -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 <osullivan.padraig@gmail.com>
+ *          Patrick Galbraith <patg@patg.net>
+ */
+
+/**
+ * @file memcached.hpp
+ * @brief Libmemcached C++ interface
+ */
+
+#pragma once
+
+#include <libmemcached-1.0/memcached.h>
+#if 0
+#include <libmemcached/exception.hpp>
+#endif
+
+#include <string.h>
+
+#include <sstream>
+#include <string>
+#include <vector>
+#include <map>
+
+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<char> &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<char> &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<char> &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<char> &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<std::string>& keys)
+  {
+    std::vector<const char *> real_keys;
+    std::vector<size_t> 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<std::string>::const_iterator it= keys.begin();
+
+    while (it != keys.end())
+    {
+      real_keys.push_back(const_cast<char *>((*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<char> &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<char> &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<std::string>& keys,
+              const std::vector< std::vector<char> *>& values,
+              time_t expiration,
+              uint32_t flags)
+  {
+    bool retval= true;
+    std::vector<std::string>::const_iterator key_it= keys.begin();
+    std::vector< std::vector<char> *>::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<const std::string, std::vector<char> >& key_value_map,
+              time_t expiration,
+              uint32_t flags)
+  {
+    bool retval= true;
+    std::map<const std::string, std::vector<char> >::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<char>& 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<char>& 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<char>& 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<char>& 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<char>& 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<char>& 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<char>& 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<char> &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<char>& 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<char> &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<std::string, std::string> >& 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<std::string, std::string> 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_;
+};
+
+}
@@ -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
@@ -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
@@ -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 <winsock2.h>
+# include <ws2tcpip.h>
+
+#ifndef HAVE_IN_PORT_T
+typedef int in_port_t;
+# define HAVE_IN_PORT_T 1
+#endif
+
+typedef SOCKET memcached_socket_t;
+
+#else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+# include <sys/un.h>
+# include <netinet/tcp.h>
+
+typedef int memcached_socket_t;
+
+#endif /* _WIN32 */
@@ -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
@@ -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 <libmemcached-1.0/struct/result.h>
+
+#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
@@ -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)
@@ -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 <sasl/sasl.h>
+#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 <libmemcached-1.0/struct/sasl.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 <libmemcached-1.0/struct/server.h>
+
+#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
@@ -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
@@ -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 <libmemcached-1.0/struct/stat.h>
+
+#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
@@ -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
@@ -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
@@ -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;
+};
@@ -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;
+};
+
@@ -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;
+};
@@ -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
@@ -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;
+
+};
@@ -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 */
+};
+
@@ -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 <sasl/sasl.h>
+#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;
+};
+
@@ -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 <netdb.h>
+#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];
+};
@@ -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;
+};
+
@@ -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;
+};
@@ -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 <stdlib.h>
+
+#ifdef HAVE_SASL_SASL_H
+#include <sasl/sasl.h>
+#endif
+
+#include <libmemcached-1.0/memcached.h>
+
+int main(void)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  if (memc == NULL)
+  {
+    return EXIT_FAILURE;
+  }
+  memcached_free(memc);
+
+  return EXIT_SUCCESS;
+}
+
@@ -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 <stdlib.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+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;
+}
+
@@ -0,0 +1,63 @@
+/*  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 <mem_config.h>
+
+#include <cstdlib>
+
+#include <libmemcached-1.0/memcached.h>
+
+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;
+}
+
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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) */
@@ -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
@@ -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@
@@ -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 <libmemcachedprotocol/common.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+
+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 <key>*\r\n",
+    [GETS_CMD]= "CLIENT_ERROR: Syntax error: gets <key>*\r\n",
+    [SET_CMD]= "CLIENT_ERROR: Syntax error: set <key> <flags> <exptime> <bytes> [noreply]\r\n",
+    [ADD_CMD]= "CLIENT_ERROR: Syntax error: add <key> <flags> <exptime> <bytes> [noreply]\r\n",
+    [REPLACE_CMD]= "CLIENT_ERROR: Syntax error: replace <key> <flags> <exptime> <bytes> [noreply]\r\n",
+    [CAS_CMD]= "CLIENT_ERROR: Syntax error: cas <key> <flags> <exptime> <bytes> <casid> [noreply]\r\n",
+    [APPEND_CMD]= "CLIENT_ERROR: Syntax error: append <key> <flags> <exptime> <bytes> [noreply]\r\n",
+    [PREPEND_CMD]= "CLIENT_ERROR: Syntax error: prepend <key> <flags> <exptime> <bytes> [noreply]\r\n",
+    [DELETE_CMD]= "CLIENT_ERROR: Syntax error: delete_object <key> [noreply]\r\n",
+    [INCR_CMD]= "CLIENT_ERROR: Syntax error: incr <key> <value> [noreply]\r\n",
+    [DECR_CMD]= "CLIENT_ERROR: Syntax error: decr <key> <value> [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 <num>\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;
+}
@@ -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);
@@ -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 <libmemcachedprotocol/common.h>
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <string.h>
+#include <stdio.h>
+
+/*
+** **********************************************************************
+** 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;
+}
+
@@ -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);
@@ -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 <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+
+#ifndef NDEBUG
+#include <signal.h>
+#endif
+
+#include <libmemcachedprotocol/common.h>
+
+#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);
+}
+
@@ -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 <pthread.h>
+
+#ifdef HAVE_UMEM_H
+# include <umem.h>
+# 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
@@ -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 <assert.h>
+
+#include <libmemcachedprotocol-0.0/handler.h>
+#include <libmemcachedprotocol/cache.h>
+#include <libmemcached/byteorder.h>
+#include <libmemcached/socket.hpp>
+
+/*
+ * 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"
@@ -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 <libmemcachedprotocol/common.h>
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <string.h>
+#include <strings.h>
+#include <ctype.h>
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+/*
+** **********************************************************************
+** 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;
+}
@@ -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}
@@ -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 <libmemcachedprotocol/common.h>
+
+#include <sys/types.h>
+
+#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;
+}
@@ -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 <trond.norbye@sun.com>
+ */
+
+#ifndef PROTOCOL_BINARY_H
+#define PROTOCOL_BINARY_H
+
+#include <libmemcachedprotocol-0.0/vbucket.h>
+
+/**
+ * \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 */
@@ -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
+ *               <u>anything</u> 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 <b>existing</b> 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 <b>existing</b> 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 <b>existing</b> 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 <b>must</b> 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 <b>must</b> 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 <b>must</b>
+    *               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;
@@ -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 <sys/types.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
+
+#include <libmemcached-1.0/visibility.h>
+#include <libmemcached-1.0/platform.h>
+#include <libmemcachedprotocol-0.0/binary.h>
+#include <libmemcachedprotocol-0.0/callback.h>
+
+/* 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
+ * <b>before</b> 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
@@ -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
@@ -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
@@ -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 <cstddef>
+#include <cstdlib>
+#include <cstdio>
+
+#include "libmemcachedutil-1.0/util.h"
+#include "libmemcached/assert.hpp"
+#include "libmemcached/backtrace.hpp"
@@ -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 <libmemcachedutil/common.h>
+
+
+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);
+}
@@ -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@
@@ -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 <libmemcachedutil/common.h>
+
+
+// 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;
+}
@@ -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 <libmemcachedutil/common.h>
+
+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);
+}
@@ -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 <libmemcachedutil/common.h>
+
+#include <cassert>
+#include <cerrno>
+#include <pthread.h>
+#include <memory>
+
+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;
+}
@@ -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 <libmemcachedutil/common.h>
+#include <cassert>
+
+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;
+}
@@ -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
+
@@ -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
@@ -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;
+}
@@ -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 <netdb.h>
+#endif
+
+#include <sys/types.h>
+
+#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
+
@@ -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
@@ -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 <libmemcached-1.0/memcached.h>
+
+#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
@@ -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 <libmemcached-1.0/memcached.h>
+
+#include <libmemcachedutil-1.0/pid.h>
+#include <libmemcachedutil-1.0/flush.h>
+#include <libmemcachedutil-1.0/ping.h>
+#include <libmemcachedutil-1.0/pool.h>
+#include <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
@@ -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 <cstdlib>
+
+int main(void)
+{
+  if (1)
+  {
+    abort();
+  }
+
+  return 0;
+}
@@ -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 <libtest/common.h>
+
+#include <sys/time.h>
+#include <cstdlib>
+
+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
+
@@ -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
+
@@ -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 <cerrno>
+#include <csignal>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+
+#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);
+}
@@ -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 {
+
+}
@@ -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
@@ -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 <libtest/common.h>
+
+#include <libtest/blobslap_worker.h>
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#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 <sstream>
+
+bool BlobslapWorker::build()
+{
+  return true;
+}
+
+Server *build_blobslap_worker(in_port_t try_port)
+{
+  return new BlobslapWorker(try_port);
+}
+
+} // namespace libtest
@@ -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);
+
+}
@@ -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
+
@@ -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 <libtest/common.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+#include <string>
+
+#ifdef HAVE_POLL_H
+# include <poll.h>
+#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
@@ -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
@@ -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 <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <fcntl.h>
+#include <fstream>
+#include <memory>
+#ifdef HAVE_POLL_H
+# include <poll.h>
+#endif
+#ifdef HAVE_SPAWN_H
+# include <spawn.h>
+#endif
+#include <sstream>
+#include <string>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <stdexcept>
+
+#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<char *>(libtool()),
+        const_cast<char *>("--mode=execute"),
+        const_cast<char *>("gdb"),
+        const_cast<char *>("-batch"),
+        const_cast<char *>("-f"),
+        const_cast<char *>("-x"),
+        const_cast<char *>(gdb_run_file.c_str()), 
+        const_cast<char *>(_exectuble_with_path.c_str()), 
+        0};
+
+      spawn_ret= posix_spawnp(&_pid, libtool(), &file_actions, &spawnattr, argv, environ);
+    }
+    else
+    {
+      // gdb binary
+      char *argv[]= {
+        const_cast<char *>("gdb"),
+        const_cast<char *>("-batch"),
+        const_cast<char *>("-f"),
+        const_cast<char *>("-x"),
+        const_cast<char *>(gdb_run_file.c_str()), 
+        const_cast<char *>(_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
@@ -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 <spawn.h>
+
+// 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<std::string, std::string> > 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);
+
+}
@@ -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 <libtest/common.h>
+
+// @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
+
@@ -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 <libtest/formatter.hpp>
+
+#include <libtest/timer.hpp>
+
+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
@@ -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 <cassert>
+#include <cerrno>
+#include <cstdlib>
+#include <sstream>
+#include <string>
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif
+
+#ifdef HAVE_SYS_RESOURCE_H 
+# include <sys/resource.h> 
+#endif
+ 
+#ifdef HAVE_FNMATCH_H
+# include <fnmatch.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
+#if defined(WIN32)
+# include "win32/wrappers.h"
+# define get_socket_errno() WSAGetLastError()
+#else
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+# define INVALID_SOCKET -1
+# define SOCKET_ERROR -1
+# define closesocket(a) close(a)
+# define get_socket_errno() errno
+#endif
+
+#include <libtest/test.hpp>
+
+#include <libtest/is_pid.hpp>
+
+#include <libtest/gearmand.h>
+#include <libtest/blobslap_worker.h>
+#include <libtest/memcached.h>
+#include <libtest/drizzled.h>
+
+#include <libtest/libtool.hpp>
+#include <libtest/killpid.h>
+#include <libtest/signal.h>
+#include <libtest/dns.hpp>
+#include <libtest/formatter.hpp>
+
+struct FreeFromVector
+{
+  template <class T>
+    void operator() ( T* ptr) const
+    {
+      if (ptr)
+      {
+        free(ptr);
+        ptr= NULL;
+      }
+    }
+};
+
+struct DeleteFromVector
+{
+  template <class T>
+    void operator() ( T* ptr) const
+    {
+      delete ptr;
+      ptr= NULL;
+    }
+};
@@ -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 <libtest/common.h>
+
+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
@@ -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 <typeinfo>
+
+#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/ostream.hpp>
+#include <libtest/memcached.hpp>
+#endif
+
+#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN
+#include <libgearman-1.0/ostream.hpp>
+#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 <class T_comparable>
+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 <class T1_comparable, class T2_comparable>
+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 <class T1_comparable, class T2_comparable>
+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 <class T_comparable>
+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 <class T1_comparable, class T2_comparable>
+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 <class T_comparable, class T_expression_string>
+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
@@ -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 <libtest/common.h>
+
+
+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
@@ -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
@@ -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 <cstdlib>
+#include <fcntl.h>
+#include <getopt.h>
+#include <iostream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <libtest/cpu.hpp>
+
+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;
+}
@@ -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 <libtest/common.h>
+
+#include <unistd.h>
+
+#pragma GCC diagnostic ignored "-Wundef"
+
+#if defined(HAVE_SYS_SYSCTL_H) && HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#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
@@ -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
@@ -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 <libtest/common.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+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
+
@@ -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
@@ -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 <libtest/common.h>
+
+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
+}
+
+}
@@ -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);
+
+}
+
@@ -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 <libtest/common.h>
+
+#include <libtest/drizzled.h>
+
+#include "util/instance.hpp"
+#include "util/operation.hpp"
+
+using namespace datadifferential;
+using namespace libtest;
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <signal.h>
+#include <sstream>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
+#if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE
+# include <libdrizzle-5.1/drizzle_client.h>
+#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);
+}
+
+}
@@ -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 <arpa/inet.h>
+
+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);
+
+}
+
@@ -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);
+}
@@ -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
@@ -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 <libtest/common.h>
+#include "libtest/exception.hpp"
+#include <cstdarg>
+
+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
@@ -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); }
@@ -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 <libtest/common.h>
+#include <cstdarg>
+
+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
+
@@ -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
+
@@ -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 <libtest/common.h>
+
+#include <algorithm>
+#include <fstream>
+#include <iostream>
+  
+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+= "&amp;";
+    }
+    else if (c == '>')
+    {
+      escaped_string+= "&gt;";
+    }
+    else if (c == '<')
+    {
+      escaped_string+= "&lt;";
+    }
+    else if (c == '\'')
+    {
+      escaped_string+= "&apos;";  break;
+    }
+    else if (c == '"')
+    {
+      escaped_string+= "&quot;";
+    }
+    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 << "<testsuites name=" 
+    << escape4XML(framework_.name(), escaped_string) << ">" << std::endl;
+
+  for (Suites::iterator framework_iter= framework_.suites().begin();
+       framework_iter != framework_.suites().end();
+       ++framework_iter)
+  {
+    output << "\t<testsuite name=" 
+      << escape4XML((*framework_iter)->name(), escaped_string)
+#if 0
+      << "  classname=\"\" package=\"\"" 
+#endif
+      << ">" << std::endl;
+
+    for (TestCases::iterator case_iter= (*framework_iter)->formatter()->testcases().begin();
+         case_iter != (*framework_iter)->formatter()->testcases().end();
+         ++case_iter)
+    {
+      output << "\t\t<testcase name=" 
+        << escape4XML((*case_iter)->name(), escaped_string)
+        << " time=\"" 
+        << (*case_iter)->timer().elapsed_milliseconds() 
+        << "\""; 
+
+      switch ((*case_iter)->result())
+      {
+        case TEST_SKIPPED:
+        output << ">" << std::endl;
+        output << "\t\t <skipped/>" << std::endl;
+        output << "\t\t</testcase>" << std::endl;
+        break;
+
+        case TEST_FAILURE:
+        output << ">" << std::endl;
+        output << "\t\t <failure message=\"\" type=\"\"/>"<< std::endl;
+        output << "\t\t</testcase>" << std::endl;
+        break;
+
+        case TEST_SUCCESS:
+        output << "/>" << std::endl;
+        break;
+      }
+    }
+    output << "\t</testsuite>" << std::endl;
+  }
+  output << "</testsuites>" << 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
@@ -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 <string>
+
+namespace libtest { class Framework; }
+
+
+namespace libtest {
+
+class TestCase;
+typedef std::vector<libtest::TestCase*> 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
@@ -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 <libtest/common.h>
+#include <libtest/collection.h>
+#include <libtest/signal.h>
+
+#include <algorithm>
+#include <fnmatch.h>
+#include <iostream>
+
+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<Collection*>::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<Collection*>::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<Collection*>::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<Collection*>::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<Collection*>::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
@@ -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 <libtest/signal.h>
+
+/**
+  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 <vector>
+
+namespace { class Collection; }
+typedef std::vector<libtest::Collection*> 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
@@ -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 <libtest/common.h>
+
+#include <libtest/gearmand.h>
+
+using namespace libtest;
+
+#include <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <signal.h>
+#include <sstream>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#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);
+}
+
+}
@@ -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);
+
+}
@@ -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
+
+
@@ -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 <libtest/common.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <unistd.h>
+
+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
@@ -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
@@ -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 <libtest/common.h>
+
+#if defined(HAVE_LIBCURL) && HAVE_LIBCURL
+#include <curl/curl.h>
+#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
@@ -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 <libtest/vchar.hpp>
+
+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
@@ -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
+
@@ -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 <libtest/common.h>
+
+
+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
+
@@ -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
@@ -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;
+}
+
@@ -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 <libtest/common.h>
+
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <sstream>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+
+#include <libtest/killpid.h>
+#include <libtest/stream.h>
+
+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;
+}
@@ -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);
+}
@@ -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 <libtest/common.h>
+#include <string>
+
+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
@@ -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);
+
+}
@@ -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 <cstdarg>
+# include <cstddef>
+# include <cstdio>
+# include <cstdlib>
+# include <cstring>
+#else
+# include <stdarg.h>
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#if defined(WIN32)
+# include <malloc.h>
+#else
+# include <alloca.h>
+#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 <libtest/valgrind.h>
+
+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)
@@ -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 <mateusz@loskot.net>
+#
+#   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])
+])
@@ -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 <gleensalmon@yahoo.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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
+])
@@ -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])
+        ])
+      ])
@@ -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 <libtest/common.h>
+
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+#include <fnmatch.h>
+#include <iostream>
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#include <fstream>
+#include <memory>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <signal.h>
+
+#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 <getopt.h>
+#include <unistd.h>
+
+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<libtest::Framework> 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;
+}
@@ -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 <cassert>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <iostream>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <libtest/server.h>
+#include <libtest/wait.h>
+
+#include <libtest/memcached.h>
+
+#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 <sstream>
+
+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
@@ -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);
+
+}
+
@@ -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<memcached_st *>(&memc)) == rc)
+  {
+    return true;
+  }
+
+  return false;
+}
+
+inline bool operator!= (const memcached_st& memc, memcached_return_t rc)
+{
+  if (memcached_last_error(const_cast<memcached_st *>(&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<memcached_st *>(&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
+
@@ -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 <cstdio>
+#include <poll.h>
+
+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");
+  }
+}
@@ -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 <libtest/common.h>
+
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
+#include <ctime>
+#include <fnmatch.h>
+#include <iostream>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h> 
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include <utility>
+#include <vector>
+
+#include <signal.h>
+
+#include <libtest/signal.h>
+
+#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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 <libtest/common.h>
+#include <cstdarg>
+
+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
@@ -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 <libtest/result/base.hpp>
+#include <libtest/result/fail.hpp>
+#include <libtest/result/skip.hpp>
+#include <libtest/result/success.hpp>
+
+#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)
@@ -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
@@ -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 <libtest/common.h>
+
+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
@@ -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
@@ -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 <libtest/common.h>
+
+#include <cassert>
+#include <cerrno>
+#include <climits>
+#include <cstdlib>
+#include <iostream>
+
+#include <algorithm> 
+#include <functional> 
+#include <locale>
+#include <unistd.h>
+
+// 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<int, int>(std::isspace))).base(), s.end()); 
+  return s; 
+}
+
+#include <libtest/server.h>
+#include <libtest/stream.h>
+#include <libtest/killpid.h>
+
+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
@@ -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 <libtest/cmdline.h>
+
+#include <cassert>
+#include <cstdio>
+#include <cstring>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <string>
+#include <unistd.h>
+#include <vector>
+
+namespace libtest {
+
+struct Server {
+private:
+  typedef std::vector< std::pair<std::string, std::string> > 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
+
+
@@ -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 <cerrno>
+#include <cstdlib>
+#include <iostream>
+
+#include <algorithm> 
+#include <functional> 
+#include <locale>
+
+// 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<int, int>(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<Server *>::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<Server *>::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<Server *>::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
@@ -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 <cassert>
+#include <cstdio>
+#include <cstring>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <string>
+#include <unistd.h>
+#include <vector>
+
+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<Server *> 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
@@ -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 <libtest/common.h>
+
+#include <csignal>
+
+#include <libtest/signal.h>
+
+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;
+}
@@ -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 <pthread.h>
+#include <semaphore.h>
+#include <signal.h>
+
+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
@@ -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 <libtest/test.hpp>
+
+#include <cstdlib>
+#include <unistd.h>
+
+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);
+}
@@ -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 <libtest/common.h>
+
+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));
+  }
+}
+
+}
@@ -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
+
@@ -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 <iostream>
+#include <cassert>
+#include <sstream>
+#include <ctime>
+#include <ostream>
+
+namespace libtest {
+namespace stream {
+
+namespace detail {
+
+template<class Ch, class Tr, class A>
+  class channel {
+  private:
+
+  public:
+    typedef std::basic_ostringstream<Ch, Tr, A> 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 Ch, class Tr, class A>
+  class channelln {
+  private:
+
+  public:
+    typedef std::basic_ostringstream<Ch, Tr, A> 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<template <class Ch, class Tr, class A> class OutputPolicy, class Ch = char, class Tr = std::char_traits<Ch>, class A = std::allocator<Ch> >
+  class log {
+  private:
+    typedef OutputPolicy<Ch, Tr, A> output_policy;
+
+  private:
+    std::ostream& _out;
+    const char *_filename;
+    int _line_number;
+    const char *_func;
+
+  public:
+    log(std::ostream& out_arg, const char* filename, int line_number, const char* func) :
+      _out(out_arg),
+      _filename(filename),
+      _line_number(line_number),
+      _func(func)
+    { }
+
+    virtual ~log()
+    {
+      output_policy()(arg, _out, _filename, _line_number, _func);
+    }
+
+  public:
+    template<class T>
+      log &operator<<(const T &x)
+      {
+        arg << x;
+        return *this;
+      }
+
+  private:
+    typename output_policy::stream_buffer arg;
+
+  private:
+    log( const log& );
+    const log& operator=( const log& );
+  };
+} // namespace detail
+
+class make_cerr : public detail::log<detail::channelln> {
+public:
+  make_cerr(const char* filename, int line_number, const char* func) :
+    detail::log<detail::channelln>(std::cerr, filename, line_number, func)
+  { }
+
+private:
+  make_cerr( const make_cerr& );
+  const make_cerr& operator=( const make_cerr& );
+};
+
+class cerr : public detail::log<detail::channel> {
+public:
+  cerr(const char* filename, int line_number, const char* func) :
+    detail::log<detail::channel>(std::cout, filename, line_number, func)
+  { }
+
+private:
+  cerr( const cerr& );
+  const cerr& operator=( const cerr& );
+};
+
+class clog : public detail::log<detail::channel> {
+public:
+  clog(const char* filename, int line_number, const char* func) :
+    detail::log<detail::channel>(std::clog, filename, line_number, func)
+  { }
+
+private:
+  clog( const clog& );
+  const clog& operator=( const clog& );
+};
+
+class make_cout : public detail::log<detail::channelln> {
+public:
+  make_cout(const char* filename, int line_number, const char* func) :
+    detail::log<detail::channelln>(std::cout, filename, line_number, func)
+  { }
+
+private:
+  make_cout( const make_cout& );
+  const make_cout& operator=( const make_cout& );
+};
+
+class cout : public detail::log<detail::channel> {
+public:
+  cout(const char* filename, int line_number, const char* func) :
+    detail::log<detail::channel>(std::cout, filename, line_number, func)
+  { }
+
+private:
+  cout( const cout& );
+  const cout& operator=( const cout& );
+};
+
+
+} // namespace stream
+
+#define Error stream::cerr(__FILE__, __LINE__, __func__)
+
+#define Out stream::cout(NULL, __LINE__, __func__)
+
+#define Outn() stream::cout(NULL, __LINE__, __func__) << " "
+
+#define Log stream::clog(NULL, __LINE__, __func__)
+
+#define Logn() stream::clog(NULL, __LINE__, __func__) << " "
+
+} // namespace libtest
@@ -0,0 +1,71 @@
+/*  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>
+
+namespace libtest { 
+
+const char *test_strerror(test_return_t code)
+{
+  switch (code) {
+  case TEST_SUCCESS:
+    return "ok";
+
+  case TEST_FAILURE:
+    return "failed";
+
+  case TEST_SKIPPED:
+    return "skipped";
+  }
+
+  FATAL("No port could be found");
+}
+
+} // namespace libtest
+
+
+std::ostream& operator<<(std::ostream& output, const enum test_return_t &arg)
+{
+  output << libtest::test_strerror(arg);
+  return output;
+}
+
+std::ostream& operator<<(std::ostream& output, const std::vector<char> &arg)
+{
+  output << "std::vector<char>:" << arg.size(); 
+  return output;
+}
@@ -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
+
+#include <vector>
+#include <iostream>
+
+namespace libtest {
+
+/**
+  @note Friendly print function for errors.
+*/
+LIBTEST_API
+const char *test_strerror(test_return_t code);
+
+} // namespace libtest
+
+std::ostream& operator<<(std::ostream& output, const enum test_return_t &arg);
+std::ostream& operator<<(std::ostream& output, const std::vector<char> &arg);
+
@@ -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
+
+#include "util/string.hpp"
+
+#define test_literal_param util_literal_param
+#define test_literal_compare_param util_literal_compare_param
+#define test_literal_param_size util_literal_param_size
+#define test_string_make_from_cstr util_string_make_from_cstr
+#define test_string_make_from_array util_string_make_from_array
+#define test_array_length util_array_length
@@ -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.
+ *
+ */
+
+#pragma once
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
+#include <libtest/lite.h>
+
+/**
+  A structure describing the test case.
+*/
+struct test_st {
+  const char *name;
+  bool requires_flush;
+  test_callback_fn *test_fn;
+};
+
+#define test_assert_errno(A) \
+do \
+{ \
+  if ((A)) { \
+    fprintf(stderr, "\n%s:%d: Assertion failed for %s: ", __FILE__, __LINE__, __func__);\
+    perror(#A); \
+    fprintf(stderr, "\n"); \
+    libtest::create_core(); \
+    assert((A)); \
+  } \
+} while (0)
+
+#define test_truth(A) \
+do \
+{ \
+  if (! (A)) { \
+    fprintf(stderr, "\n%s:%d: Assertion \"%s\" failed, in %s\n", __FILE__, __LINE__, #A, __func__);\
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_true(A) \
+do \
+{ \
+  if (! (A)) { \
+    fprintf(stderr, "\n%s:%d: Assertion \"%s\" failed, in %s\n", __FILE__, __LINE__, #A, __func__);\
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_true_got(A, B) test_true(A);
+#define test_true_hint(A, B) test_true(A);
+
+#define test_compare_hint(A, B, C) test_compare(A, B);
+#define test_compare_got(A, B, C) test_compare(A, B);
+
+#define test_skip(__expected, __actual) \
+do \
+{ \
+  if (libtest::_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)), false) == false) \
+  { \
+    return TEST_SKIPPED; \
+  } \
+} while (0)
+
+#define test_skip_valgrind() \
+do \
+{ \
+  if (libtest::_in_valgrind(__FILE__, __LINE__, __func__)) \
+  { \
+    return TEST_SKIPPED; \
+  } \
+} while (0)
+
+#define test_fail(A) \
+do \
+{ \
+  if (1) { \
+    fprintf(stderr, "\n%s:%d: Failed with %s, in %s\n", __FILE__, __LINE__, #A, __func__);\
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+
+#define test_false(A) \
+do \
+{ \
+  if ((A)) { \
+    fprintf(stderr, "\n%s:%d: Assertion failed %s, in %s\n", __FILE__, __LINE__, #A, __func__);\
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_false_with(A,B) \
+do \
+{ \
+  if ((A)) { \
+    fprintf(stderr, "\n%s:%d: Assertion failed %s with %s\n", __FILE__, __LINE__, #A, (B));\
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_ne_compare(__expected, __actual) \
+do \
+{ \
+  if (libtest::_ne_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)), true) == false) \
+  { \
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_compare(__expected, __actual) \
+do \
+{ \
+  if (libtest::_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)), true) == false) \
+  { \
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_zero(__actual) \
+do \
+{ \
+  if (libtest::_compare_zero(__FILE__, __LINE__, __func__, ((__actual))) == false) \
+  { \
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_null test_zero
+
+#define test_compare_warn(__expected, __actual) \
+do \
+{ \
+  void(libtest::_compare(__FILE__, __LINE__, __func__, (__expected), (__actual)), true); \
+} while (0)
+
+#define test_warn(__truth, __explain) \
+do \
+{ \
+  void(libtest::_assert_truth(__FILE__, __LINE__, __func__, bool((__truth)), #__truth, __explain)); \
+} while (0)
+
+#define test_strcmp(__expected, __actual) \
+do \
+{ \
+  void(libtest::_compare_strcmp(__FILE__, __LINE__, __func__, (__expected), (__actual))); \
+} while (0)
+
+#define test_memcmp(A,B,C) \
+do \
+{ \
+  if ((A) == NULL or (B) == NULL or memcmp((A), (B), (C))) \
+  { \
+    fprintf(stderr, "\n%s:%d: %.*s -> %.*s\n", __FILE__, __LINE__, (int)(C), (char *)(A), (int)(C), (char *)(B)); \
+    libtest::create_core(); \
+    return TEST_FAILURE; \
+  } \
+} while (0)
+
+#define test_return_if(__test_return_t) \
+do \
+{ \
+  if ((__test_return_t) != TEST_SUCCESS) \
+  { \
+    return __test_return_t; \
+  } \
+} while (0)
+
@@ -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.
+ *
+ */
+
+/*
+  Structures for generic tests.
+*/
+
+#pragma once
+
+#ifndef YATL_FULL
+# define YATL_FULL 1
+#endif
+
+#ifndef __PRETTY_FUNCTION__
+# define __PRETTY_FUNCTION__ __func__
+#endif
+
+#define YATL_STRINGIFY(x) #x
+#define YATL_TOSTRING(x) YATL_STRINGIFY(x)
+#define YATL_AT __FILE__ ":" YATL_TOSTRING(__LINE__)
+#define YATL_AT_PARAM __func__, AT
+#define YATL_UNIQUE __FILE__ ":" YATL_TOSTRING(__LINE__) "_unique"
+#define YATL_UNIQUE_FUNC_NAME __FILE__ ":" YATL_TOSTRING(__LINE__) "_unique_func"
+
+#define LIBYATL_DEFAULT_PARAM __FILE__, __LINE__, __PRETTY_FUNCTION__
+
+#include <cstdio>
+#include <cstdlib>
+#include <arpa/inet.h>
+
+#include <libtest/visibility.h>
+#include <libtest/version.h>
+
+#include <libtest/vchar.hpp>
+#include <libtest/error.h>
+#include <libtest/exception.hpp>
+#include <libtest/exception/disconnected.hpp>
+#include <libtest/exception/fatal.hpp>
+#include <libtest/result.hpp>
+
+#include <libtest/has.hpp>
+#include <libtest/error.h>
+#include <libtest/strerror.h>
+#include <libtest/timer.hpp>
+#include <libtest/alarm.h>
+#include <libtest/stream.h>
+#include <libtest/comparison.hpp>
+#include <libtest/server.h>
+#include <libtest/server_container.h>
+#include <libtest/wait.h>
+#include <libtest/callbacks.h>
+#include <libtest/test.h>
+#include <libtest/dream.h>
+#include <libtest/core.h>
+#include <libtest/runner.h>
+#include <libtest/port.h>
+#include <libtest/is_local.hpp>
+#include <libtest/socket.hpp>
+#include <libtest/collection.h>
+#include <libtest/framework.h>
+#include <libtest/get.h>
+#include <libtest/cmdline.h>
+#include <libtest/string.hpp>
+#include <libtest/binaries.h>
+#include <libtest/http.hpp>
+#include <libtest/cpu.hpp>
+#include <libtest/tmpfile.hpp>
+#include <libtest/client.hpp>
+#include <libtest/thread.hpp>
@@ -0,0 +1,325 @@
+/*  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 <pthread.h>
+
+namespace libtest
+{
+namespace thread
+{
+
+class Mutex
+{
+public:
+  Mutex() :
+    _err(0)
+  {
+    _err= pthread_mutex_init(&_mutex, NULL);
+  }
+
+  ~Mutex()
+  {
+    if ((_err= pthread_mutex_destroy(&_mutex)))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(_err));
+    }
+  }
+
+  pthread_mutex_t* handle()
+  {
+    if (_err != 0)
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_init: %s", strerror(_err));
+    }
+
+    return &_mutex;
+  }
+
+private:
+  int _err;
+  pthread_mutex_t _mutex;
+};
+
+class ScopedLock
+{
+public:
+  ScopedLock(Mutex& mutex_) :
+    _mutex(mutex_)
+  {
+    init();
+  }
+
+  ~ScopedLock()
+  {
+    int err;
+    if ((err= pthread_mutex_unlock(_mutex.handle())))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_unlock: %s", strerror(err));
+    }
+  }
+
+  Mutex* handle()
+  {
+    return &_mutex;
+  }
+
+private:
+  void init()
+  {
+    int err;
+    if ((err= pthread_mutex_lock(_mutex.handle())))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_lock: %s", strerror(err));
+    }
+  }
+
+private:
+  Mutex& _mutex;
+};
+
+class Condition
+{
+public:
+  Condition()
+  {
+    int err;
+    if ((err= pthread_cond_init(&_cond, NULL)))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_mutex_init: %s", strerror(err));
+    }
+  }
+
+  ~Condition()
+  {
+    int err;
+    if ((err= pthread_cond_destroy(&_cond)))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_destroy: %s", strerror(err));
+    }
+  }
+
+  void broadcast()
+  {
+    int err;
+    if ((err= pthread_cond_broadcast(&_cond)))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_broadcast: %s", strerror(err));
+    }
+  }
+
+  void signal()
+  {
+    int err;
+    if ((err= pthread_cond_signal(&_cond)))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_broadcast: %s", strerror(err));
+    }
+  }
+
+  void wait(ScopedLock& lock_)
+  {
+    int err;
+    if ((err= pthread_cond_wait(&_cond, lock_.handle()->handle())))
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_cond_wait: %s", strerror(err));
+    }
+  }
+
+private:
+  pthread_cond_t _cond;
+};
+
+class Barrier
+{
+public:
+  explicit Barrier(uint32_t count): 
+    _threshold(count),
+    _count(count),
+    _generation(0)
+  {   
+    if (_count == 0)
+    {
+      fatal_assert("Zero is an invalid value");
+    }
+  }
+
+  ~Barrier()
+  {
+  }
+
+  bool wait()
+  {   
+    ScopedLock l(_mutex);
+    uint32_t gen = _generation;
+
+    if (--_count == 0)
+    {   
+      _generation++;
+      _count = _threshold;
+      _cond.broadcast();
+
+      return true;
+    }
+
+    while (gen == _generation)
+    {
+      _cond.wait(l);
+    }
+
+    return false;
+  }
+
+private:
+  Mutex _mutex;
+  Condition _cond;
+  uint32_t _threshold;
+  uint32_t _count;
+  uint32_t _generation;
+};
+
+class Thread 
+{
+private:
+  typedef void *(*start_routine_fn) (void *);
+
+public:
+  template <class Function,class Arg1>
+    Thread(Function func, Arg1 arg):
+      _joined(false),
+      _func((start_routine_fn)func),
+      _context(arg)
+    {
+      int err;
+      if ((err= pthread_create(&_thread, NULL, entry_func, (void*)this)))
+      {
+        throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_create: %s", strerror(err));
+      }
+      _owner= pthread_self();
+    }
+
+  bool running() const
+  {
+    return (pthread_kill(_thread, 0) == 0);
+  }
+
+  bool detached()
+  {
+    if (EDEADLK == pthread_join(_thread, NULL))
+    {
+      return true;
+    }
+
+    /* Result of pthread_join was EINVAL == detached thread */
+    return false;
+  } 
+
+  bool join()
+  {
+    if (_thread == pthread_self())
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "Thread cannot join on itself");
+    }
+
+    if (_owner != pthread_self())
+    {
+      throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "Attempt made by a non-owner thead to join on thread");
+    }
+
+    bool ret= false;
+    {
+      ScopedLock l(_join_mutex);
+      if (_joined == false)
+      {
+        int err;
+        if ((err= pthread_join(_thread, NULL)))
+        {
+          switch(err)
+          {
+          case EINVAL:
+            break;
+
+          case ESRCH:
+            ret= true;
+            break;
+
+          case EDEADLK:
+          default:
+            throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "pthread_join: %s", strerror(err));
+          }
+        }
+        else
+        {
+          ret= true;
+        }
+
+        _joined= true;
+      }
+    }
+
+    return ret;
+  }
+
+  ~Thread()
+  {
+    join();
+  }
+
+protected:
+  void run()
+  {
+    _func(_context);
+  }
+
+private:
+  static void * entry_func(void* This)
+  {
+    ((Thread *)This)->run();
+    return NULL;
+  }
+
+private:
+  bool _joined;
+  pthread_t _thread;
+  pthread_t _owner;
+  start_routine_fn _func;
+  void* _context;
+  Mutex _join_mutex;
+};
+
+} // namespace thread
+} // namespace libtest
@@ -0,0 +1,150 @@
+/*  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/timer.hpp>
+
+#include <ctime>
+#include <iomanip>
+
+#ifdef __MACH__
+# include <mach/clock.h>
+# include <mach/mach.h>
+#else
+# include <sys/time.h>
+#endif
+
+namespace libtest {
+
+Timer::Timer()
+{
+  _begin.tv_sec= 0;
+  _begin.tv_nsec= 0;
+  _end.tv_sec= 0;
+  _end.tv_nsec= 0;
+}
+
+void Timer::reset()
+{
+  _end.tv_sec= 0;
+  _end.tv_nsec= 0;
+  _time(_begin);
+}
+
+void Timer::sample()
+{
+  _time(_end);
+}
+
+void Timer::offset(int64_t minutes_arg, int64_t seconds_arg, int64_t nanoseconds)
+{
+  reset();
+  _end= _begin;
+  _end.tv_sec+= (minutes_arg * 60) +seconds_arg;
+  _end.tv_nsec+= nanoseconds;
+}
+
+int64_t Timer::minutes()
+{
+  struct timespec result;
+  difference(result);
+  return int64_t(result.tv_sec / 60);
+}
+
+uint64_t Timer::elapsed_milliseconds() const
+{
+  struct timespec temp;
+  difference(temp);
+
+  return temp.tv_sec*1000 +temp.tv_nsec/1000000;
+}
+
+void Timer::difference(struct timespec& arg) const
+{
+  if ((_end.tv_nsec -_begin.tv_nsec) < 0)
+  {
+    arg.tv_sec= _end.tv_sec -_begin.tv_sec -1;
+    arg.tv_nsec= 1000000000 +_end.tv_nsec -_begin.tv_nsec;
+
+  }
+  else
+  {
+    arg.tv_sec= _end.tv_sec -_begin.tv_sec;
+    arg.tv_nsec= _end.tv_nsec -_begin.tv_nsec;
+  }
+}
+
+void Timer::_time(struct timespec& ts)
+{
+#ifdef __MACH__ // OSX lacks clock_gettime()
+  clock_serv_t _clock_serv;
+  mach_timespec_t _mach_timespec;
+  host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &_clock_serv);
+  clock_get_time(_clock_serv, &_mach_timespec);
+  mach_port_deallocate(mach_task_self(), _clock_serv);
+  ts.tv_sec= _mach_timespec.tv_sec;
+  ts.tv_nsec= _mach_timespec.tv_nsec;
+#elif defined(_WIN32)
+  ts.tv_sec= time(NULL);
+  ts.tv_nsec= 0;
+#else
+  clock_gettime(CLOCK_REALTIME, &ts);
+#endif
+}
+
+std::ostream& operator<<(std::ostream& output, const libtest::Timer& arg)
+{
+  struct timespec temp;
+  arg.difference(temp);
+
+  if (temp.tv_sec > 60)
+  {
+    output << temp.tv_sec / 60;
+    output << "." << temp.tv_sec % 60;
+  }
+  else
+  {
+    output << temp.tv_sec;
+  }
+
+  output << ":";
+  output << std::setfill('0') << std::setw(9) << temp.tv_nsec;
+
+  return output;
+}
+
+} // namespace libtest
@@ -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
+
+#include <cstdlib>
+#include <ctime>
+#include <iostream>
+
+
+namespace libtest {
+
+class Timer {
+public:
+
+  Timer();
+
+  void reset();
+
+  void sample();
+
+  void offset(int64_t minutes_arg, int64_t seconds_arg, int64_t nanoseconds);
+
+  int64_t minutes();
+
+  uint64_t elapsed_milliseconds() const;
+
+  void difference(struct timespec& arg) const;
+
+private:
+  void _time(struct timespec& ts);
+
+private:
+  struct timespec _begin;
+  struct timespec _end;
+};
+
+std::ostream& operator<<(std::ostream& output, const libtest::Timer& arg);
+
+} // namespace libtest
@@ -0,0 +1,70 @@
+/*  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>
+
+namespace libtest {
+
+std::string create_tmpfile(const std::string& name, int& fd)
+{
+  libtest::vchar_t file_buffer;
+  file_buffer.resize(FILENAME_MAX);
+  file_buffer[0]= 0;
+
+  int length= snprintf(&file_buffer[0], file_buffer.size(), "var/tmp/%s.XXXXXX", name.c_str());
+  fatal_assert(length > 0);
+
+  if ((fd= mkstemp(&file_buffer[0])) == -1)
+  {
+    throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "mkstemp() failed on %s with %s", &file_buffer[0], strerror(errno));
+  }
+
+  return &file_buffer[0];
+}
+
+std::string create_tmpfile(const std::string& name)
+{
+  int fd;
+  std::string ret_file= create_tmpfile(name, fd);
+  close(fd);
+  unlink(ret_file.c_str());
+
+  return ret_file.c_str();
+}
+
+} // namespace libtest
@@ -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
+
+#include <libtest/common.h>
+
+namespace libtest {
+
+std::string create_tmpfile(const std::string&, int&);
+std::string create_tmpfile(const std::string&);
+
+} // namespace libtest
+
@@ -0,0 +1,1229 @@
+/*  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/yatl.h>
+
+#if defined(HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H) && HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H
+# include <libmemcached-1.0/types/return.h>
+#endif
+
+#if defined(HAVE_LIBGEARMAN_1_0_RETURN_H) && HAVE_LIBGEARMAN_1_0_RETURN_H
+# include <libgearman-1.0/return.h>
+#endif
+
+#include <cstdlib>
+#include <unistd.h>
+
+using namespace libtest;
+
+static std::string testing_service;
+
+// Used to track setups where we see if failure is happening
+static uint32_t fatal_calls= 0;
+
+static test_return_t getenv_TEST(void *)
+{
+#if 0
+  for (char **ptr= environ; *ptr; ptr++)
+  {
+    Error << *ptr;
+  }
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t LIBTOOL_COMMAND_test(void *)
+{
+  test_true(getenv("LIBTOOL_COMMAND"));
+  return TEST_SUCCESS;
+}
+
+static test_return_t VALGRIND_COMMAND_test(void *)
+{
+  test_true(getenv("VALGRIND_COMMAND"));
+  return TEST_SUCCESS;
+}
+
+static test_return_t HELGRIND_COMMAND_test(void *)
+{
+  test_true(getenv("HELGRIND_COMMAND"));
+  return TEST_SUCCESS;
+}
+
+static test_return_t GDB_COMMAND_test(void *)
+{
+  test_true(getenv("GDB_COMMAND"));
+  return TEST_SUCCESS;
+}
+
+static test_return_t test_success_equals_one_test(void *)
+{
+  test_skip(HAVE_LIBMEMCACHED, 1);
+#if defined(HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H) && HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H
+  test_zero(MEMCACHED_SUCCESS);
+#endif
+  return TEST_SUCCESS;
+}
+
+static test_return_t test_success_test(void *)
+{
+  return TEST_SUCCESS;
+}
+
+static test_return_t test_throw_success_TEST(void *)
+{
+  try {
+    _SUCCESS;
+  }
+  catch (const libtest::__success&)
+  {
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    return TEST_FAILURE;
+  }
+
+  return TEST_FAILURE;
+}
+
+static test_return_t test_throw_skip_macro_TEST(void *)
+{
+  try {
+    SKIP_IF(true);
+  }
+  catch (const libtest::__skipped&)
+  {
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    FAIL("SLIP_IF() failed to throw libtest::_skipped");
+  }
+
+  FAIL("SLIP_IF() failed to throw");
+
+  return TEST_FAILURE;
+}
+
+static test_return_t test_throw_skip_unless_macro_TEST(void *)
+{
+  try {
+    SKIP_UNLESS(false);
+  }
+  catch (const libtest::__skipped&)
+  {
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    FAIL("SLIP_UNLESS() failed to throw libtest::_skipped");
+  }
+
+  FAIL("SLIP_UNLESS() failed to throw");
+
+  return TEST_FAILURE;
+}
+
+static test_return_t test_throw_skip_TEST(void *)
+{
+  try {
+    throw libtest::__skipped(LIBYATL_DEFAULT_PARAM, "basic test");
+  }
+  catch (const libtest::__skipped&)
+  {
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    FAIL("SLIP_IF() failed to throw libtest::_skipped");
+  }
+
+  FAIL("SLIP_IF() failed to throw");
+
+  return TEST_FAILURE;
+}
+
+static test_return_t test_throw_fail_TEST(void *)
+{
+  try {
+    FAIL("test message!");
+  }
+  catch (const libtest::__failure& e)
+  {
+    std::string compare_message("test message!");
+    test_zero(compare_message.compare(e.what()));
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    return TEST_FAILURE;
+  }
+
+  return TEST_FAILURE;
+}
+#pragma GCC diagnostic ignored "-Wstack-protector"
+
+#ifdef __clang__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-security"
+#endif
+
+static test_return_t ASSERT_FALSE__TEST(void *)
+{
+  try {
+    ASSERT_FALSE(true);
+  }
+  catch (const libtest::__failure& e)
+  {
+    ASSERT_STREQ(e.what(), "Assertion '!true'");
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    return TEST_FAILURE;
+  }
+
+  return TEST_FAILURE;
+}
+
+#ifdef __clang__
+# pragma GCC diagnostic pop
+#endif
+
+static test_return_t ASSERT_NEQ_FAIL_TEST(void *)
+{
+  try {
+    ASSERT_NEQ(1,1);
+  }
+  catch (const libtest::__failure& e)
+  {
+    ASSERT_STREQ(e.what(), "Assertion '1' == '1'");
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    return TEST_FAILURE;
+  }
+
+  return TEST_FAILURE;
+}
+
+static test_return_t ASSERT_NEQ_TEST(void *)
+{
+  ASSERT_NEQ(1,0);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t ASSERT_FALSE_TEST(void *)
+{
+  try {
+    FAIL(__func__);
+  }
+  catch (const libtest::__failure& e)
+  {
+    ASSERT_STREQ(e.what(), __func__);
+    return TEST_SUCCESS;
+  }
+  catch (...)
+  {
+    return TEST_FAILURE;
+  }
+
+  return TEST_FAILURE;
+}
+
+static test_return_t test_failure_test(void *)
+{
+  return TEST_SKIPPED; // Only run this when debugging
+
+  ASSERT_EQ(1, 2);
+  return TEST_SUCCESS;
+}
+
+static test_return_t local_test(void *)
+{
+  if (getenv("LIBTEST_LOCAL"))
+  {
+    test_true(test_is_local());
+  }
+  else
+  {
+    test_false(test_is_local());
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t local_not_test(void *)
+{
+  return TEST_SKIPPED;
+
+  std::string temp;
+
+  const char *ptr;
+  if ((ptr= getenv("LIBTEST_LOCAL")) == NULL)
+  {
+    temp.append(ptr);
+  }
+
+  // unsetenv() will cause issues with valgrind
+  _compare(__FILE__, __LINE__, __func__, 0, unsetenv("LIBTEST_LOCAL"), true);
+  ASSERT_EQ(0, unsetenv("LIBTEST_LOCAL"));
+  test_false(test_is_local());
+
+  ASSERT_EQ(0, setenv("LIBTEST_LOCAL", "1", 1));
+  test_true(test_is_local());
+
+  if (temp.empty())
+  {
+    ASSERT_EQ(0, unsetenv("LIBTEST_LOCAL"));
+  }
+  else
+  {
+    char *old_string= strdup(temp.c_str());
+    ASSERT_EQ(0, setenv("LIBTEST_LOCAL", old_string, 1));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_exists_test(void *)
+{
+  ASSERT_EQ(0, access("var", R_OK | W_OK | X_OK));
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_tmp_exists_test(void *)
+{
+  ASSERT_EQ(0, access("var/tmp", R_OK | W_OK | X_OK));
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_run_exists_test(void *)
+{
+  ASSERT_EQ(0, access("var/run", R_OK | W_OK | X_OK));
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_log_exists_test(void *)
+{
+  ASSERT_EQ(0, access("var/log", R_OK | W_OK | X_OK));
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_drizzle_exists_test(void *)
+{
+  ASSERT_EQ(0, access("var/drizzle", R_OK | W_OK | X_OK));
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_tmp_test(void *)
+{
+  FILE *file= fopen("var/tmp/junk", "w+");
+  test_true(file);
+  fclose(file);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_run_test(void *)
+{
+  FILE *file= fopen("var/run/junk", "w+");
+  test_true(file);
+  fclose(file);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_log_test(void *)
+{
+  FILE *file= fopen("var/log/junk", "w+");
+  test_true(file);
+  fclose(file);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_drizzle_test(void *)
+{
+  FILE *file= fopen("var/drizzle/junk", "w+");
+  test_true(file);
+  fclose(file);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_tmp_rm_test(void *)
+{
+  test_true(unlink("var/tmp/junk") == 0);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_run_rm_test(void *)
+{
+  test_true(unlink("var/run/junk") == 0);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_log_rm_test(void *)
+{
+  test_true(unlink("var/log/junk") == 0);
+  return TEST_SUCCESS;
+}
+
+static test_return_t var_drizzle_rm_test(void *)
+{
+  test_true(unlink("var/drizzle/junk") == 0);
+  return TEST_SUCCESS;
+}
+
+static test_return_t _compare_test_return_t_test(void *)
+{
+  ASSERT_EQ(TEST_SUCCESS, TEST_SUCCESS);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t _compare_memcached_return_t_test(void *)
+{
+  test_skip(HAVE_LIBMEMCACHED, true);
+#if defined(HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H) && HAVE_LIBMEMCACHED_1_0_TYPES_RETURN_H
+  ASSERT_EQ(MEMCACHED_SUCCESS, MEMCACHED_SUCCESS);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t _compare_gearman_return_t_test(void *)
+{
+  test_skip(HAVE_LIBGEARMAN, true);
+#if defined(HAVE_LIBGEARMAN_1_0_RETURN_H) && HAVE_LIBGEARMAN_1_0_RETURN_H
+  ASSERT_EQ(GEARMAN_SUCCESS, GEARMAN_SUCCESS);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t drizzled_cycle_test(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers and servers->validate());
+
+#if defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY
+  test_true(has_drizzled());
+#endif
+
+  test_skip(true, has_drizzled());
+
+  test_skip(true, server_startup(*servers, "drizzled", get_free_port(), NULL));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t gearmand_cycle_test(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers and servers->validate());
+
+  test_skip(true, has_gearmand());
+  test_skip(true, server_startup(*servers, "gearmand", get_free_port(), NULL));
+  servers->clear();
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t skip_shim(bool a, bool b)
+{
+  test_skip(a, b);
+  return TEST_SUCCESS;
+}
+
+static test_return_t test_skip_true_TEST(void*)
+{
+  ASSERT_EQ(true, true);
+  ASSERT_EQ(false, false);
+  ASSERT_EQ(TEST_SUCCESS, skip_shim(true, true));
+  ASSERT_EQ(TEST_SUCCESS, skip_shim(false, false));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t test_skip_false_TEST(void*)
+{
+  ASSERT_EQ(TEST_SKIPPED, skip_shim(true, false));
+  ASSERT_EQ(TEST_SKIPPED, skip_shim(false, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_startup_fail_TEST(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+
+  fatal::disable();
+  ASSERT_EQ(servers->start_server(testing_service, LIBTEST_FAIL_PORT, NULL), true);
+  fatal::enable();
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_startup_TEST(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+
+  ASSERT_EQ(servers->start_server(testing_service, get_free_port(), NULL), true);
+
+  test_true(servers->last());
+  pid_t last_pid= servers->last()->pid();
+
+  ASSERT_EQ(servers->last()->pid(), last_pid);
+  test_true(last_pid > 1);
+  ASSERT_EQ(kill(last_pid, 0), 0);
+
+  test_true(servers->shutdown());
+#if 0
+  ASSERT_EQ(servers->last()->pid(), -1);
+  ASSERT_EQ(kill(last_pid, 0), -1);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t socket_server_startup_TEST(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+
+  test_true(servers->start_socket_server(testing_service, get_free_port(), NULL));
+
+  return TEST_SUCCESS;
+}
+
+#if 0
+static test_return_t memcached_sasl_test(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+
+  test_skip(false, bool(getenv("LOG_COMPILER")));
+
+  if (MEMCACHED_SASL_BINARY)
+  {
+    if (HAVE_LIBMEMCACHED)
+    {
+      test_true(has_memcached_sasl());
+      test_true(server_startup(*servers, "memcached-sasl", get_free_port(), NULL));
+
+      return TEST_SUCCESS;
+    }
+  }
+
+  return TEST_SKIPPED;
+}
+#endif
+
+static test_return_t application_true_BINARY(void *)
+{
+  test_skip(0, access("/usr/bin/true", X_OK ));
+  Application true_app("/usr/bin/true");
+
+  ASSERT_EQ(Application::SUCCESS, true_app.run());
+  ASSERT_EQ(Application::SUCCESS, true_app.join());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_gdb_true_BINARY2(void *)
+{
+  test_skip(0, access("/usr/bin/gdb", X_OK ));
+  test_skip(0, access("/usr/bin/true", X_OK ));
+
+  Application true_app("/usr/bin/true");
+  true_app.use_gdb(true);
+
+  ASSERT_EQ(Application::SUCCESS, true_app.run());
+  ASSERT_EQ(Application::SUCCESS, true_app.join());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_gdb_true_BINARY(void *)
+{
+  test_skip(0, access("/usr/bin/gdb", X_OK ));
+  test_skip(0, access("/usr/bin/true", X_OK ));
+
+  Application true_app("/usr/bin/true");
+  true_app.use_gdb(true);
+
+  const char *args[]= { "--fubar", 0 };
+  ASSERT_EQ(Application::SUCCESS, true_app.run(args));
+  ASSERT_EQ(Application::SUCCESS, true_app.join());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_true_fubar_BINARY(void *)
+{
+  test_skip(0, access("/usr/bin/true", X_OK ));
+  Application true_app("/usr/bin/true");
+
+  const char *args[]= { "--fubar", 0 };
+  ASSERT_EQ(Application::SUCCESS, true_app.run(args));
+  ASSERT_EQ(Application::SUCCESS, true_app.join());
+  test_zero(true_app.stdout_result().size());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_doesnotexist_BINARY(void *)
+{
+
+  test_skip_valgrind();
+  Application true_app("doesnotexist");
+  true_app.will_fail();
+
+  const char *args[]= { "--fubar", 0 };
+#if defined(__APPLE__) && __APPLE__
+  ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));
+#elif defined(__FreeBSD__) && __FreeBSD__
+  ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));
+#else
+  ASSERT_EQ(Application::SUCCESS, true_app.run(args));
+  ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.join());
+#endif
+
+  test_zero(true_app.stdout_result().size());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t GET_TEST(void *)
+{
+  libtest::http::GET get("http://foo.example.com/");
+
+  ASSERT_EQ(false, get.execute());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t POST_TEST(void *)
+{
+  libtest::vchar_t body;
+  libtest::http::POST post("http://foo.example.com/", body);
+
+  ASSERT_EQ(false, post.execute());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t TRACE_TEST(void *)
+{
+  libtest::vchar_t body;
+  libtest::http::TRACE trace("http://foo.example.com/", body);
+
+  ASSERT_EQ(false, trace.execute());
+
+  return TEST_SUCCESS;
+}
+
+
+static test_return_t vchar_t_TEST(void *)
+{
+  libtest::vchar_t response;
+  libtest::make_vector(response, test_literal_param("fubar\n"));
+  ASSERT_EQ(response, response);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t vchar_t_make_append_TEST(void *)
+{
+  libtest::vchar_t hostname;
+  libtest::vchar::make(hostname, 23);
+  libtest::vchar::append(hostname, ".com");
+  ASSERT_EQ(28, hostname.size());
+  ASSERT_EQ(0, hostname[27]);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t vchar_t_compare_neg_TEST(void *)
+{
+  libtest::vchar_t response;
+  libtest::vchar_t response2;
+  libtest::make_vector(response, test_literal_param("fubar\n"));
+  libtest::make_vector(response2, test_literal_param(__func__));
+  test_true(response != response2);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_echo_fubar_BINARY(void *)
+{
+  if (0)
+  {
+    test_skip(0, access("/bin/echo", X_OK ));
+    Application true_app("/bin/echo");
+
+    const char *args[]= { "fubar", 0 };
+    ASSERT_EQ(Application::SUCCESS, true_app.run(args));
+
+    while (true_app.slurp() == false) {} ;
+
+    libtest::vchar_t response;
+    make_vector(response, test_literal_param("fubar\n"));
+    ASSERT_EQ(response, true_app.stdout_result());
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t application_echo_fubar_BINARY2(void *)
+{
+  if (0)
+  {
+    test_skip(0, access("/bin/echo", X_OK ));
+    Application true_app("/bin/echo");
+
+    true_app.add_option("fubar");
+
+    ASSERT_EQ(Application::SUCCESS, true_app.run());
+    ASSERT_EQ(Application::SUCCESS, true_app.join());
+
+    libtest::vchar_t response;
+    make_vector(response, test_literal_param("fubar\n"));
+    ASSERT_EQ(response, true_app.stdout_result());
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t echo_fubar_BINARY(void *)
+{
+  const char *args[]= { "fubar", 0 };
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("/bin/echo", args));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t core_count_BINARY(void *)
+{
+  const char *args[]= { 0 };
+
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("libtest/core-count", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_BINARY(void *)
+{
+  const char *args[]= { "--quiet", 0 };
+
+  ASSERT_EQ(EXIT_FAILURE, exec_cmdline("libtest/wait", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_help_BINARY(void *)
+{
+  const char *args[]= { "--quiet", "--help", 0 };
+
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("libtest/wait", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_version_BINARY(void *)
+{
+  const char *args[]= { "--quiet", "--version", 0 };
+
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("libtest/wait", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_services_BINARY(void *)
+{
+  test_skip(0, access("/etc/services", R_OK ));
+
+  const char *args[]= { "--quiet", "/etc/services", 0 };
+
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("libtest/wait", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_services_BINARY2(void *)
+{
+  test_skip(0, access("/etc/services", R_OK ));
+
+  const char *args[]= { "/etc/services", 0 };
+
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("libtest/wait", args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t wait_services_appliction_TEST(void *)
+{
+  test_skip(0, access("/etc/services", R_OK ));
+  test_skip(0, access("/usr/bin/gdb", X_OK ));
+  test_skip(0, access("libtest/wait", X_OK ));
+
+  libtest::Application wait_app("libtest/wait", true);
+  wait_app.use_gdb(true);
+
+  const char *args[]= { "/etc/services", 0 };
+  ASSERT_EQ(Application::SUCCESS, wait_app.run(args));
+  ASSERT_EQ(Application::SUCCESS, wait_app.join());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t gdb_wait_services_appliction_TEST(void *)
+{
+  test_skip(true, false);
+#if defined(__APPLE__) && __APPLE__
+  test_skip(0, __APPLE__);
+#endif
+
+  test_skip(0, access("/etc/services", R_OK ));
+  test_skip(0, access("/usr/bin/gdb", X_OK ));
+  test_skip(0, access("libtest/wait", X_OK ));
+
+  libtest::Application wait_app("libtest/wait", true);
+  wait_app.use_gdb(true);
+
+  const char *args[]= { "/etc/services", 0 };
+  ASSERT_EQ(Application::SUCCESS, wait_app.run(args));
+  ASSERT_EQ(Application::SUCCESS, wait_app.join());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t gdb_abort_services_appliction_TEST(void *)
+{
+  test_skip(0, access("/usr/bin/gdb", X_OK ));
+  test_skip(0, access("libtest/abort", X_OK ));
+  test_skip(true, false);
+
+#if defined(__APPLE__) && __APPLE__
+  test_skip(0, __APPLE__);
+#endif
+
+  libtest::Application abort_app("libtest/abort", true);
+  abort_app.use_gdb(true);
+
+  ASSERT_EQ(Application::SUCCESS, abort_app.run());
+  ASSERT_EQ(Application::SUCCESS, abort_app.join());
+
+  std::string gdb_filename= abort_app.gdb_filename();
+  test_skip(0, access(gdb_filename.c_str(), R_OK ));
+  const char *args[]= { "SIGABRT", gdb_filename.c_str(), 0 };
+  ASSERT_EQ(EXIT_SUCCESS, exec_cmdline("grep", args));
+
+  // Sanity test
+  args[0]= "THIS_WILL_NOT_BE_FOUND";
+  ASSERT_EQ(EXIT_FAILURE, exec_cmdline("grep", args));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t get_free_port_TEST(void *)
+{
+  in_port_t ret_port;
+  test_true((ret_port= get_free_port()));
+  test_true(get_free_port() != default_port());
+  test_true(get_free_port() != get_free_port());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fatal_TEST(void *)
+{
+  ASSERT_EQ(fatal_calls++, fatal::disabled_counter());
+  throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "Testing va_args based fatal(): %d", 10); 
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t number_of_cpus_TEST(void *)
+{
+  test_true(number_of_cpus() >= 1);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_dns_TEST(void *)
+{
+  test_warn(libtest::check_dns(), "Broken DNS server/no DNS server found");
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t Timer_TEST(void *)
+{
+  int64_t minutes= random() % 50;
+  minutes++;
+
+  Timer check;
+
+  check.reset();
+  check.offset(minutes, 2, 200);
+
+  ASSERT_EQ(check.minutes(), minutes);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t lookup_true_TEST(void *)
+{
+  test_warn(libtest::lookup("exist.gearman.info"), "dns is not currently working");
+  return TEST_SUCCESS;
+}
+
+static test_return_t lookup_false_TEST(void *)
+{
+  SKIP_IF_(libtest::lookup("does_not_exist.gearman.info"),
+           "Broken DNS server detected");
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t create_tmpfile_TEST(void *)
+{
+  test_skip(0, access("/usr/bin/touch", X_OK ));
+  std::string tmp= create_tmpfile(__func__);
+  ASSERT_EQ(-1, access(tmp.c_str(), R_OK));
+  ASSERT_EQ(-1, access(tmp.c_str(), F_OK));
+
+  Application touch_app("/usr/bin/touch");
+  const char *args[]= { tmp.c_str(), 0 };
+  ASSERT_EQ(Application::SUCCESS, touch_app.run(args));
+  ASSERT_EQ(Application::SUCCESS, touch_app.join());
+
+  ASSERT_EQ(0, access(tmp.c_str(), R_OK));
+  ASSERT_EQ(0, unlink(tmp.c_str()));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fatal_message_TEST(void *)
+{
+  ASSERT_EQ(fatal_calls++, fatal::disabled_counter());
+  FATAL("Fatal test");
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t default_port_TEST(void *)
+{
+  in_port_t ret_port= default_port();
+  ASSERT_EQ(ret_port, libtest::default_port());
+  ASSERT_EQ(ret_port, libtest::default_port());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_for_VALGRIND(void *)
+{
+  test_skip_valgrind();
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_for_gearman(void *)
+{
+  test_skip(true, HAVE_LIBGEARMAN);
+  test_skip(true, has_gearmand());
+#if defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY
+  if (GEARMAND_BINARY)
+  {
+    if (strcmp(GEARMAND_BINARY, "./gearmand/gearmand"))
+    {
+      test_zero(access(GEARMAND_BINARY, X_OK ));
+    }
+  }
+  else
+  {
+    return TEST_SKIPPED;
+  }
+#endif
+
+  testing_service= "gearmand";
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_for_drizzle(void *)
+{
+  test_skip(true, has_drizzled());
+
+  testing_service= "drizzled";
+
+  return TEST_SUCCESS;
+}
+
+
+test_st drizzled_tests[] ={
+  {"drizzled startup-shutdown", 0, drizzled_cycle_test },
+  {0, 0, 0}
+};
+
+test_st gearmand_tests[] ={
+#if 0
+  {"pause", 0, pause_test },
+#endif
+  {"gearmand startup-shutdown", 0, gearmand_cycle_test },
+  {"_compare(gearman_return_t)", 0, _compare_gearman_return_t_test },
+  {"server_startup(fail)", 0, server_startup_fail_TEST },
+  {0, 0, 0}
+};
+
+static test_return_t clear_servers(void* object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+  servers->clear();
+
+  testing_service.clear();
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_for_memcached(void* object)
+{
+  test_skip(true, has_memcached());
+
+  server_startup_st *servers= (server_startup_st*)object;
+  test_true(servers);
+  servers->clear();
+
+  testing_service= "memcached";
+
+  return TEST_SUCCESS;
+}
+
+test_st memcached_TESTS[] ={
+  {"memcached startup-shutdown", 0, server_startup_TEST },
+  {"memcached(socket file) startup-shutdown", 0, socket_server_startup_TEST },
+  {"_compare(memcached_return_t)", 0, _compare_memcached_return_t_test },
+  {"server_startup(fail)", 0, server_startup_fail_TEST },
+  {0, 0, 0}
+};
+
+test_st test_skip_TESTS[] ={
+  {"true, true", 0, test_skip_true_TEST },
+  {"true, false", 0, test_skip_false_TEST },
+  {0, 0, 0}
+};
+
+test_st environment_tests[] ={
+  {"getenv()", 0, getenv_TEST },
+  {"LIBTOOL_COMMAND", 0, LIBTOOL_COMMAND_test },
+  {"VALGRIND_COMMAND", 0, VALGRIND_COMMAND_test },
+  {"HELGRIND_COMMAND", 0, HELGRIND_COMMAND_test },
+  {"GDB_COMMAND", 0, GDB_COMMAND_test },
+  {0, 0, 0}
+};
+
+test_st tests_log[] ={
+  {"TEST_SUCCESS", false, test_success_test },
+  {"TEST_FAILURE", false, test_failure_test },
+  {"TEST_SUCCESS == 0", false, test_success_equals_one_test },
+  {"SUCCESS", false, test_throw_success_TEST },
+  {"libtest::__skipped", false, test_throw_skip_TEST },
+  {"SKIP_IF", false, test_throw_skip_macro_TEST },
+  {"SKIP_UNLESS", false, test_throw_skip_unless_macro_TEST },
+  {"FAIL", false, test_throw_fail_TEST },
+  {"ASSERT_FALSE_", false, ASSERT_FALSE__TEST },
+  {"ASSERT_FALSE", false, ASSERT_FALSE_TEST },
+  {"ASSERT_NEQ", false, ASSERT_NEQ_TEST },
+  {"ASSERT_NEQ FAIL", false, ASSERT_NEQ_FAIL_TEST },
+  {0, 0, 0}
+};
+
+test_st local_log[] ={
+  {"test_is_local()", 0, local_test },
+  {"test_is_local(NOT)", 0, local_not_test },
+  {0, 0, 0}
+};
+
+test_st directories_tests[] ={
+  {"var exists", 0, var_exists_test },
+  {"var/tmp exists", 0, var_tmp_exists_test },
+  {"var/run exists", 0, var_run_exists_test },
+  {"var/log exists", 0, var_log_exists_test },
+  {"var/drizzle exists", 0, var_drizzle_exists_test },
+  {"var/tmp", 0, var_tmp_test },
+  {"var/run", 0, var_run_test },
+  {"var/log", 0, var_log_test },
+  {"var/drizzle", 0, var_drizzle_test },
+  {"var/tmp rm", 0, var_tmp_rm_test },
+  {"var/run rm", 0, var_run_rm_test },
+  {"var/log rm", 0, var_log_rm_test },
+  {"var/drizzle rm", 0, var_drizzle_rm_test },
+  {0, 0, 0}
+};
+
+test_st comparison_tests[] ={
+  {"_compare(test_return_t)", 0, _compare_test_return_t_test },
+  {0, 0, 0}
+};
+
+test_st cmdline_tests[] ={
+  {"echo fubar", 0, echo_fubar_BINARY },
+  {"core-count", 0, core_count_BINARY },
+  {"wait --quiet", 0, wait_BINARY },
+  {"wait --quiet --help", 0, wait_help_BINARY },
+  {"wait --quiet --version", 0, wait_version_BINARY },
+  {"wait --quiet /etc/services", 0, wait_services_BINARY },
+  {"wait /etc/services", 0, wait_services_BINARY2 },
+  {"wait /etc/services", 0, wait_services_appliction_TEST },
+  {"gdb wait /etc/services", 0, gdb_wait_services_appliction_TEST },
+  {"gdb abort", 0, gdb_abort_services_appliction_TEST },
+  {0, 0, 0}
+};
+
+test_st get_free_port_TESTS[] ={
+  {"get_free_port()", 0, get_free_port_TEST },
+  {"default_port()", 0, default_port_TEST },
+  {0, 0, 0}
+};
+
+test_st fatal_message_TESTS[] ={
+  {"libtest::fatal", 0, fatal_TEST },
+  {"fatal_message()", 0, fatal_message_TEST },
+  {0, 0, 0}
+};
+
+test_st number_of_cpus_TESTS[] ={
+  {"libtest::number_of_cpus()", 0, number_of_cpus_TEST },
+  {0, 0, 0}
+};
+
+test_st create_tmpfile_TESTS[] ={
+  {"libtest::create_tmpfile()", 0, create_tmpfile_TEST },
+  {0, 0, 0}
+};
+
+test_st timer_TESTS[] ={
+  {"libtest::Timer", 0, Timer_TEST },
+  {0, 0, 0}
+};
+
+test_st dns_TESTS[] ={
+  {"libtest::lookup(true)", 0, lookup_true_TEST },
+  {"libtest::lookup(false)", 0, lookup_false_TEST },
+  {"libtest::check_dns()", 0, check_dns_TEST },
+  {0, 0, 0}
+};
+
+test_st application_tests[] ={
+  {"vchar_t", 0, vchar_t_TEST },
+  {"vchar_t make() append()", 0, vchar_t_make_append_TEST },
+  {"vchar_t compare()", 0, vchar_t_compare_neg_TEST },
+  {"true", 0, application_true_BINARY },
+  {"gbd true --fubar", 0, application_gdb_true_BINARY },
+  {"gbd true", 0, application_gdb_true_BINARY2 },
+  {"true --fubar", 0, application_true_fubar_BINARY },
+  {"doesnotexist --fubar", 0, application_doesnotexist_BINARY },
+  {"echo fubar", 0, application_echo_fubar_BINARY },
+  {"echo fubar (as option)", 0, application_echo_fubar_BINARY2 },
+  {0, 0, 0}
+};
+
+static test_return_t check_for_curl(void *)
+{
+  test_skip_valgrind();
+  test_skip(true, HAVE_LIBCURL);
+  return TEST_SUCCESS;
+}
+
+static test_return_t disable_fatal_exception(void *)
+{
+  fatal_calls= 0;
+  fatal::disable();
+  return TEST_SUCCESS;
+}
+
+static test_return_t enable_fatal_exception(void *)
+{
+  fatal::enable();
+  return TEST_SUCCESS;
+}
+
+test_st http_tests[] ={
+  {"GET", 0, GET_TEST },
+  {"POST", 0, POST_TEST },
+  {"TRACE", 0, TRACE_TEST },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"environment", 0, 0, environment_tests},
+  {"return values", 0, 0, tests_log},
+  {"test_skip()", 0, 0, test_skip_TESTS },
+  {"local", 0, 0, local_log},
+  {"directories", 0, 0, directories_tests},
+  {"comparison", 0, 0, comparison_tests},
+  {"gearmand", check_for_gearman, clear_servers, gearmand_tests},
+  {"memcached", check_for_memcached, clear_servers, memcached_TESTS },
+  {"drizzled", check_for_drizzle, clear_servers, drizzled_tests},
+  {"cmdline", 0, 0, cmdline_tests},
+  {"application", 0, 0, application_tests},
+  {"http", check_for_curl, 0, http_tests},
+  {"http", check_for_curl, 0, http_tests},
+  {"get_free_port()", 0, 0, get_free_port_TESTS },
+  {"fatal", disable_fatal_exception, enable_fatal_exception, fatal_message_TESTS },
+  {"number_of_cpus()", 0, 0, number_of_cpus_TESTS },
+  {"create_tmpfile()", 0, 0, create_tmpfile_TESTS },
+  {"dns", check_for_VALGRIND, 0, dns_TESTS },
+  {"libtest::Timer", 0, 0, timer_TESTS },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t&)
+{
+  return &servers;
+}
+
+void get_world(libtest::Framework *world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
@@ -0,0 +1,55 @@
+/*  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
+
+static inline bool valgrind_is_caller(void)
+{
+  if (getenv("LOG_COMPILER")  && strstr(getenv("LOG_COMPILER"), "valgrind"))
+  {
+    if (strstr(getenv("LOG_COMPILER"), "--tool") == NULL)
+    {
+      return true;
+    }
+
+    if (strstr(getenv("LOG_COMPILER"), "--tool=memcheck"))
+    {
+      return true;
+    }
+  }
+
+  return false;
+}
@@ -0,0 +1,169 @@
+/*  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>
+
+/* 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;
+}
+
+namespace libtest {
+
+int random_alpha_num(void)
+{
+  return ALPHANUMERICS[get_alpha_num()];
+}
+
+static std::string printer(const char *str, size_t length)
+{
+  std::ostringstream buf;
+  for (size_t x= 0; x < length; x++)
+  {
+    if (isprint(str[x]))
+    {
+      buf << str[x];
+    }
+    else
+    {
+      buf << "(" << int(str[x]) << ")";
+    }
+  }
+
+  return buf.str();
+}
+
+namespace vchar {
+
+int compare(libtest::vchar_t& arg, const char *str, size_t length)
+{
+  if (arg.size() == length and (memcmp(&arg[0], str, length) == 0))
+  {
+    return 0;
+  }
+  else if (arg.size() > length)
+  {
+    return 1;
+  }
+
+  return -1;
+}
+
+void make(libtest::vchar_t& arg)
+{
+  size_t length= rand() % 1024;
+  make(arg, length);
+}
+
+void make(libtest::vchar_t& arg, size_t length)
+{
+  arg.reserve(length);
+  for (uint32_t x= 0; x < length; ++x)
+  {
+    arg.push_back(ALPHANUMERICS[get_alpha_num()]);
+  }
+}
+
+void chomp(libtest::vchar_t& arg)
+{
+  while(arg.size())
+  {
+    if (arg.back() == 0)
+    {
+      arg.pop_back();
+    }
+    else
+    {
+      break;
+    }
+  }
+}
+
+void append(libtest::vchar_ptr_t& arg, const char* ptr)
+{
+  if (ptr)
+  {
+    char* new_ptr= strdup(ptr);
+    if (new_ptr == NULL)
+    {
+      FATAL("UNABLE to allocate %s(%p)", ptr, ptr);
+    }
+
+    arg.push_back(new_ptr);
+  }
+}
+
+void append(libtest::vchar_t& arg, const char* ptr)
+{
+  if (ptr)
+  {
+    size_t length= strlen(ptr);
+    ASSERT_TRUE(length);
+    arg.reserve(length);
+    do
+    {
+      arg.push_back(*ptr);
+      ++ptr;
+    } while (*ptr);
+
+    arg.push_back(0);
+  }
+}
+
+} // namespace vchar
+
+void make_vector(libtest::vchar_t& arg, const char *str, size_t length)
+{
+  arg.resize(length);
+  memcpy(&arg[0], str, length);
+}
+
+std::ostream& operator<<(std::ostream& output, const libtest::vchar_t& arg)
+{
+  std::string tmp= libtest::printer(&arg[0], arg.size());
+  output << tmp <<  "[" << arg.size() << "]";
+
+  return output;
+}
+
+} // namespace libtest
@@ -0,0 +1,71 @@
+/*  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 <cstring>
+#include <iostream>
+#include <ostream>
+#include <sstream>
+#include <vector>
+
+namespace libtest {
+
+int random_alpha_num(void);
+
+typedef std::vector<char*> vchar_ptr_t;
+typedef std::vector<char> vchar_t;
+
+void make_vector(libtest::vchar_t& arg, const char *str, size_t length);
+
+namespace vchar {
+
+int compare(libtest::vchar_t& arg, const char *str, size_t length);
+void chomp(libtest::vchar_t& arg);
+void make(libtest::vchar_t& arg);
+void make(libtest::vchar_t& arg, size_t length);
+void append(libtest::vchar_ptr_t& arg, const char*);
+void append(libtest::vchar_t& arg, const char*);
+
+} // namespace vchar
+
+#define vchar_param(__arg) (&__arg[0]), (__arg.size())
+#define vchar_printf(__arg) int(__arg.size()), (&__arg[0])
+
+std::ostream& operator<<(std::ostream& output, const libtest::vchar_t& arg);
+
+} // namespace libtest
+
@@ -0,0 +1,42 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Data Differential YATL (i.e. libtest) 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.
+ *
+ */
+
+
+#pragma once
+
+#define LIBTEST_VERSION 1.0
+#define LIBTEST_VERSION_STRING "1.0"
@@ -0,0 +1,42 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Data Differential YATL (i.e. libtest) 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.
+ *
+ */
+
+
+#pragma once
+
+#define LIBTEST_VERSION @LIBTEST_VERSION@
+#define LIBTEST_VERSION_STRING "@LIBTEST_VERSION@"
@@ -0,0 +1,77 @@
+/*  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(BUILDING_LIBTEST)
+# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
+#  define LIBTEST_API __attribute__ ((visibility("default")))
+#  define LIBTEST_LOCAL  __attribute__ ((visibility("default")))
+# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#  define LIBTEST_API __global
+#  define LIBTEST_LOCAL __global
+# elif defined(_MSC_VER)
+#  define LIBTEST_API extern __declspec(dllexport) 
+#  define LIBTEST_LOCAL extern __declspec(dllexport)
+# else
+#  define LIBTEST_API
+#  define LIBTEST_LOCAL
+# endif
+#else
+# if defined(BUILDING_LIBTEST)
+#  if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
+#   define LIBTEST_API __attribute__ ((visibility("default")))
+#   define LIBTEST_LOCAL  __attribute__ ((visibility("hidden")))
+#  elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#   define LIBTEST_API __global
+#   define LIBTEST_LOCAL __hidden
+#  elif defined(_MSC_VER)
+#   define LIBTEST_API extern __declspec(dllexport) 
+#   define LIBTEST_LOCAL
+#  else
+#   define LIBTEST_API
+#   define LIBTEST_LOCAL
+#  endif /* defined(HAVE_VISIBILITY) */
+# else  /* defined(BUILDING_LIBTEST) */
+#  if defined(_MSC_VER)
+#   define LIBTEST_API extern __declspec(dllimport) 
+#   define LIBTEST_LOCAL
+#  else
+#   define LIBTEST_API
+#   define LIBTEST_LOCAL
+#  endif /* defined(_MSC_VER) */
+# endif /* defined(BUILDING_LIBTEST) */
+#endif /* defined(BUILDING_LIBTESTINTERNAL) */
@@ -0,0 +1,194 @@
+/*  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 <cstdlib>
+#include <fcntl.h>
+#include <getopt.h>
+#include <iostream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <libtest/wait.h>
+
+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 << "Current options. A '=' means the option takes a value." << 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;
+}
+
+static 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);
+    }
+  }
+}
+
+enum {
+  OPT_HELP,
+  OPT_QUIET,
+  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},
+    { "quiet", no_argument, NULL, OPT_QUIET},
+    {0, 0, 0, 0},
+  };
+
+  bool opt_version= false;
+  bool opt_help= false;
+  bool opt_quiet= 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 OPT_QUIET:
+      opt_quiet= 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_quiet)
+  {
+    close_stdio();
+  }
+
+  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[])
+{
+  if (argc == 1)
+  {
+    return EXIT_FAILURE;
+  }
+
+  options_parse(argc, argv);
+
+  int ret= EXIT_FAILURE;
+  while (optind < argc)
+  {
+    libtest::Wait wait(argv[optind++]);
+
+    if (wait.successful() == false)
+    {
+      return EXIT_FAILURE;
+    }
+
+    ret= EXIT_SUCCESS;
+  }
+
+  return ret;
+}
@@ -0,0 +1,114 @@
+/*  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 <unistd.h>
+#include <string>
+#include <signal.h>
+
+#include <libtest/dream.h>
+
+namespace libtest {
+
+class Wait 
+{
+public:
+
+  Wait(const std::string &filename, uint32_t timeout= 6) :
+    _successful(false)
+  {
+    uint32_t waited;
+    uint32_t this_wait;
+    uint32_t retry;
+
+    if (filename.empty())
+    {
+      _successful= false;
+      return;
+    }
+
+    for (waited= 0, retry= 1; ; retry++, waited+= this_wait)
+    {
+      if (access(filename.c_str(), R_OK) == 0)
+      {
+        _successful= true;
+        break;
+      }
+      else if (waited >= timeout)
+      {
+        break;
+      }
+
+      this_wait= retry * retry / 3 + 1;
+      libtest::dream(this_wait, 0);
+    }
+  }
+
+  Wait(const pid_t &_pid_arg, uint32_t timeout= 6) :
+    _successful(false)
+  {
+    uint32_t waited;
+    uint32_t this_wait;
+    uint32_t retry;
+
+    for (waited= 0, retry= 1; ; retry++, waited+= this_wait)
+    {
+      if (kill(_pid_arg, 0) == 0)
+      {
+        _successful= true;
+        break;
+      }
+      else if (waited >= timeout)
+      {
+        break;
+      }
+
+      this_wait= retry * retry / 3 + 1;
+      libtest::dream(this_wait, 0);
+    }
+  }
+
+  bool successful() const
+  {
+    return _successful;
+  }
+
+private:
+  bool _successful;
+};
+
+} // namespace libtest
@@ -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
+
+#ifndef YATL_FULL
+# define YATL_FULL 1
+#endif
+
+#include <libtest/test.hpp>
@@ -0,0 +1,13 @@
+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.
+
+AC_SUBST([LIBTEST_VERSION],[1.0])
+AC_CONFIG_FILES([libtest/version.h])
+
+m4_include([libtest/m4/mysql.m4])
+
+YATL_MYSQL
+
+AC_CONFIG_FILES([libtest/yatlcon.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/
+ *  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 "@AUTOHEADER_FILE@"
@@ -1,103 +0,0 @@
-# ===========================================================================
-#        http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AC_CXX_COMPILE_STDCXX_0X
-#
-# DESCRIPTION
-#
-#   Check for baseline language coverage in the compiler for the C++0x
-#   standard.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#
-#   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.
-
-AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [
-  AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
-  ac_cv_cxx_compile_cxx0x_native,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;],,
-  ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
-  AC_LANG_RESTORE
-  ])
-
-  AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
-  ac_cv_cxx_compile_cxx0x_cxx,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  ac_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -std=c++0x"
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;],,
-  ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
-  CXXFLAGS="$ac_save_CXXFLAGS"
-  AC_LANG_RESTORE
-  ])
-
-  AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
-  ac_cv_cxx_compile_cxx0x_gxx,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  ac_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -std=gnu++0x"
-  AC_TRY_COMPILE([
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = c;],,
-  ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
-  CXXFLAGS="$ac_save_CXXFLAGS"
-  AC_LANG_RESTORE
-  ])
-
-  if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
-     test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
-     test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
-    AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
-  fi
-])
@@ -1,83 +0,0 @@
-# ===========================================================================
-#        http://autoconf-archive.cryp.to/ac_cxx_header_stdcxx_98.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AC_CXX_HEADER_STDCXX_98
-#
-# DESCRIPTION
-#
-#   Check for complete library coverage of the C++1998/2003 standard.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
-#
-#   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.
-
-AC_DEFUN([AC_CXX_HEADER_STDCXX_98], [
-  AC_CACHE_CHECK(for ISO C++ 98 include files,
-  ac_cv_cxx_stdcxx_98,
-  [AC_LANG_SAVE
-  AC_LANG_CPLUSPLUS
-  AC_TRY_COMPILE([
-    #include <cassert>
-    #include <cctype>
-    #include <cerrno>
-    #include <cfloat>
-    #include <ciso646>
-    #include <climits>
-    #include <clocale>
-    #include <cmath>
-    #include <csetjmp>
-    #include <csignal>
-    #include <cstdarg>
-    #include <cstddef>
-    #include <cstdio>
-    #include <cstdlib>
-    #include <cstring>
-    #include <ctime>
-
-    #include <algorithm>
-    #include <bitset>
-    #include <complex>
-    #include <deque>
-    #include <exception>
-    #include <fstream>
-    #include <functional>
-    #include <iomanip>
-    #include <ios>
-    #include <iosfwd>
-    #include <iostream>
-    #include <istream>
-    #include <iterator>
-    #include <limits>
-    #include <list>
-    #include <locale>
-    #include <map>
-    #include <memory>
-    #include <new>
-    #include <numeric>
-    #include <ostream>
-    #include <queue>
-    #include <set>
-    #include <sstream>
-    #include <stack>
-    #include <stdexcept>
-    #include <streambuf>
-    #include <string>
-    #include <typeinfo>
-    #include <utility>
-    #include <valarray>
-    #include <vector>
-  ],,
-  ac_cv_cxx_stdcxx_98=yes, ac_cv_cxx_stdcxx_98=no)
-  AC_LANG_RESTORE
-  ])
-  if test "$ac_cv_cxx_stdcxx_98" = yes; then
-    AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
-  fi
-])
@@ -1,271 +0,0 @@
-# ===========================================================================
-#              http://autoconf-archive.cryp.to/acx_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-#   This macro figures out how to build C programs using POSIX threads. It
-#   sets the PTHREAD_LIBS output variable to the threads library and linker
-#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-#   flags that are needed. (The user can also force certain compiler
-#   flags/libs to be tested by setting these environment variables.)
-#
-#   Also sets PTHREAD_CC to any special C compiler that is needed for
-#   multi-threaded programs (defaults to the value of CC otherwise). (This
-#   is necessary on AIX to use the special cc_r compiler alias.)
-#
-#   NOTE: You are assumed to not only compile your program with these flags,
-#   but also link it with them as well. e.g. you should link with
-#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-#   If you are only building threads programs, you may wish to use these
-#   variables in your default LIBS, CFLAGS, and CC:
-#
-#          LIBS="$PTHREAD_LIBS $LIBS"
-#          CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-#          CC="$PTHREAD_CC"
-#
-#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
-#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-#   is not found. If ACTION-IF-FOUND is not specified, the default action
-#   will define HAVE_PTHREAD.
-#
-#   Please let the authors know if this macro fails on any platform, or if
-#   you have any other suggestions or comments. This macro was based on work
-#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
-#   grateful for the helpful feedback of numerous users.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-#
-#   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 <http://www.gnu.org/licenses/>.
-#
-#   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.
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_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"
-        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test x"$acx_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.
-
-acx_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_cpu}-${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:
-
-        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
-        ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
-        case $flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $flag])
-                PTHREAD_CFLAGS="$flag"
-                ;;
-
-		pthread-config)
-		AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
-		if test x"$acx_pthread_config" = xno; then continue; fi
-		PTHREAD_CFLAGS="`pthread-config --cflags`"
-		PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-		;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$flag])
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
-
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # 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.
-        AC_TRY_LINK([#include <pthread.h>],
-                    [pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
-                    [acx_pthread_ok=yes])
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_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.
-	AC_MSG_CHECKING([for joinable pthread attribute])
-	attr_name=unknown
-	for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-	    AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
-                        [attr_name=$attr; break])
-	done
-        AC_MSG_RESULT($attr_name)
-        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
-                               [Define to necessary symbol if this constant
-                                uses a non-standard name on your system.])
-        fi
-
-        AC_MSG_CHECKING([if more special flags are required for pthreads])
-        flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        AC_MSG_RESULT(${flag})
-        if test "x$flag" != xno; then
-            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        # More AIX lossage: must compile with xlc_r or cc_r
-	if test x"$GCC" != xyes; then
-          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
-        else
-          PTHREAD_CC=$CC
-	fi
-else
-        PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-        :
-else
-        acx_pthread_ok=no
-        $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
@@ -0,0 +1,29 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_add_am_macro.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_ADD_AM_MACRO([RULE])
+#
+# DESCRIPTION
+#
+#   Adds the specified rule to $AMINCLUDE. This macro will only work
+#   properly with implementations of Make which allow include statements.
+#   See also AX_ADD_AM_MACRO_STATIC.
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
+#
+#   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 9
+
+AC_DEFUN([AX_ADD_AM_MACRO],[
+  AC_REQUIRE([AX_AM_MACROS])
+  AX_APPEND_TO_FILE([$AMINCLUDE],[$1])
+])
@@ -0,0 +1,55 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_am_jobserver.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_AM_JOBSERVER([default_value])
+#
+# DESCRIPTION
+#
+#   Enables the use of make's jobserver for the purpose of parallel building
+#   by passing the -j option to make.
+#
+#   The option --enable-jobserver is added to configure which can accept a
+#   yes, no, or an integer. The integer is the number of separate jobs to
+#   allow. If 'yes' is given, then the is assumed to be one more than the
+#   number of CPUs (determined through AX_COUNT_CPUS). If the value of no is
+#   given, then the jobserver is disabled. The default value is given by the
+#   first argument of the macro, or 'yes' if the argument is omitted.
+#
+#   This macro makes use of AX_AM_MACROS, so you must add the following line
+#
+#     @INC_AMINCLUDE@
+#
+#   to your Makefile.am files.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
+#
+#   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 7
+
+AC_DEFUN([AX_AM_JOBSERVER], [
+    AC_REQUIRE([AX_COUNT_CPUS])
+    AC_REQUIRE([AX_AM_MACROS])
+    AC_ARG_ENABLE( jobserver,
+    [  --enable-jobserver@<:@=no/yes/@%:@@:>@ default=m4_ifval([$1],[$1],[yes])
+                        Enable up to @%:@ make jobs
+                        yes: enable one more than CPU count
+    ],, [enable_jobserver=m4_ifval([$1],[$1],[yes])])
+    if test "x$enable_jobserver" = "xyes"; then
+        enable_jobserver=$CPU_COUNT
+        ((enable_jobserver++))
+    fi
+    m4_pattern_allow(AM_MAKEFLAGS)
+    if test "x$enable_jobserver" != "xno"; then
+        AC_MSG_NOTICE([added jobserver support to make for $enable_jobserver jobs])
+        AX_ADD_AM_MACRO( AM_MAKEFLAGS += -j$enable_jobserver )
+    fi
+])
@@ -0,0 +1,44 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_am_macros.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_AM_MACROS
+#
+# DESCRIPTION
+#
+#   Adds support for macros that create Make rules. You must manually add
+#   the following line
+#
+#     @INC_AMINCLUDE@
+#
+#   to your Makefile.in (or Makefile.am if you use Automake) files.
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
+#
+#   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 9
+
+AC_DEFUN([AX_AM_MACROS],
+[
+AC_MSG_NOTICE([adding automake macro support])
+AMINCLUDE="aminclude.am"
+AC_SUBST(AMINCLUDE)
+AC_MSG_NOTICE([creating $AMINCLUDE])
+AMINCLUDE_TIME=`date`
+AX_PRINT_TO_FILE([$AMINCLUDE],[[
+# generated automatically by configure from AX_AUTOMAKE_MACROS
+# on $AMINCLUDE_TIME
+
+]])
+
+INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE"
+AC_SUBST(INC_AMINCLUDE)
+])
@@ -0,0 +1,65 @@
+# ===========================================================================
+#  http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   For every FLAG1, FLAG2 it is checked whether the compiler works with the
+#   flag.  If it does, the flag is added FLAGS-VARIABLE
+#
+#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+#   CFLAGS) is used.  During the check the flag is always added to the
+#   current language's flags.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   NOTE: This macro depends on the AX_APPEND_FLAG and
+#   AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
+#   AX_APPEND_LINK_FLAGS.
+#
+# LICENSE
+#
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 3
+
+AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
+[AC_REQUIRE([AX_CHECK_COMPILE_FLAG])
+AC_REQUIRE([AX_APPEND_FLAG])
+for flag in $1; do
+  AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
+done
+])dnl AX_APPEND_COMPILE_FLAGS
@@ -0,0 +1,69 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+#   FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+#   added in between.
+#
+#   If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+#   CFLAGS) is used.  FLAGS-VARIABLE is not changed if it already contains
+#   FLAG.  If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+#   FLAG.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 2
+
+AC_DEFUN([AX_APPEND_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
+AS_VAR_SET_IF(FLAGS,
+  [case " AS_VAR_GET(FLAGS) " in
+    *" $1 "*)
+      AC_RUN_LOG([: FLAGS already contains $1])
+      ;;
+    *)
+      AC_RUN_LOG([: FLAGS="$FLAGS $1"])
+      AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
+      ;;
+   esac],
+  [AS_VAR_SET(FLAGS,["$1"])])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
@@ -0,0 +1,63 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   For every FLAG1, FLAG2 it is checked whether the linker works with the
+#   flag.  If it does, the flag is added FLAGS-VARIABLE
+#
+#   If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
+#   used. During the check the flag is always added to the linker's flags.
+#
+#   If EXTRA-FLAGS is defined, it is added to the linker's default flags
+#   when the check is done.  The check is thus made with the flags: "LDFLAGS
+#   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to
+#   issue an error when a bad flag is given.
+#
+#   NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
+#   Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
+#
+# LICENSE
+#
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 3
+
+AC_DEFUN([AX_APPEND_LINK_FLAGS],
+[AC_REQUIRE([AX_CHECK_LINK_FLAG])
+AC_REQUIRE([AX_APPEND_FLAG])
+for flag in $1; do
+  AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
+done
+])dnl AX_APPEND_LINK_FLAGS
@@ -0,0 +1,27 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_append_to_file.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_APPEND_TO_FILE([FILE],[DATA])
+#
+# DESCRIPTION
+#
+#   Appends the specified data to the specified file.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
+#
+#   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 8
+
+AC_DEFUN([AX_APPEND_TO_FILE],[
+AC_REQUIRE([AX_FILE_ESCAPES])
+printf "$2\n" >> "$1"
+])
@@ -0,0 +1,66 @@
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_ASSERT()
+#
+# DESCRIPTION
+#
+#   --enable-assert
+#
+# LICENSE
+#
+#  Copyright (C) 2012 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.
+
+#serial 6
+
+AC_DEFUN([AX_ASSERT],
+    [AC_PREREQ([2.63])dnl
+    AC_REQUIRE([AX_DEBUG])
+    AC_REQUIRE([AX_VCS_CHECKOUT])
+    AC_ARG_ENABLE([assert],
+      [AS_HELP_STRING([--enable-assert],
+        [Enable assert, this will be overridden by --enable-debug (yes|no) @<:@default=no@:>@])],
+      [ax_enable_assert=yes],
+      [ax_enable_assert=no])
+
+    AS_IF([ test "$ax_enable_assert" = "yes" -o "$ax_enable_debug" = "yes" -o "$ac_cv_vcs_checkout" = "yes" ],
+      [ax_enable_assert="yes"],
+      [ax_enable_assert="no"
+      AC_DEFINE(NDEBUG,[1],[Define to 1 to disable assert'ing code.])])
+
+    AC_MSG_CHECKING([for assert])
+    AC_MSG_RESULT([$ax_enable_assert])
+    ])
+
@@ -0,0 +1,72 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 2
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
@@ -0,0 +1,92 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_check_library.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_LIBRARY(VARIABLE-PREFIX, HEADER-FILE, LIBRARY-FILE,
+#                    [ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
+#
+# DESCRIPTION
+#
+#   Provides a generic test for a given library, similar in concept to the
+#   PKG_CHECK_MODULES macro used by pkg-config.
+#
+#   Most simplest libraries can be checked against simply through the
+#   presence of a header file and a library to link to. This macro allows to
+#   wrap around the test so that it doesn't have to be recreated each time.
+#
+#   Rather than define --with-$LIBRARY arguments, it uses variables in the
+#   same way that PKG_CHECK_MODULES does. It doesn't, though, use the same
+#   names, since you shouldn't provide a value for LIBS or CFLAGS but rather
+#   for LDFLAGS and CPPFLAGS, to tell the linker and compiler where to find
+#   libraries and headers respectively.
+#
+#   If the library is find, HAVE_PREFIX is defined, and in all cases
+#   PREFIX_LDFLAGS and PREFIX_CPPFLAGS are substituted.
+#
+#   Example:
+#
+#     AX_CHECK_LIBRARY([LIBEVENT], [event.h], [event], [],
+#                      [AC_MSG_ERROR([Unable to find libevent])])
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#   Copyright (c) 2010 Diego Elio Petteno` <flameeyes@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 7
+
+AC_DEFUN([AX_CHECK_LIBRARY],
+    [AC_ARG_VAR($1[_CPPFLAGS],[C preprocessor flags for ]$1[ headers])
+    AC_ARG_VAR($1[_LDFLAGS],[linker flags for ]$1[ libraries])
+
+    AC_CACHE_VAL(AS_TR_SH([ax_cv_have_]$1),
+      [AX_SAVE_FLAGS
+
+      AS_IF([test "x$]$1[_CPPFLAGS" != "x"],
+        [CPPFLAGS="$CPPFLAGS $]$1[_CPPFLAGS"])
+
+      AS_IF([test "x$]$1[_LDFLAGS" != "x"],
+        [LDFLAGS="$LDFLAGS $]$1[_LDFLAGS"])
+
+      AC_CHECK_HEADER($2, [
+        AC_CHECK_LIB($3, [main],
+          [AS_TR_SH([ax_cv_have_]$1)=yes],
+          [AS_TR_SH([ax_cv_have_]$1)=no])
+        ], [AS_TR_SH([ax_cv_have_]$1)=no])
+
+      AX_RESTORE_FLAGS
+      ])
+
+    AS_IF([test "$]AS_TR_SH([ax_cv_have_]$1)[" = "yes"],
+        [AC_DEFINE([HAVE_]$1, [1], [Define to 1 if ]$1[ is found])
+        ifelse([$4], , :, [$4])],
+        [ifelse([$5], , :, [$5])])
+    ])
@@ -0,0 +1,71 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the linker or gives an error.
+#   (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the linker's default flags
+#   when the check is done.  The check is thus made with the flags: "LDFLAGS
+#   EXTRA-FLAGS FLAG".  This can for example be used to force the linker to
+#   issue an error when a bad flag is given.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 2
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+  ax_check_save_flags=$LDFLAGS
+  LDFLAGS="$LDFLAGS $4 $1"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  LDFLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
@@ -0,0 +1,85 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VENDOR
+#
+# DESCRIPTION
+#
+#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
+#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
+#   watcom, etc. The vendor is returned in the cache variable
+#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#   Copyright (c) 2008 Matteo Frigo
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 12
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+  [# 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
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+      #if !($vencpp)
+        thisisanerror;
+      #endif
+    ])], [break])
+  done
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
+ ])
+])
@@ -0,0 +1,100 @@
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VERSION()
+#
+# DESCRIPTION
+#
+#   Capture version of C/C++ compiler
+#
+# LICENSE
+#
+#  Copyright (C) 2012 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.
+
+#serial 5
+AC_DEFUN([_C_COMPILER_VERSION],
+    [AC_MSG_CHECKING([C Compiler version])
+
+    AS_CASE(["$ax_cv_c_compiler_vendor"],
+      [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"])
+
+    AC_MSG_RESULT(["$ax_c_compiler_version"])
+    AC_SUBST([CC_VERSION_VENDOR],["$ax_cv_c_compiler_vendor"])
+    AC_SUBST([CC_VERSION],["$ax_c_compiler_version"])
+  ])
+
+AC_DEFUN([_CXX_COMPILER_VERSION],
+    [AC_MSG_CHECKING([C++ Compiler version])
+
+    AS_CASE(["$ax_cv_c_compiler_vendor"],
+      [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"])
+
+    AC_MSG_RESULT(["$ax_cxx_compiler_version"])
+    AC_SUBST([CXX_VERSION_VENDOR],["$ax_cv_c_compiler_vendor"])
+    AC_SUBST([CXX_VERSION],["$ax_cxx_compiler_version"])
+    ])
+
+AC_DEFUN([AX_COMPILER_VERSION],
+    [AC_REQUIRE([AX_COMPILER_VENDOR])
+
+    AC_MSG_CHECKING([MINGW])
+    AC_CHECK_DECL([__MINGW32__],
+      [MINGW=yes
+      ax_c_compiler_version_vendor=mingw],
+      [MINGW=no])
+    AC_MSG_RESULT([$MINGW])
+
+    AC_REQUIRE([_C_COMPILER_VERSION])
+    AC_REQUIRE([_CXX_COMPILER_VERSION])
+    AS_IF([test "x$GCC" = xyes],
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 7))
+# error GCC is Too Old!
+#endif
+          ]])],
+        [ac_c_gcc_recent=yes],
+        [ac_c_gcc_recent=no])
+      ])
+    ])
@@ -0,0 +1,57 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COUNT_CPUS
+#
+# DESCRIPTION
+#
+#   Attempt to count the number of processors present on the machine. If the
+#   detection fails, then a value of 1 is assumed.
+#
+#   The value is placed in the CPU_COUNT variable.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#   Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
+#   Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
+#
+#   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 10
+
+  AC_DEFUN([AX_COUNT_CPUS],[
+      AC_REQUIRE([AC_CANONICAL_HOST])
+      AC_REQUIRE([AC_PROG_EGREP])
+      AC_MSG_CHECKING([the number of available CPUs])
+      CPU_COUNT="0"
+
+      AS_CASE([$host_os],[
+        *darwin*],[
+        AS_IF([test -x /usr/sbin/sysctl],[
+          sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
+          AS_IF([test sysctl_a],[
+            CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
+            ])
+          ])],[
+        *linux*],[
+        AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
+          AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
+            CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
+            ])
+          ])
+        ])
+
+      AS_IF([test "x$CPU_COUNT" = "x0"],[
+        CPU_COUNT="1"
+        AC_MSG_RESULT( [unable to detect (assuming 1)] )
+        ],[
+        AC_MSG_RESULT( $CPU_COUNT )
+        ])
+      ])
@@ -0,0 +1,62 @@
+# ===========================================================================
+#  http://www.gnu.org/software/autoconf-archive/ax_cxx_gcc_abi_demangle.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_GCC_ABI_DEMANGLE
+#
+# DESCRIPTION
+#
+#   If the compiler supports GCC C++ ABI name demangling (has header
+#   cxxabi.h and abi::__cxa_demangle() function), define
+#   HAVE_GCC_ABI_DEMANGLE
+#
+#   Adapted from AX_CXX_RTTI by Luc Maisonobe
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#   Copyright (c) 2008 Neil Ferguson <nferguso@eso.org>
+#
+#   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 10
+
+AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE],
+    [AC_PREREQ([2.63])dnl
+    AC_CACHE_CHECK([whether the compiler supports GCC C++ ABI name demangling],
+      [ax_cv_cxx_gcc_abi_demangle],
+      [AC_LANG_PUSH([C++])
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <typeinfo>
+#include <cxxabi.h>
+#include <cstdlib>
+#include <string>
+          template<typename TYPE>
+          class A {};]],
+          [[A<int> 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<int>") != 0)
+          { 
+          return EXIT_FAILURE;
+          }]])],
+        [ax_cv_cxx_gcc_abi_demangle=yes],
+        [ax_cv_cxx_gcc_abi_demangle=no],
+        [ax_cv_cxx_gcc_abi_demangle=no])
+      AC_LANG_POP])
+      AC_MSG_CHECKING([checking for cxx_gcc_abi_demangle])
+  AC_MSG_RESULT(["$ax_cv_cxx_gcc_abi_demangle"])
+  AS_IF([test "x$ax_cv_cxx_gcc_abi_demangle" = xyes],
+      [AC_DEFINE([HAVE_GCC_ABI_DEMANGLE],[1],[define if the compiler supports GCC C++ ABI name demangling])])
+  ])
@@ -0,0 +1,64 @@
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_DEBUG()
+#
+# DESCRIPTION
+#
+#   --enable-debug
+#
+# LICENSE
+#
+#  Copyright (C) 2012 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.
+
+#serial 6
+
+AC_DEFUN([AX_DEBUG],
+    [AC_PREREQ([2.63])dnl
+    AC_ARG_ENABLE([debug],
+      [AS_HELP_STRING([--enable-debug],
+        [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
+      [ax_enable_debug=yes
+      AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code.])
+      AX_CHECK_LIBRARY([MCHECK],[mcheck.h],[mcheck],[AX_APPEND_LINK_FLAGS([-lmcheck])])
+      AX_ADD_AM_MACRO([--debug],[AM_YFLAGS])
+      AX_ADD_AM_MACRO([-D_GLIBCXX_DEBUG],[AM_CPPFLAGS])],
+      [ax_enable_debug=no
+      AC_SUBST([MCHECK])
+      AC_DEFINE([DEBUG],[0],[Define to 1 to enable debugging code.])])
+
+    AC_MSG_CHECKING([for debug])
+    AC_MSG_RESULT([$ax_enable_debug])
+    AM_CONDITIONAL([DEBUG],[test "x${ax_enable_debug}" = "xyes"])])
@@ -0,0 +1,35 @@
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_ENDIAN()
+#
+# DESCRIPTION
+#
+#   Generate to defines describing endian.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   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 1
+ 
+AC_DEFUN([AX_ENDIAN],[
+    AC_C_BIGENDIAN([
+      AC_DEFINE([WORDS_BIGENDIAN],[1],[machine is big-endian])
+      AC_DEFINE([ENDIAN_BIG],[1],[machine is big-endian])
+      AC_DEFINE([ENDIAN_LITTLE],[0],[machine is little-endian])],[ 
+      ],[ 
+      AC_DEFINE([WORDS_BIGENDIAN],[0],[machine is big-endian])
+      AC_DEFINE([ENDIAN_BIG],[0],[machine is big-endian])
+      AC_DEFINE([ENDIAN_LITTLE],[1],[machine is little-endian])
+      ],[ 
+      AC_MSG_ERROR([unable to determine endian])
+      ]) 
+    ])
@@ -0,0 +1,30 @@
+# ===========================================================================
+#      http://www.gnu.org/software/autoconf-archive/ax_file_escapes.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_FILE_ESCAPES
+#
+# DESCRIPTION
+#
+#   Writes the specified data to the specified file.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
+#
+#   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 7
+
+AC_DEFUN([AX_FILE_ESCAPES],[
+AX_DOLLAR="\$"
+AX_SRB="\\135"
+AX_SLB="\\133"
+AX_BS="\\\\"
+AX_DQ="\""
+])
@@ -0,0 +1,37 @@
+# serial 1
+#
+AC_DEFUN([HAVE_GCC_ATOMICS],
+    [AC_CACHE_CHECK([whether the compiler provides atomic builtins],
+      [ax_cv_gcc_atomic_builtins],
+      [AX_SAVE_FLAGS
+      AC_LANG_PUSH([C])
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([],
+          [[
+          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;
+          }
+          ]])],
+        [ax_cv_gcc_atomic_builtins=yes],
+        [ax_cv_gcc_atomic_builtins=no],
+        [AC_MSG_WARN([test program execution failed])])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
+      ])
+
+      AS_IF([test "x$ax_cv_gcc_atomic_builtins" = "xyes"],
+          [AC_DEFINE([HAVE_GCC_ATOMIC_BUILTINS],[1],
+            [Define to 1 if compiler provides atomic builtins.])
+          ])
+      ])
@@ -0,0 +1,365 @@
+# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_HARDEN_COMPILER_FLAGS() AX_HARDEN_LINKER_FLAGS()
+#
+# DESCRIPTION
+#
+#   Any compiler flag that "hardens" or tests code. C99 is assumed.
+#
+#   NOTE: Implementation based on AX_APPEND_FLAG.
+#
+# LICENSE
+#
+#  Copyright (C) 2012-2013 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.
+#
+#  Notes:
+#  We do not test for c99 or c++11, that is out of scope.
+
+# The Following flags are not checked for
+# -Wdeclaration-after-statement is counter to C99
+# _APPEND_COMPILE_FLAGS_ERROR([-pedantic])
+
+#serial 13
+
+AC_DEFUN([_SET_SANITIZE_FLAGS],
+         [AS_IF([test "x$MINGW" != xyes],[
+                AS_IF([test "x$enable_shared" = "xyes"],
+                      [AS_CASE([$ax_harden_sanitize],
+                               [thread],[
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread])],
+                               [address],[
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])],
+                               [rest],[
+                               _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
+                               _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])])
+                      ])
+                ])
+          ])
+
+AC_DEFUN([_WARNINGS_AS_ERRORS],
+    [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors],
+      [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[ac_cv_warnings_as_errors=yes],
+        [ac_cv_warnings_as_errors=no])
+      ])
+    ])
+
+# Note: Should this be LIBS or LDFLAGS?
+AC_DEFUN([_APPEND_LINK_FLAGS_ERROR],
+         [AX_APPEND_LINK_FLAGS([$1],[LDFLAGS],[-Werror])
+         ])
+
+AC_DEFUN([_APPEND_COMPILE_FLAGS_ERROR],
+         [AX_APPEND_COMPILE_FLAGS([$1],,[-Werror])
+         ])
+
+# Everything above this does the heavy lifting, while what follows does the specifics.
+
+AC_DEFUN([_HARDEN_LINKER_FLAGS],
+        [AS_IF([test "$CC" != "clang"],
+          [_APPEND_LINK_FLAGS_ERROR([-z relro -z now])
+          AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],[AX_APPEND_LINK_FLAGS([-Werror])])
+          AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
+          [_APPEND_LINK_FLAGS_ERROR([-rdynamic])
+#         AX_APPEND_LINK_FLAGS([--coverage])])
+          ])
+        ])
+
+AC_DEFUN([_AX_HARDEN_SANITIZE],
+         [AC_REQUIRE([AX_DEBUG])
+         AC_ARG_WITH([sanitize],
+                     [AS_HELP_STRING([--with-sanitize],
+                                     [Enable sanitize flag for compiler if it supports them @<:@default=no@:>@])],
+                     [AS_CASE([$with_sanitize],
+                              [thread],[
+                              ax_harden_sanitize='thread'],
+                              [address],[
+                              ax_harden_sanitize='address'],
+                              [ax_harden_sanitize='rest'])
+                     ],
+                     [AS_IF([test "x$ax_enable_debug" = xyes],[ax_harden_sanitize='rest'])])
+         ])
+
+AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
+         [AC_LANG_PUSH([C])dnl
+
+         AS_IF([test "x$ax_enable_debug" = xyes],
+           [CFLAGS=''
+           _APPEND_COMPILE_FLAGS_ERROR([-H])
+           _APPEND_COMPILE_FLAGS_ERROR([-g])
+           _APPEND_COMPILE_FLAGS_ERROR([-g3])
+           _APPEND_COMPILE_FLAGS_ERROR([-fmudflapth])
+           _APPEND_COMPILE_FLAGS_ERROR([-fno-eliminate-unused-debug-types])
+           _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
+           ],[
+           _APPEND_COMPILE_FLAGS_ERROR([-g])
+           _APPEND_COMPILE_FLAGS_ERROR([-O2])
+           ])
+
+         AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
+           [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check])
+#          _APPEND_COMPILE_FLAGS_ERROR([--coverage])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])],
+           [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])])
+
+         AS_IF([test "$CC" = "clang"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
+
+         _APPEND_COMPILE_FLAGS_ERROR([-Wall])
+         _APPEND_COMPILE_FLAGS_ERROR([-Wextra])
+         _APPEND_COMPILE_FLAGS_ERROR([-Weverything])
+         _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail])
+# Anything below this comment please keep sorted.
+# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunsuffixed-float-constants])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wjump-misses-init])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes])
+          _APPEND_COMPILE_FLAGS_ERROR([-Waddress])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs])
+          _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wbad-function-cast])
+# Not in use -Wc++-compat
+          _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wcomment])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers])
+          AS_IF([test "x$MINGW" = xyes],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wno-missing-noreturn])],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wmissing-noreturn])])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-prototypes])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wnested-externs])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id])
+          _APPEND_COMPILE_FLAGS_ERROR([-Woverride-init])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-sign])
+          AS_IF([test "x$MINGW" = xyes],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=const])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=noreturn])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=pure])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-redundant-decls])],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wredundant-decls])])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wshadow])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wshorten-64-to-32])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-prototypes])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wtrampolines])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wundef])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations])
+          _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations])
+
+          _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings])
+          _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
+          _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
+          _APPEND_COMPILE_FLAGS_ERROR([-pipe])
+          _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpacked])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long])
+#         GCC 4.5 removed this.
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code])
+
+          _SET_SANITIZE_FLAGS
+
+          AS_IF([test "x$ax_enable_debug" = xno],
+            [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
+              [AS_IF([test "x${host_os}" != "xmingw"],
+                [AS_IF([test "x$ac_c_gcc_recent" = xyes],
+                  [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])
+                  #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector])
+                  #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4])
+                  _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all])
+                  ])])])])
+
+         AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],
+             [AX_APPEND_FLAG([-Werror])])
+
+          AC_LANG_POP([C])
+  ])
+
+AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
+         [AC_LANG_PUSH([C++])
+         AS_IF([test "x$ax_enable_debug" = xyes],
+           [CXXFLAGS=''
+           _APPEND_COMPILE_FLAGS_ERROR([-H])
+           _APPEND_COMPILE_FLAGS_ERROR([-g])
+           _APPEND_COMPILE_FLAGS_ERROR([-g3])
+           _APPEND_COMPILE_FLAGS_ERROR([-fmudflapth])
+           _APPEND_COMPILE_FLAGS_ERROR([-fno-inline])
+           _APPEND_COMPILE_FLAGS_ERROR([-fno-eliminate-unused-debug-types])
+           _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
+           ],[
+           _APPEND_COMPILE_FLAGS_ERROR([-g])
+           _APPEND_COMPILE_FLAGS_ERROR([-O2])
+           ])
+
+         AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
+           [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check])
+#          _APPEND_COMPILE_FLAGS_ERROR([--coverage])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])],
+           [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas])
+           _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])])
+
+         AS_IF([test "$CXX" = "clang++"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
+
+         _APPEND_COMPILE_FLAGS_ERROR([-Wall])
+         _APPEND_COMPILE_FLAGS_ERROR([-Wextra])
+         _APPEND_COMPILE_FLAGS_ERROR([-Weverything])
+         _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail])
+# Anything below this comment please keep sorted.
+# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs])
+          _APPEND_COMPILE_FLAGS_ERROR([-Waddress])
+          _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wcomment])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wctor-dtor-privacy])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wnon-virtual-dtor])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id])
+          _APPEND_COMPILE_FLAGS_ERROR([-Woverloaded-virtual])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith])
+          AS_IF([test "x$MINGW" = xyes],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=const])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-missing-noreturn])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-noreturn])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=noreturn])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-error=suggest-attribute=noreturn])
+                _APPEND_COMPILE_FLAGS_ERROR([-Wno-redundant-decls])],
+                [_APPEND_COMPILE_FLAGS_ERROR([-Wredundant-decls])])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wshadow])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wshorten-64-to-32])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wtrampolines])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wundef])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations])
+          _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Weffc++])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security])
+          _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
+          _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
+          _APPEND_COMPILE_FLAGS_ERROR([-pipe])
+          _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpacked])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long])
+#         GCC 4.5 removed this.
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code])
+
+          AS_IF([test "x$ax_enable_debug" = xno],
+          [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
+            [AS_IF([test "x${host_os}" != "xmingw"],
+              [AS_IF([test "x$ac_c_gcc_recent" = xyes],
+                [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])
+                #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector])
+                #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4])
+                _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all])
+                ])])])])
+
+          _SET_SANITIZE_FLAGS
+
+          AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],
+                [AX_APPEND_FLAG([-Werror])])
+          AC_LANG_POP([C++])
+  ])
+
+# All of the heavy lifting happens in _HARDEN_LINKER_FLAGS,
+# _HARDEN_CC_COMPILER_FLAGS, _HARDEN_CXX_COMPILER_FLAGS
+  AC_DEFUN([AX_HARDEN_COMPILER_FLAGS],
+           [AC_PREREQ([2.63])dnl
+           AC_REQUIRE([AC_CANONICAL_HOST])
+           AC_REQUIRE([AX_COMPILER_VERSION])
+           AC_REQUIRE([AX_ASSERT])
+           _WARNINGS_AS_ERRORS
+           _AX_HARDEN_SANITIZE
+
+           AC_REQUIRE([gl_VISIBILITY])
+           AS_IF([test -n "$CFLAG_VISIBILITY"],[CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY"])
+
+           _WARNINGS_AS_ERRORS
+           _HARDEN_LINKER_FLAGS
+           _HARDEN_CC_COMPILER_FLAGS
+           _HARDEN_CXX_COMPILER_FLAGS
+           ])
+
@@ -0,0 +1,33 @@
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_HEX_VERSION(VARIABLE_NAME, VERSION)
+#
+# DESCRIPTION
+#
+#   Generate version information in HEX and STRING format.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   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 3
+ 
+AC_DEFUN([AX_HEX_VERSION],
+    [AC_PREREQ([2.63])dnl
+
+    string_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`
+    hex_version_$1=`echo $2 | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
+
+    AC_SUBST([$1_VERSION_STRING],["$string_version_$1"])
+    AC_SUBST([$1_VERSION_HEX],["$hex_version_$1"])
+    ])
+
@@ -0,0 +1,128 @@
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_LIBEVENT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 
+#   AX_LIBEVENT2() 
+#   AX_LIBEVENT2_EVHTTP()
+#
+# DESCRIPTION
+#
+#   libevent library
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   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 5
+ 
+AC_DEFUN([AX_LIBEVENT],
+         [AC_PREREQ([2.63])dnl
+         AC_CACHE_CHECK([test for a working libevent],[ax_cv_libevent],
+           [AX_SAVE_FLAGS
+           LIBS="-levent $LIBS"
+           AC_LANG_PUSH([C])
+           AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <event.h>
+               ]],[[
+               struct event_base *tmp_event= event_init();
+               event_base_free(tmp_event);
+               ]])],
+             [ax_cv_libevent=yes],
+             [ax_cv_libevent=no],
+             [AC_MSG_WARN([test program execution failed])])
+           AC_LANG_POP
+           AX_RESTORE_FLAGS
+           ])
+
+         AS_IF([test "x$ax_cv_libevent" = "xyes"],
+             [AC_SUBST([LIBEVENT_LIB],[-levent])
+             AC_DEFINE([HAVE_LIBEVENT],[1],[Define if event_init is present in event.h.])],
+             [AC_DEFINE([HAVE_LIBEVENT],[0],[Define if event_init is present in event.h.])])
+
+         AM_CONDITIONAL(HAVE_LIBEVENT, test "x$ax_cv_libevent" = "xyes")
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+         AS_IF([test "x$ax_cv_libevent" = xyes],
+             [$1],
+             [$2])
+         ])
+
+AC_DEFUN([AX_LIBEVENT2],
+    [AC_REQUIRE([AX_LIBEVENT])
+    AC_CACHE_CHECK([test for a working libevent version 2],[ax_cv_libevent2],
+      [AX_SAVE_FLAGS
+      LIBS="-levent $LIBS"
+      AC_LANG_PUSH([C])
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <event2/event.h>
+          ]],[[
+          struct event_base *___event_base= event_base_new();  
+          event_base_free(___event_base);
+          ]])],
+        [ax_cv_libevent2=yes],
+        [ax_cv_libevent2=no],
+        [AC_MSG_WARN([test program execution failed])])
+      AC_LANG_POP([C])
+      AX_RESTORE_FLAGS
+      ])
+
+    AS_IF([test "x$ax_cv_libevent2" = xyes],
+        [AC_SUBST([LIBEVENT2_LIB],[-levent])
+        AC_DEFINE([HAVE_LIBEVENT2],[1],[Define if event_init is present in event2/event.h.])],
+        [AC_DEFINE([HAVE_LIBEVENT2],[0],[Define if event_init is present in event2/event.h.])])
+
+    AM_CONDITIONAL([HAVE_LIBEVENT2], [test "x$ax_cv_libevent2" = xyes])
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    AS_IF([test "x$ax_cv_libevent2" = xyes],
+        [$1],
+        [$2])
+    ])dnl AX_LIBEVENT2
+
+# 
+AC_DEFUN([AX_LIBEVENT2_EVHTTP],
+    [AC_REQUIRE([AX_LIBEVENT2])
+    AC_CACHE_CHECK([test for a working libevent2 evhttp interface], [ax_cv_libevent2_evhttp],
+      [AX_SAVE_FLAGS
+      LIBS="-levent $LIBS"
+      AC_LANG_PUSH([C])
+      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <event2/event.h>
+#include <event2/http.h>
+          ]],[[
+          struct event_base *___event_base= event_base_new();  
+          struct evhttp *___evhttp= evhttp_new(___event_base);
+          evhttp_free(___evhttp);
+          event_base_free(___event_base);
+          ]])],
+        [ax_cv_libevent2_evhttp=yes],
+        [ax_cv_libevent2_evhttp=no],
+        [AC_MSG_WARN([test program execution failed])])
+      AC_LANG_POP([C])
+      AX_RESTORE_FLAGS
+      ])
+
+    AS_IF([test "x$ax_cv_libevent2_evhttp" = "xyes"],
+        [AC_DEFINE([HAVE_LIBEVENT2_EVHTTP],[1],[Define if event_init is present in event2/http.h.])],
+        [AC_DEFINE([HAVE_LIBEVENT2_EVHTTP],[0],[Define if event_init is present in event2/http.h.])])
+
+    AM_CONDITIONAL([HAVE_LIBEVENT2_EVHTTP],[test "x$ax_cv_libevent2_evhttp" = xyes])
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    AS_IF([test "x$ax_cv_libevent2_evhttp" = xyes],
+        [$1],
+        [$2])
+    ])dnl AX_LIBEVENT2_EVHTTP
@@ -0,0 +1,138 @@
+# ===========================================================================
+#      https//libmemcached.org/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_LIBMEMCACHED, AX_LIBMEMCACHED_UTIL, AX_ENABLE_LIBMEMCACHED
+#
+# DESCRIPTION
+#
+#   Checked for installation of libmemcached
+#
+#  AC_SUBST(LIBMEMCACHED_CFLAGS) 
+#  AC_SUBST(LIBMEMCACHED_LDFLAGS)
+#  AC_SUBST(LIBMEMCACHED_UTIL_LDFLAGS)
+#
+#   NOTE: Implementation uses AC_CHECK_HEADER.
+#
+# LICENSE
+#
+#  Copyright (C) 2012 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.
+
+#serial 1
+
+AC_DEFUN([AX_LIBMEMCACHED], [
+    AC_CHECK_HEADER([libmemcached-1.0/memcached.h], [
+      AC_CACHE_CHECK([check for -lmemcached], [ax_cv_libmemcached], [
+        AC_LANG_PUSH([C])
+        AX_SAVE_FLAGS
+        LIBS="-lmemcached $LIBS"
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <libmemcached-1.0/memcached.h>], [
+            memcached_st *memc;
+            memc= memcached(NULL, 0);
+            memcached_free(memc);
+            ])],
+          [ax_cv_libmemcached=yes],
+          [ax_cv_libmemcached=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        AX_RESTORE_FLAGS
+        ])
+      ])
+
+  AS_IF([test "x$ax_cv_libmemcached" = "xyes"], [
+      AC_DEFINE([HAVE_LIBMEMCACHED_MEMCACHED_H], [1], [Have libmemcached-1.0/memcached.h])
+      ],[
+      AC_DEFINE([HAVE_LIBMEMCACHED_MEMCACHED_H], [0], [Have libmemcached-1.0/memcached.h])
+      ])
+  ])
+
+  AC_DEFUN([AX_LIBMEMCACHED_UTIL], [
+      AC_REQUIRE([AX_LIBMEMCACHED])
+      AS_IF([test "$ax_cv_libmemcached" = yes], [
+        AC_CHECK_HEADER([libmemcachedutil-1.0/util.h], [
+          AC_CACHE_CHECK([check for -lmemcachedutil], [ax_cv_libmemcached_util], [
+            AX_SAVE_FLAGS
+            AC_LANG_PUSH([C])
+            LIBS="-lmemcachedutil -lmemcached $LIBS"
+            AC_RUN_IFELSE([
+              AC_LANG_PROGRAM([#include <libmemcachedutil-1.0/util.h>], [
+                memcached_pool_st *memc_pool= memcached_pool_create(NULL, 0, 3);
+                memcached_pool_destroy(memc_pool);
+                ])],
+              [ax_cv_libmemcached_util=yes],
+              [ax_cv_libmemcached_util=no],
+              [AC_MSG_WARN([test program execution failed])])
+            AC_LANG_POP
+            AX_RESTORE_FLAGS
+            ])
+          ])
+        ])
+
+      AS_IF([test "x$ax_cv_libmemcached_util" = "xyes"], [
+        AC_DEFINE([HAVE_LIBMEMCACHED_UTIL_H], [1], [Have libmemcachedutil-1.0/util.h])
+        ],[
+        AC_DEFINE([HAVE_LIBMEMCACHED_UTIL_H], [0], [Have libmemcachedutil-1.0/util.h])
+        ])
+      ])
+
+AC_DEFUN([_ENABLE_LIBMEMCACHED], [
+         AC_REQUIRE([AX_LIBMEMCACHED_UTIL])
+         AC_ARG_ENABLE([libmemcached],
+                       [AS_HELP_STRING([--disable-libmemcached],
+                                       [Build with libmemcached support @<:@default=on@:>@])],
+                       [ax_enable_libmemcached="$enableval"],
+                       [ax_enable_libmemcached="yes"])
+
+         AS_IF([test "x$ax_cv_libmemcached" != "xyes"], [
+               ax_enable_libmemcached="not found"
+               ])
+
+         AS_IF([test "x$ax_enable_libmemcached" = "xyes"], [
+               AC_DEFINE([HAVE_LIBMEMCACHED], [1], [Enable libmemcached support])
+               LIBMEMCACHED_CFLAGS=
+               AC_SUBST([LIBMEMCACHED_CFLAGS])
+               LIBMEMCACHED_LDFLAGS="-lmemcached"
+               AC_SUBST([LIBMEMCACHED_LDFLAGS])
+               AS_IF([test "x$ax_cv_libmemcached_util" = "xyes"], [
+                     LIBMEMCACHED_UTIL_LDFLAGS="-lmemcached -lmemcachedutil"
+                     AC_SUBST([LIBMEMCACHED_UTIL_LDFLAGS])
+                     ])
+               ],[
+               AC_DEFINE([HAVE_LIBMEMCACHED], [0], [Enable libmemcached support])
+               ])
+         AM_CONDITIONAL(HAVE_LIBMEMCACHED, test "x${ax_enable_libmemcached}" = "xyes")
+         ])
+
+AC_DEFUN([AX_ENABLE_LIBMEMCACHED], [ AC_REQUIRE([_ENABLE_LIBMEMCACHED]) ])
@@ -0,0 +1,69 @@
+# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+# ===========================================================================
+#      https://github.com/BrianAker/ddm4/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PROG_MEMCACHED
+#
+# DESCRIPTION
+#
+#   Check for memcached and list version
+#
+# LICENSE
+#
+#  Copyright (C) 2013 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.
+
+#serial 4
+
+AC_DEFUN([AX_PROG_MEMCACHED],
+         [AX_WITH_PROG([MEMCACHED_BINARY],[memcached],[unknown])
+         ax_memcached_success=
+         AS_IF([test x"$MEMCACHED_BINARY" != xunknown],
+               [AS_IF([test -x "$MEMCACHED_BINARY"],
+                      [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}'`
+                      AS_IF([test -n "$ax_memcached_version"],
+                            [ax_memcached_success='ok'
+                            AC_MSG_RESULT([memcached version "$ax_memcached_version"])
+                            AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])])
+                      ])
+               ])
+
+         AS_IF([test -n "$ax_memcached_success"], 
+               [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available])
+               AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$MEMCACHED_BINARY",[Name of the memcached binary used in make test])
+               ],
+               [AC_DEFINE([HAVE_MEMCACHED_BINARY], [0], [If Memcached binary is available])
+               MEMCACHED_BINARY=
+               ])
+         ])
@@ -0,0 +1,56 @@
+# ===========================================================================
+#       http://
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PLATFORM
+#
+# DESCRIPTION
+#
+#   Provide target and host defines.
+#
+# LICENSE
+#
+#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
+#
+#   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 4
+#
+  AC_DEFUN([AX_PLATFORM],
+      [AC_REQUIRE([AC_CANONICAL_HOST])
+
+      AC_DEFINE_UNQUOTED([HOST_VENDOR],["$host_vendor"],[Vendor of Build System])
+      AC_DEFINE_UNQUOTED([HOST_OS],["$host_os"], [OS of Build System])
+      AC_DEFINE_UNQUOTED([HOST_CPU],["$host_cpu"], [CPU of Build System])
+
+      AS_CASE([$host_os],
+        [*mingw*],
+        [HOST_WINDOWS="true"
+        AC_DEFINE([HOST_OS_WINDOWS], [1], [Whether we are building for Windows])
+        AC_DEFINE([EAI_SYSTEM], [11], [Another magical number])
+        AH_BOTTOM([
+#ifndef HAVE_SYS_SOCKET_H
+# define SHUT_RD SD_RECEIVE
+# define SHUT_WR SD_SEND
+# define SHUT_RDWR SD_BOTH
+#endif
+          ])],
+        [*freebsd*],[AC_DEFINE([HOST_OS_FREEBSD],[1],[Whether we are building for FreeBSD])
+        AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])],
+        [*solaris*],[AC_DEFINE([HOST_OS_SOLARIS],[1],[Whether we are building for Solaris])],
+        [*darwin*],
+        [HOST_OSX="true"],
+        [*linux*],
+        [HOST_LINUX="true"
+        AC_DEFINE([HOST_OS_LINUX],[1],[Whether we build for Linux])])
+
+  AM_CONDITIONAL([BUILD_WIN32],[test "x${HOST_WINDOWS}" = "xtrue"])
+  AM_CONDITIONAL([HOST_OSX],[test "x${HOST_OSX}" = "xtrue"])
+  AM_CONDITIONAL([HOST_LINUX],[test "x${HOST_LINUX}" = "xtrue"])
+  AM_CONDITIONAL([HOST_FREEBSD],[test "x${HOST_OS_FREEBSD}" = "xtrue"])
+  ])
@@ -0,0 +1,27 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_print_to_file.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PRINT_TO_FILE([FILE],[DATA])
+#
+# DESCRIPTION
+#
+#   Writes the specified data to the specified file.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
+#
+#   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 7
+
+AC_DEFUN([AX_PRINT_TO_FILE],[
+AC_REQUIRE([AX_FILE_ESCAPES])
+printf "$2" > "$1"
+])
@@ -0,0 +1,48 @@
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
+#
+# DESCRIPTION
+#
+#   Look for sphinx-build and make sure it is a recent version of it.
+#
+# LICENSE
+#
+#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
+#
+#   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 5
+
+AC_DEFUN([AX_PROG_SPHINX_BUILD],
+         [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
+         AS_IF([test x"SPHINXBUILD" = x":"],
+               [SPHINXBUILD=],
+               [AS_IF([test -x "$SPHINXBUILD"],
+                      [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
+                      junk=`$SPHINXBUILD --version &> version_file`
+                      AS_IF([test $? -eq 0],
+                            [ax_sphinx_build_version=`head -1 version_file`],
+                            [junk=`$SPHINXBUILD &> version_file`
+                            ax_sphinx_build_version=`head -1 version_file`
+                            rm version_file
+                            AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"])
+                            $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+                            AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
+                            rm -rf conftest.d ])
+                      ])
+                      rm -f version_file
+               ])
+
+         AS_IF([test -n "${SPHINXBUILD}"],
+               [AC_SUBST([SPHINXBUILD])
+               ifelse([$1], , :, [$1])],
+               [ifelse([$2], , :, [$2])])
+         ])
@@ -0,0 +1,332 @@
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro figures out how to build C programs using POSIX threads. It
+#   sets the PTHREAD_LIBS output variable to the threads library and linker
+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+#   flags that are needed. (The user can also force certain compiler
+#   flags/libs to be tested by setting these environment variables.)
+#
+#   Also sets PTHREAD_CC to any special C compiler that is needed for
+#   multi-threaded programs (defaults to the value of CC otherwise). (This
+#   is necessary on AIX to use the special cc_r compiler alias.)
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also link it with them as well. e.g. you should link with
+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+#   If you are only building threads programs, you may wish to use these
+#   variables in your default LIBS, CFLAGS, and CC:
+#
+#     LIBS="$PTHREAD_LIBS $LIBS"
+#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#     CC="$PTHREAD_CC"
+#
+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+#   PTHREAD_CFLAGS.
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+#   is not found. If ACTION-IF-FOUND is not specified, the default action
+#   will define HAVE_PTHREAD.
+#
+#   Please let the authors know if this macro fails on any platform, or if
+#   you have any other suggestions or comments. This macro was based on work
+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
+#   grateful for the helpful feedback of numerous users.
+#
+#   Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 23
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+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"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
+        AC_MSG_RESULT([$ax_pthread_ok])
+        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.
+
+AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
+                  [AC_MSG_RESULT([yes])],
+                  [ax_pthread_extra_flags=
+                   AC_MSG_RESULT([no])])
+CFLAGS="$save_CFLAGS"
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                pthread-config)
+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                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.
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }],
+                       [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) /* ; */])],
+                [ax_pthread_ok=yes],
+                [])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT([$ax_pthread_ok])
+        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.
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+                           [int attr = $attr; return attr /* ; */])],
+                [attr_name=$attr; break],
+                [])
+        done
+        AC_MSG_RESULT([$attr_name])
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        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
+        AC_MSG_RESULT([$flag])
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+            [ax_cv_PTHREAD_PRIO_INHERIT], [
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                AS_CASE(["x/$CC"],
+                  [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
+                   AS_CASE(["x$CC"],
+                     [x/*],
+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+                ;;
+            esac
+        fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
+        :
+else
+        ax_pthread_ok=no
+        $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
@@ -0,0 +1,50 @@
+# ===========================================================================
+# http://
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PTHREAD_TIMEDJOIN_NP()
+#
+# DESCRIPTION
+#
+#   Check for pthread_timedjoin_np support.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   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 6
+
+AC_DEFUN([AX_PTHREAD_TIMEDJOIN_NP],
+    [AC_PREREQ([2.63])dnl
+    AC_REQUIRE([AX_PTHREAD])
+    AC_CACHE_CHECK([check for pthread_timedjoin_np], [ax_cv_pthread_timedjoin_np],
+      [AX_SAVE_FLAGS
+      CFLAGS="$PTHREAD_CFLAGS"
+      LIBS="$PTHREAD_LIBS"
+      AC_LANG_PUSH([C])
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+          [
+#include <pthread.h>
+#include <stdlib.h>
+          ],[
+          pthread_t thread;
+          pthread_timedjoin_np(thread, NULL, NULL);
+          ])],
+        [ax_cv_pthread_timedjoin_np=yes],[])
+
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
+      ])
+
+    AS_IF([test "$ax_cv_pthread_timedjoin_np" = yes],
+        [AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[1],[Define if pthread_timedjoin_np is present in pthread.h.])],
+        [AC_DEFINE(HAVE_PTHREAD_TIMEDJOIN_NP,[0],[Define if pthread_timedjoin_np is present in pthread.h.])])
+    ])
@@ -0,0 +1,52 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_restore_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_RESTORE_FLAGS([namespace])
+#
+# DESCRIPTION
+#
+#   Restore common compilation flags from temporary variables.
+#
+#   Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
+#   OBJCFLAGS.
+#
+#   By default these flags are restored to a global (empty) namespace, but
+#   user could restore from specific NAMESPACE by using
+#   AX_RESTORE_FLAGS(NAMESPACE) macro.
+#
+#   Typical usage is like:
+#
+#     AX_SAVE_FLAGS(mypackage)
+#     CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
+#     dnl ... do some detection ...
+#     AX_RESTORE_FLAGS(mypackage)
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Filippo Giunchedi <filippo@esaurito.net>
+#   Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
+#   Copyright (c) 2011 Russ Allbery <rra@stanford.edu>
+#   Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf@gmail.com>
+#
+#   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 6
+
+# save one flag in name space
+AC_DEFUN([_AX_RESTORE_ONE_FLAG],[dnl
+  AS_VAR_PUSHDEF([_ax_restore_flag_var], [$2[]_$1[]_ax_save_flags])
+  AS_VAR_COPY($2[],_ax_restore_flag_var)
+  AS_VAR_POPDEF([_ax_restore_flag_var])
+])
+
+AC_DEFUN([AX_RESTORE_FLAGS], [dnl
+   m4_foreach([FLAG], dnl
+	      [_AX_SAVE_FLAGS_LIST()], dnl
+	      [_AX_RESTORE_ONE_FLAG([$1],FLAG)])
+])
@@ -0,0 +1,51 @@
+# ===========================================================================
+#  http://www.tangent.org/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_SASL
+#   AX_SASL_CHECK
+#
+# DESCRIPTION
+#
+#   Check to see if libsasl is requested and available.
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#
+#   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 3
+
+AC_DEFUN([AX_SASL_OPTION],
+         [AC_REQUIRE([AX_SASL_CHECK])
+         AC_ARG_ENABLE([sasl],
+                       [AS_HELP_STRING([--disable-sasl], [Build with sasl support @<:@default=on@:>@])],
+                       [ac_enable_sasl="$enableval"],
+                       [ac_enable_sasl=yes])
+
+         AS_IF([test "x${ac_enable_sasl}" = xyes],[
+               AC_MSG_CHECKING([checking to see if enabling sasl])
+               AS_IF([test "x${ax_sasl_check}" = xyes],[
+                     ax_sasl_option=yes],[
+                     AC_MSG_WARN([request to add sasl support failed, please see config.log])
+                     ac_enable_sasl=no
+                     ax_sasl_option=no])
+               AC_MSG_RESULT(["$ax_sasl_option"])],[
+               ax_sasl_option=no])
+         AM_CONDITIONAL([HAVE_SASL],[test "x${ax_sasl_option}" = xyes])
+         ])
+
+AC_DEFUN([AX_SASL_CHECK],[
+         AX_CHECK_LIBRARY([LIBSASL],[sasl/sasl.h],[sasl2],[
+                          ax_sasl_check=yes
+                          AC_SUBST([SASL_LIB],[[-lsasl2]])],[
+                          ax_sasl_check=no])
+         AC_MSG_CHECKING([checking to see if sasl works])
+         AC_MSG_RESULT(["$ax_sasl_check"])
+         ])
@@ -0,0 +1,71 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_save_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_SAVE_FLAGS([NAMESPACE])
+#
+# DESCRIPTION
+#
+#   Save common compilation flags into temporary variables.
+#
+#   Compilation flags includes: CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS,
+#   OBJCFLAGS.
+#
+#   By default these flags are saved to a global (empty) namespace, but user
+#   could specify a specific NAMESPACE to AX_SAVE_FLAGS macro and latter
+#   restore it by using AX_RESTORE_FLAGS(NAMESPACE).
+#
+#     AX_SAVE_FLAGS(mypackage)
+#     CPPFLAGS="-Imypackagespath ${CPPFLAGS}"
+#     dnl .. do some detection ...
+#     AX_RESTORE_FLAGS(mypackage)
+#
+# LICENSE
+#
+#   Copyright (c) 2009 Filippo Giunchedi <filippo@esaurito.net>
+#   Copyright (c) 2011 The Board of Trustees of the Leland Stanford Junior University
+#   Copyright (c) 2011 Russ Allbery <rra@stanford.edu>
+#   Copyright (c) 2013 Bastien ROUCARIES <roucaries.bastien+autoconf@gmail.com>
+#
+#   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 7
+
+# list of flag to save
+AC_DEFUN([_AX_SAVE_FLAGS_LIST],[dnl
+[CCASFLAGS],dnl
+[CFLAGS],dnl
+[CPPFLAGS],dnl
+[CXXFLAGS],dnl
+[ERLCFLAGS],dnl
+[FCFLAGS],dnl
+[FCLIBS],dnl
+[FFLAGS],dnl
+[FLIBS],dnl
+[GCJFLAGS],dnl
+[JAVACFLAGS],dnl
+[LDFLAGS],dnl
+[LIBS],dnl
+[OBJCFLAGS],dnl
+[OBJCXXFLAGS],dnl
+[UPCFLAGS],dnl
+[VALAFLAGS]dnl
+])
+
+# save one flag in name space
+AC_DEFUN([_AX_SAVE_ONE_FLAG],[
+  AS_VAR_PUSHDEF([_ax_save_flag_var], [$2[]_$1[]_ax_save_flags])
+  AS_VAR_COPY(_ax_save_flag_var, $2[])
+  AS_VAR_POPDEF([_ax_save_flag_var])
+])
+
+AC_DEFUN([AX_SAVE_FLAGS],[dnl
+   m4_foreach([FLAG], dnl
+	      [_AX_SAVE_FLAGS_LIST()], dnl
+	      [_AX_SAVE_ONE_FLAG([$1],FLAG)])
+])
@@ -0,0 +1,124 @@
+# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+# ===========================================================================
+# https://github.com/BrianAker/ddm4
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_UUID()
+#   AX_UUID_GENERATE_TIME()
+#   AX_UUID_GENERATE_TIME_SAFE()
+#
+# DESCRIPTION
+#
+#   Check for uuid, uuid_generate_time, and uuid_generate_time_safe support.
+#
+# LICENSE
+#
+#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
+#
+#   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 7
+
+AC_DEFUN([AX_UUID],
+    [AC_PREREQ([2.63])dnl
+    AC_CHECK_HEADER([uuid/uuid.h],[
+
+      AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_is_required],
+        [AC_LANG_PUSH([C])
+        AC_RUN_IFELSE(
+          [AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+            uuid_t out;
+            uuid_generate(out);
+            ])],
+          [ax_cv_libuuid_is_required=no],
+          [ax_cv_libuuid_is_required=yes],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        ])
+
+      AS_IF([test "$ax_cv_libuuid_is_required" = yes],
+        [AC_CACHE_CHECK([check to see if -luuid is needed], [ax_cv_libuuid_works],
+          [AX_SAVE_FLAGS
+          LIBS="-luuid $LIBS"
+          AC_LANG_PUSH([C])
+          AC_RUN_IFELSE(
+            [AC_LANG_PROGRAM([#include <uuid/uuid.h>], [
+              uuid_t out;
+              uuid_generate(out);
+              ])],
+            [ax_cv_libuuid_works=yes],
+            [ax_cv_libuuid_works=no],
+            [AC_MSG_WARN([test program execution failed])])
+          AC_LANG_POP
+          AX_RESTORE_FLAGS])
+        ])
+
+      AS_IF([test "$ax_cv_libuuid_is_required" = yes],
+          [AS_IF([test "$ax_cv_libuuid_works" = yes],[ax_libuuid=yes])],
+          [ax_libuuid=yes])
+      ],[ax_libuuid=no])
+
+      AS_IF([test "x$ax_libuuid" = xyes],
+          [AC_DEFINE([HAVE_UUID_UUID_H],[1],[Have uuid/uuid.h])
+          AS_IF([test "x$ax_cv_libuuid_is_required" = xyes],[ LIBUUID_LIB='-luuid' ])],
+          [AC_DEFINE([HAVE_UUID_UUID_H],[0],[Have uuid/uuid.h])
+          ])
+
+  AC_SUBST([LIBUUID_LIB])
+  AM_CONDITIONAL([HAVE_LIBUUID],[test "x$ax_libuuid" = xyes])
+  ])
+
+  AC_DEFUN([AX_UUID_GENERATE_TIME],
+      [AC_PREREQ([2.63])dnl
+      AC_REQUIRE([AX_UUID])dnl
+      AC_CACHE_CHECK([for uuid_generate_time],
+        [ax_cv_uuid_generate_time],
+        [AX_SAVE_FLAGS
+        LIBS="$LIBUUID_LIB $LIBS"
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>],[
+            uuid_t out;
+            uuid_generate_time(out);
+            ])],
+          [ax_cv_uuid_generate_time=yes],
+          [ax_cv_uuid_generate_time=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        AX_RESTORE_FLAGS
+        ])
+
+      AS_IF([test "$ax_cv_uuid_generate_time" = yes],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[1],[Define if uuid_generate_time is present in uuid/uuid.h.])],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[0],[Define if uuid_generate_time is present in uuid/uuid.h.])])
+      ])
+
+  AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE],
+      [AC_PREREQ([2.63])dnl
+      AC_REQUIRE([AX_UUID])dnl
+      AC_CACHE_CHECK([for uuid_generate_time_safe],
+        [ax_cv_uuid_generate_time_safe],
+        [AX_SAVE_FLAGS
+        LIBS="$LIBUUID_LIB $LIBS"
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>],[
+            uuid_t out;
+            uuid_generate_time_safe(out);
+            ])],
+          [ax_cv_uuid_generate_time_safe=yes],
+          [ax_cv_uuid_generate_time_safe=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        AX_RESTORE_FLAGS
+        ])
+
+      AS_IF([test "$ax_cv_uuid_generate_time_safe" = yes],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[1],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME_SAFE],[0],[Define if uuid_generate_time_safe is present in uuid/uuid.h.])])
+      ])
@@ -0,0 +1,75 @@
+# ===========================================================================
+#      http://
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_VCS_CHECKOUT
+#
+# DESCRIPTION
+#
+#   Discover whether or not we are operating with a tree which
+#   has been checked out of a version control system.
+#
+#
+# LICENSE
+#
+#  Copyright (C) 2012 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.
+
+#serial 6
+
+AC_DEFUN([AX_VCS_SYSTEM],
+    [AC_PREREQ([2.63])dnl
+    AC_CACHE_CHECK([for vcs system], [ac_cv_vcs_system],
+      [ac_cv_vcs_system="none"
+      AS_IF([test -d ".bzr"],[ac_cv_vcs_system="bazaar"])
+      AS_IF([test -d ".svn"],[ac_cv_vcs_system="svn"])
+      AS_IF([test -d ".hg"],[ac_cv_vcs_system="mercurial"])
+      AS_IF([test -d ".git"],[ac_cv_vcs_system="git"])
+      ])
+    AC_DEFINE_UNQUOTED([VCS_SYSTEM],["$ac_cv_vcs_system"],[VCS system])
+    ])
+
+AC_DEFUN([AX_VCS_CHECKOUT],
+    [AC_PREREQ([2.63])dnl
+    AC_REQUIRE([AX_VCS_SYSTEM])
+    AC_CACHE_CHECK([for vcs checkout],[ac_cv_vcs_checkout],
+      [AS_IF([test "x$ac_cv_vcs_system" != "xnone"],
+        [ac_cv_vcs_checkout=yes],
+        [ac_cv_vcs_checkout=no])
+      ])
+
+    AM_CONDITIONAL([IS_VCS_CHECKOUT],[test "x$ac_cv_vcs_checkout" = "xyes"])
+    AS_IF([test "x$ac_cv_vcs_checkout" = "xyes"],
+      [AC_DEFINE([VCS_CHECKOUT],[1],[Define if the code was built from VCS.])],
+      [AC_DEFINE([VCS_CHECKOUT],[0],[Define if the code was built from VCS.])])
+    ])
@@ -0,0 +1,70 @@
+# ===========================================================================
+#       http://www.gnu.org/software/autoconf-archive/ax_with_prog.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH])
+#
+# DESCRIPTION
+#
+#   Locates an installed program binary, placing the result in the precious
+#   variable VARIABLE. Accepts a present VARIABLE, then --with-program, and
+#   failing that searches for program in the given path (which defaults to
+#   the system path). If program is found, VARIABLE is set to the full path
+#   of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND
+#   if provided, unchanged otherwise.
+#
+#   A typical example could be the following one:
+#
+#     AX_WITH_PROG(PERL,perl)
+#
+#   NOTE: This macro is based upon the original AX_WITH_PYTHON macro from
+#   Dustin J. Mitchell <dustin@cs.uchicago.edu>.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
+#   Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
+#
+#   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 16
+
+AC_DEFUN([AX_WITH_PROG],[
+    AC_PREREQ([2.61])
+
+    pushdef([VARIABLE],$1)
+    pushdef([EXECUTABLE],$2)
+    pushdef([VALUE_IF_NOT_FOUND],$3)
+    pushdef([PATH_PROG],$4)
+
+    AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable)
+
+    AS_IF(test -z "$VARIABLE",[
+        AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
+        AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[PATH]]]],absolute path to EXECUTABLE executable), [
+            AS_IF([test "$withval" != yes && test "$withval" != no],[
+                VARIABLE="$withval"
+                AC_MSG_RESULT($VARIABLE)
+            ],[
+                VARIABLE=""
+                AC_MSG_RESULT([no])
+                AS_IF([test "$withval" != no], [
+                  AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
+                ])
+            ])
+        ],[
+            AC_MSG_RESULT([no])
+            AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
+        ])
+    ])
+
+    popdef([PATH_PROG])
+    popdef([VALUE_IF_NOT_FOUND])
+    popdef([EXECUTABLE])
+    popdef([VARIABLE])
+])
@@ -0,0 +1,32 @@
+AC_DEFUN([CONFIG_EXTRA], [
+
+AH_TOP([
+#pragma once
+
+/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
+#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
+#error "You should include mem_config.h as your first include file"
+#endif
+
+])
+
+AH_BOTTOM([
+
+#ifndef __STDC_FORMAT_MACROS
+#  define __STDC_FORMAT_MACROS
+#endif
+ 
+#if defined(__cplusplus) 
+#  include CINTTYPES_H 
+#else 
+#  include <inttypes.h> 
+#endif
+
+#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
+# define HAVE_ULONG 1
+typedef unsigned long int ulong;
+#endif 
+
+])
+
+])dnl CONFIG_EXTRA
@@ -1,19 +1,19 @@
 AC_DEFUN([DETECT_BYTEORDER],
-[
+    [
     AC_REQUIRE([AC_C_BIGENDIAN])
+    AC_LANG_PUSH([C++])
     AC_CACHE_CHECK([for htonll], [ac_cv_have_htonll],
-        [AC_TRY_LINK([
-#include <sys/types.h>
+      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+          [#include <sys/types.h>
 #include <netinet/in.h>
 #include <inttypes.h>
-                        ], [
-return htonll(0);
-                        ],
-                        [ ac_cv_have_htonll=yes ],
-                        [ ac_cv_have_htonll=no ])
-        ])
+      ], [ return htonll(0) ])],
+        [ ac_cv_have_htonll=yes ],
+        [ ac_cv_have_htonll=no ])
+      ])
+    AC_LANG_POP()
     AS_IF([test "x$ac_cv_have_htonll" = "xyes"],[
-          AC_DEFINE([HAVE_HTONLL], [1], [Have ntohll])])
+      AC_DEFINE([HAVE_HTONLL], [1], [Have ntohll])])
 
     AM_CONDITIONAL([BUILD_BYTEORDER],[test "x$ac_cv_have_htonll" = "xno"])
-])
+    ])
@@ -1,28 +0,0 @@
-#
-# Some platforms define EWOULDBLOCK == EAGAIN, causing our switch for error
-# codes to be illegal (POSIX.1-2001 allows both return codes from recv, so
-# we need to test both if they differ...)
-#
-AC_DEFUN([DETECT_EAGAIN],
-[
-    AC_CACHE_CHECK([if EWOULDBLOCK == EAGAIN],[av_cv_eagain_ewouldblock],
-        [AC_TRY_COMPILE([
-#include <errno.h>
-                        ], [
-int error = EAGAIN;
-switch (error) 
-{
-  case EAGAIN:
-  case EWOULDBLOCK:
-       error = 1;
-       break;
-  default:
-       error = 0;
-}
-                        ],
-                        [ av_cv_eagain_ewouldblock=no ],
-                        [ av_cv_eagain_ewouldblock=yes ])
-        ])
-    AS_IF([test "x$ac_cv_eagain_ewouldblock" = "xyes"],[
-          AC_DEFINE([USE_EAGAIN], [1], [Define to true if you need to test for eagain])])
-])
@@ -1,16 +0,0 @@
-AC_DEFUN([ENABLE_UTILLIB],[
-  AC_ARG_ENABLE([utils],
-    [AS_HELP_STRING([--disable-utils],
-       [Disable libmemcachedutils @<:@default=on@:>@])],
-    [BUILD_UTILLIB="$enableval"],
-    [BUILD_UTILLIB="yes"])
-
-  if test "x$BUILD_UTILLIB" = "xyes"; then
-    if test x"$acx_pthread_ok" != "xyes"; then
-      AC_MSG_ERROR([Sorry you need POSIX thread library to build libmemcachedutil.])
-    fi
-    AC_DEFINE([HAVE_LIBMEMCACHEDUTIL], [1], [Enables libmemcachedutil Support])
-  fi
-
-  AM_CONDITIONAL([BUILD_LIBMEMCACHEDUTIL],[test "x$BUILD_UTILLIB" = "xyes"])
-])
@@ -0,0 +1,16 @@
+dnl ---------------------------------------------------------------------------
+dnl Macro: ENABLE_FNV64_HASH
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([ENABLE_FNV64_HASH],
+  [AC_ARG_ENABLE([fnv64_hash],
+    [AS_HELP_STRING([--disable-fnv64_hash],
+      [build with support for fnv64 hashing. @<:@default=on@:>@])],
+    [ac_cv_enable_fnv64_hash=no],
+    [ac_cv_enable_fnv64_hash=yes])
+
+  AS_IF([test "$ac_cv_enable_fnv64_hash" = "yes"],
+        [AC_DEFINE([HAVE_FNV64_HASH], [1], [Enables fnv64 hashing support])])
+])
+dnl ---------------------------------------------------------------------------
+dnl End Macro: ENABLE_FNV64_HASH
+dnl ---------------------------------------------------------------------------
@@ -0,0 +1,9 @@
+# serial 1
+AC_DEFUN([CHECK_FOR_GEARMAND],
+    [AX_WITH_PROG([GEARMAND_BINARY],[gearmand])
+    AS_IF([test -f "$ac_cv_path_GEARMAND_BINARY"],
+      [AC_DEFINE([HAVE_GEARMAND_BINARY],[1],[If Gearmand binary is available])
+      AC_DEFINE_UNQUOTED([GEARMAND_BINARY], "$ac_cv_path_GEARMAND_BINARY", [Name of the gearmand binary used in make test])],
+      [AC_DEFINE([HAVE_GEARMAND_BINARY],[0],[If Gearmand binary is available])
+      AC_DEFINE([GEARMAND_BINARY],[0],[Name of the gearmand binary used in make test])])
+    ])
@@ -1,379 +0,0 @@
-# gettext.m4 serial 60 (gettext-0.17)
-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
-
-dnl Macro to add for using GNU gettext.
-
-dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
-dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
-dnl    default (if it is not specified or empty) is 'no-libtool'.
-dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
-dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
-dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
-dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
-dnl    depending on --{enable,disable}-{shared,static} and on the presence of
-dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
-dnl    $(top_builddir)/intl/libintl.a will be created.
-dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
-dnl    implementations (in libc or libintl) without the ngettext() function
-dnl    will be ignored.  If NEEDSYMBOL is specified and is
-dnl    'need-formatstring-macros', then GNU gettext implementations that don't
-dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
-dnl INTLDIR is used to find the intl libraries.  If empty,
-dnl    the value `$(top_builddir)/intl/' is used.
-dnl
-dnl The result of the configuration is one of three cases:
-dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
-dnl    and used.
-dnl    Catalog format: GNU --> install in $(datadir)
-dnl    Catalog extension: .mo after installation, .gmo in source tree
-dnl 2) GNU gettext has been found in the system's C library.
-dnl    Catalog format: GNU --> install in $(datadir)
-dnl    Catalog extension: .mo after installation, .gmo in source tree
-dnl 3) No internationalization, always use English msgid.
-dnl    Catalog format: none
-dnl    Catalog extension: none
-dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
-dnl The use of .gmo is historical (it was needed to avoid overwriting the
-dnl GNU format catalogs when building on a platform with an X/Open gettext),
-dnl but we keep it in order not to force irrelevant filename changes on the
-dnl maintainers.
-dnl
-AC_DEFUN([AM_GNU_GETTEXT],
-[
-  dnl Argument checking.
-  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
-    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
-])])])])])
-  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
-    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
-])])])])
-  dnl Hardcode this, because the previous ifdef just wasn't working
-  define([gt_included_intl],[no])
-  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
-  gt_NEEDS_INIT
-  AM_GNU_GETTEXT_NEED([$2])
-
-  AC_REQUIRE([AM_PO_SUBDIRS])dnl
-  dnl ifelse(gt_included_intl, yes, [
-  dnl   AC_REQUIRE([AM_INTL_SUBDIR])dnl
-  dnl ])
-
-  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-
-  dnl Sometimes libintl requires libiconv, so first search for libiconv.
-  dnl Ideally we would do this search only after the
-  dnl      if test "$USE_NLS" = "yes"; then
-  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
-  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
-  dnl the configure script would need to contain the same shell code
-  dnl again, outside any 'if'. There are two solutions:
-  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
-  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
-  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
-  dnl documented, we avoid it.
-  ifelse(gt_included_intl, yes, , [
-    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-  ])
-
-  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
-  gt_INTL_MACOSX
-
-  dnl Set USE_NLS.
-  AC_REQUIRE([AM_NLS])
-
-  ifelse(gt_included_intl, yes, [
-    BUILD_INCLUDED_LIBINTL=no
-    USE_INCLUDED_LIBINTL=no
-  ])
-  LIBINTL=
-  LTLIBINTL=
-  POSUB=
-
-  dnl Add a version number to the cache macros.
-  case " $gt_needs " in
-    *" need-formatstring-macros "*) gt_api_version=3 ;;
-    *" need-ngettext "*) gt_api_version=2 ;;
-    *) gt_api_version=1 ;;
-  esac
-  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
-  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
-
-  dnl If we use NLS figure out what method
-  if test "$USE_NLS" = "yes"; then
-    gt_use_preinstalled_gnugettext=no
-    ifelse(gt_included_intl, yes, [
-      AC_MSG_CHECKING([whether included gettext is requested])
-      AC_ARG_WITH(included-gettext,
-        [  --with-included-gettext use the GNU gettext library included here],
-        nls_cv_force_use_gnu_gettext=$withval,
-        nls_cv_force_use_gnu_gettext=no)
-      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-    ])
-        dnl User does not insist on using GNU NLS library.  Figure out what
-        dnl to use.  If GNU gettext is available we use this.  Else we have
-        dnl to fall back to GNU NLS library.
-
-        if test $gt_api_version -ge 3; then
-          gt_revision_test_code='
-#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-#endif
-changequote(,)dnl
-typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
-changequote([,])dnl
-'
-        else
-          gt_revision_test_code=
-        fi
-        if test $gt_api_version -ge 2; then
-          gt_expression_test_code=' + * ngettext ("", "", 0)'
-        else
-          gt_expression_test_code=
-        fi
-
-        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
-         [AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern int *_nl_domain_bindings;],
-            [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
-            [eval "$gt_func_gnugettext_libc=yes"],
-            [eval "$gt_func_gnugettext_libc=no"])])
-
-        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
-          dnl Sometimes libintl requires libiconv, so first search for libiconv.
-          ifelse(gt_included_intl, yes, , [
-            AM_ICONV_LINK
-          ])
-          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
-          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
-          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
-          dnl even if libiconv doesn't exist.
-          AC_LIB_LINKFLAGS_BODY([intl])
-          AC_CACHE_CHECK([for GNU gettext in libintl],
-            [$gt_func_gnugettext_libintl],
-           [gt_save_CPPFLAGS="$CPPFLAGS"
-            CPPFLAGS="$CPPFLAGS $INCINTL"
-            gt_save_LIBS="$LIBS"
-            LIBS="$LIBS $LIBINTL"
-            dnl Now see whether libintl exists and does not depend on libiconv.
-            AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
-              [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-              [eval "$gt_func_gnugettext_libintl=yes"],
-              [eval "$gt_func_gnugettext_libintl=no"])
-            dnl Now see whether libintl exists and depends on libiconv.
-            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
-              LIBS="$LIBS $LIBICONV"
-              AC_TRY_LINK([#include <libintl.h>
-$gt_revision_test_code
-extern int _nl_msg_cat_cntr;
-extern
-#ifdef __cplusplus
-"C"
-#endif
-const char *_nl_expand_alias (const char *);],
-                [bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
-               [LIBINTL="$LIBINTL $LIBICONV"
-                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
-                eval "$gt_func_gnugettext_libintl=yes"
-               ])
-            fi
-            CPPFLAGS="$gt_save_CPPFLAGS"
-            LIBS="$gt_save_LIBS"])
-        fi
-
-        dnl If an already present or preinstalled GNU gettext() is found,
-        dnl use it.  But if this macro is used in GNU gettext, and GNU
-        dnl gettext is already preinstalled in libintl, we update this
-        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
-        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
-           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
-                && test "$PACKAGE" != gettext-runtime \
-                && test "$PACKAGE" != gettext-tools; }; then
-          gt_use_preinstalled_gnugettext=yes
-        else
-          dnl Reset the values set by searching for libintl.
-          LIBINTL=
-          LTLIBINTL=
-          INCINTL=
-        fi
-
-    ifelse(gt_included_intl, yes, [
-        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
-          dnl GNU gettext is not found in the C library.
-          dnl Fall back on included GNU gettext library.
-          nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Mark actions used to generate GNU NLS library.
-        BUILD_INCLUDED_LIBINTL=yes
-        USE_INCLUDED_LIBINTL=yes
-        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
-        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
-        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
-      fi
-
-      CATOBJEXT=
-      if test "$gt_use_preinstalled_gnugettext" = "yes" \
-         || test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Mark actions to use GNU gettext tools.
-        CATOBJEXT=.gmo
-      fi
-    ])
-
-    if test -n "$INTL_MACOSX_LIBS"; then
-      if test "$gt_use_preinstalled_gnugettext" = "yes" \
-         || test "$nls_cv_use_gnu_gettext" = "yes"; then
-        dnl Some extra flags are needed during linking.
-        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
-        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
-      fi
-    fi
-
-    if test "$gt_use_preinstalled_gnugettext" = "yes" \
-       || test "$nls_cv_use_gnu_gettext" = "yes"; then
-      AC_DEFINE(ENABLE_NLS, 1,
-        [Define to 1 if translation of program messages to the user's native language
-   is requested.])
-    else
-      USE_NLS=no
-    fi
-  fi
-
-  AC_MSG_CHECKING([whether to use NLS])
-  AC_MSG_RESULT([$USE_NLS])
-  if test "$USE_NLS" = "yes"; then
-    AC_MSG_CHECKING([where the gettext function comes from])
-    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
-        gt_source="external libintl"
-      else
-        gt_source="libc"
-      fi
-    else
-      gt_source="included intl directory"
-    fi
-    AC_MSG_RESULT([$gt_source])
-  fi
-
-  if test "$USE_NLS" = "yes"; then
-
-    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
-      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
-        AC_MSG_CHECKING([how to link with libintl])
-        AC_MSG_RESULT([$LIBINTL])
-        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
-      fi
-
-      dnl For backward compatibility. Some packages may be using this.
-      AC_DEFINE(HAVE_GETTEXT, 1,
-       [Define if the GNU gettext() function is already present or preinstalled.])
-      AC_DEFINE(HAVE_DCGETTEXT, 1,
-       [Define if the GNU dcgettext() function is already present or preinstalled.])
-    fi
-
-    dnl We need to process the po/ directory.
-    POSUB=po
-  fi
-
-  ifelse(gt_included_intl, yes, [
-    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
-    dnl to 'yes' because some of the testsuite requires it.
-    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
-      BUILD_INCLUDED_LIBINTL=yes
-    fi
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(BUILD_INCLUDED_LIBINTL)
-    AC_SUBST(USE_INCLUDED_LIBINTL)
-    AC_SUBST(CATOBJEXT)
-
-    dnl For backward compatibility. Some configure.ins may be using this.
-    nls_cv_header_intl=
-    nls_cv_header_libgt=
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    DATADIRNAME=share
-    AC_SUBST(DATADIRNAME)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    INSTOBJEXT=.mo
-    AC_SUBST(INSTOBJEXT)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    GENCAT=gencat
-    AC_SUBST(GENCAT)
-
-    dnl For backward compatibility. Some Makefiles may be using this.
-    INTLOBJS=
-    if test "$USE_INCLUDED_LIBINTL" = yes; then
-      INTLOBJS="\$(GETTOBJS)"
-    fi
-    AC_SUBST(INTLOBJS)
-
-    dnl Enable libtool support if the surrounding package wishes it.
-    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
-    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
-  ])
-
-  dnl For backward compatibility. Some Makefiles may be using this.
-  INTLLIBS="$LIBINTL"
-  AC_SUBST(INTLLIBS)
-
-  dnl Make all documented variables known to autoconf.
-  AC_SUBST(LIBINTL)
-  AC_SUBST(LTLIBINTL)
-  AC_SUBST(POSUB)
-])
-
-
-dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
-m4_define([gt_NEEDS_INIT],
-[
-  m4_divert_text([DEFAULTS], [gt_needs=])
-  m4_define([gt_NEEDS_INIT], [])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
-AC_DEFUN([AM_GNU_GETTEXT_NEED],
-[
-  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
-])
-
-
-dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
@@ -0,0 +1,97 @@
+# ===========================================================================
+#     http://tangent.org/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_CINTTYPES()
+#
+# DESCRIPTION
+#
+#  Example:
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker` <brian@tangent.org>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 3
+
+AC_DEFUN([AX_CXX_CINTTYPES], [
+    AC_REQUIRE([AC_PROG_CXX])
+    AC_REQUIRE([AC_PROG_CXXCPP])
+    AC_REQUIRE([AX_CXX_CSTDINT])
+
+    AC_CACHE_CHECK([for location of cinttypes], [ac_cv_cxx_cinttypes], [
+      AX_SAVE_FLAGS
+      CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
+      AC_LANG_PUSH([C++])
+
+      AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([#include <cinttypes>], [
+          uint32_t foo= UINT32_C(1); 
+          ])],
+        [ac_cxx_cinttypes_cinttypes="<cinttypes>"])
+
+# Look for tr1/cinttypes
+      AS_IF([test -z "$ac_cxx_cinttypes_cinttypes"],[
+            AC_COMPILE_IFELSE([
+                              AC_LANG_PROGRAM([#include <tr1/cinttypes>], [
+                                              uint32_t foo= UINT32_C(1);
+                                              ])],
+                              [ac_cxx_cinttypes_tr1_cinttypes="<tr1/cinttypes>"])
+
+# Look for boost/cinttypes.hpp
+            AS_IF([test -z "$ac_cxx_cinttypes_tr1_cinttypes"],[
+                  AC_COMPILE_IFELSE([
+                                    AC_LANG_PROGRAM([#include <boost/cinttypes.hpp>], [
+                                                    uint32_t foo= UINT32_C(1); 
+                                                    ])],
+                                    [ac_cxx_cinttypes_boost_cinttypes_hpp="<boost/cinttypes.hpp>"])
+                  ])
+            ])
+
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
+
+      AS_IF([test -n "$ac_cxx_cinttypes_cinttypes"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_cinttypes],
+          [test -n "$ac_cxx_cinttypes_tr1_cinttypes"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_tr1_cinttypes],
+          [test -n "$ac_cxx_cinttypes_boost_cinttypes_hpp"], [ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_boost_cinttypes_hpp])
+  ])
+
+  AS_IF([ test -n "$ac_cv_cxx_cinttypes"], [
+      AC_MSG_RESULT([$ac_cv_cxx_cinttypes])
+      ],[
+      ac_cv_cxx_cinttypes="<inttypes.h>"
+      AC_MSG_WARN([Could not find a cinttypes header.])
+      AC_MSG_RESULT([$ac_cv_cxx_cinttypes])
+      ])
+
+  AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++])
+  AC_DEFINE_UNQUOTED([CINTTYPES_H],[$ac_cv_cxx_cinttypes],[the location of <cinttypes>])
+  ])
@@ -0,0 +1,89 @@
+# ===========================================================================
+#     http://tangent.org/
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CXX_CSTDINT()
+#
+# DESCRIPTION
+#
+#  Example:
+#
+# LICENSE
+#
+#   Copyright (c) 2012 Brian Aker` <brian@tangent.org>
+#
+#   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 <http://www.gnu.org/licenses/>.
+#
+#   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 3
+
+
+AC_DEFUN([AX_CXX_CSTDINT], [
+    AC_REQUIRE([AC_PROG_CXX])
+    AC_REQUIRE([AC_PROG_CXXCPP])
+
+    AC_CACHE_CHECK([for location of cstdint], [ac_cv_cxx_cstdint], [
+      AC_LANG_PUSH([C++])
+      AX_SAVE_FLAGS
+      CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
+
+      AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([#include <cstdint>], [
+        uint32_t t 
+        ])],
+        [ac_cxx_cstdint_cstdint="<cstdint>"])
+
+      AS_IF([test -z "$ac_cxx_cstdint_cstdint"],[
+            AC_COMPILE_IFELSE([
+                              AC_LANG_PROGRAM([#include <tr1/cstdint>], [ uint32_t t ])],
+                              [ac_cxx_cstdint_tr1_cstdint="<tr1/cstdint>"])
+
+            AS_IF([test -z "$ac_cxx_cstdint_tr1_cstdint"],[
+                  AC_COMPILE_IFELSE([
+                                    AC_LANG_PROGRAM([#include <boost/cstdint.hpp>], [ uint32_t t ])],
+                                    [ac_cxx_cstdint_boost_cstdint_hpp="<boost/cstdint.hpp>"])
+                  ])
+            ])
+
+      AC_LANG_POP
+      AX_RESTORE_FLAGS
+
+      AS_IF([test -n "$ac_cxx_cstdint_cstdint"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_cstdint],
+        [test -n "$ac_cxx_cstdint_tr1_cstdint"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_tr1_cstdint],
+        [test -n "$ac_cxx_cstdint_boost_cstdint_hpp"], [ac_cv_cxx_cstdint=$ac_cxx_cstdint_boost_cstdint_hpp])
+      ])
+
+  AS_IF([test -n "$ac_cv_cxx_cstdint"], [AC_MSG_RESULT([$ac_cv_cxx_cstdint])], [
+      ac_cv_cxx_cstdint="<stdint.h>"
+      AC_MSG_WARN([Could not find a cstdint header.])
+      AC_MSG_RESULT([$ac_cv_cxx_cstdint])
+      ])
+
+AC_DEFINE_UNQUOTED([CSTDINT_H],[$ac_cv_cxx_cstdint], [the location of <cstdint>])
+
+  ])
@@ -4,7 +4,7 @@ dnl ---------------------------------------------------------------------------
 AC_DEFUN([ENABLE_HSIEH_HASH],
   [AC_ARG_ENABLE([hsieh_hash],
     [AS_HELP_STRING([--enable-hsieh_hash],
-      [build with support for hsieh hashing. @<:default=off@:>@])],
+      [build with support for hsieh hashing. @<:@default=off@:>@])],
     [ac_cv_enable_hsieh_hash=yes],
     [ac_cv_enable_hsieh_hash=no])
 
@@ -1,180 +0,0 @@
-# iconv.m4 serial AM6 (gettext-0.17)
-dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
-[
-  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([iconv])
-])
-
-AC_DEFUN([AM_ICONV_LINK],
-[
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-
-  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
-  dnl accordingly.
-  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
-
-  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed libiconv and not disabled its use
-  dnl via --without-libiconv-prefix, he wants to use it. The first
-  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
-  am_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
-  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
-      am_cv_func_iconv=yes)
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $LIBICONV"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-    fi
-  ])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
-      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
-      am_save_LIBS="$LIBS"
-      if test $am_cv_lib_iconv = yes; then
-        LIBS="$LIBS $LIBICONV"
-      fi
-      AC_TRY_RUN([
-#include <iconv.h>
-#include <string.h>
-int main ()
-{
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
-  {
-    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
-    if (cd_utf8_to_88591 != (iconv_t)(-1))
-      {
-        static const char input[] = "\342\202\254"; /* EURO SIGN */
-        char buf[10];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_utf8_to_88591,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          return 1;
-      }
-  }
-#if 0 /* This bug could be worked around by the caller.  */
-  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
-        char buf[50];
-        const char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_88591_to_utf8,
-                            (char **) &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if ((int)res > 0)
-          return 1;
-      }
-  }
-#endif
-  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
-     provided.  */
-  if (/* Try standardized names.  */
-      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
-      /* Try IRIX, OSF/1 names.  */
-      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
-      /* Try AIX names.  */
-      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
-      /* Try HP-UX names.  */
-      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
-    return 1;
-  return 0;
-}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
-        [case "$host_os" in
-           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
-           *)            am_cv_func_iconv_works="guessing yes" ;;
-         esac])
-      LIBS="$am_save_LIBS"
-    ])
-    case "$am_cv_func_iconv_works" in
-      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
-      *)   am_func_iconv=yes ;;
-    esac
-  else
-    am_func_iconv=no am_cv_lib_iconv=no
-  fi
-  if test "$am_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1,
-      [Define if you have the iconv() function and it works.])
-  fi
-  if test "$am_cv_lib_iconv" = yes; then
-    AC_MSG_CHECKING([how to link with libiconv])
-    AC_MSG_RESULT([$LIBICONV])
-  else
-    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
-    dnl either.
-    CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-    LTLIBICONV=
-  fi
-  AC_SUBST(LIBICONV)
-  AC_SUBST(LTLIBICONV)
-])
-
-AC_DEFUN([AM_ICONV],
-[
-  AM_ICONV_LINK
-  if test "$am_cv_func_iconv" = yes; then
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-])
@@ -0,0 +1,6 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+
+dist_aclocal_DATA+= m4/ax_libmemcached.m4
@@ -1,110 +0,0 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  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.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path 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
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
-      *)
-	test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
@@ -1,767 +0,0 @@
-# lib-link.m4 serial 18 (gettext-0.18)
-dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ([2.54])
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  pushdef([Name],[translit([$1],[./-], [___])])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-    AC_LIB_LINKFLAGS_BODY([$1], [$2])
-    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
-  ])
-  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  AC_SUBST([LIB]NAME[_PREFIX])
-  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-  dnl results of this search when this library appears as a dependency.
-  HAVE_LIB[]NAME=yes
-  popdef([NAME])
-  popdef([Name])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [system])
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  pushdef([Name],[translit([$1],[./-], [___])])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
-  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([$1], [$2], [$5])
-
-  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed lib[]Name and not disabled its use
-  dnl via --without-lib[]Name-prefix, he wants to use it.
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
-  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-    LIBS="$ac_save_LIBS"
-  ])
-  if test "$ac_cv_lib[]Name" = yes; then
-    HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-    AC_MSG_CHECKING([how to link with lib[]$1])
-    AC_MSG_RESULT([$LIB[]NAME])
-  else
-    HAVE_LIB[]NAME=no
-    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-    dnl $INC[]NAME either.
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    LIB[]NAME=
-    LTLIB[]NAME=
-    LIB[]NAME[]_PREFIX=
-  fi
-  AC_SUBST([HAVE_LIB]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  AC_SUBST([LIB]NAME[_PREFIX])
-  popdef([NAME])
-  popdef([Name])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl   acl_libext,
-dnl   acl_shlibext,
-dnl   acl_hardcode_libdir_flag_spec,
-dnl   acl_hardcode_libdir_separator,
-dnl   acl_hardcode_direct,
-dnl   acl_hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
-  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
-  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
-  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
-  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-  ])
-  wl="$acl_cv_wl"
-  acl_libext="$acl_cv_libext"
-  acl_shlibext="$acl_cv_shlibext"
-  acl_libname_spec="$acl_cv_libname_spec"
-  acl_library_names_spec="$acl_cv_library_names_spec"
-  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  acl_hardcode_direct="$acl_cv_hardcode_direct"
-  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-  dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE([rpath],
-    [  --disable-rpath         do not hardcode runtime library paths],
-    :, enable_rpath=yes)
-])
-
-dnl AC_LIB_FROMPACKAGE(name, package)
-dnl declares that libname comes from the given package. The configure file
-dnl will then not have a --with-libname-prefix option but a
-dnl --with-package-prefix option. Several libraries can come from the same
-dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
-dnl macro call that searches for libname.
-AC_DEFUN([AC_LIB_FROMPACKAGE],
-[
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  define([acl_frompackage_]NAME, [$2])
-  popdef([NAME])
-  pushdef([PACK],[$2])
-  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
-                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  define([acl_libsinpackage_]PACKUP,
-    m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
-  popdef([PACKUP])
-  popdef([PACK])
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies, system]) searches for
-dnl libname and the libraries corresponding to explicit and implicit
-dnl dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-dnl If system==system, -isystem is used instead of -I
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
-  pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
-                                  [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
-  dnl Autoconf >= 2.61 supports dots in --with options.
-  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  if test "x$GCC" = "xyes" -a "x$3" = "xsystem"
-  then
-    i_system="-isystem "
-  else
-    i_system="-I"
-  fi
-
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_ARG_WITH(P_A_C_K[-prefix],
-[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
-  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && ! test -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
-])
-  dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
-  LIB[]NAME=
-  LTLIB[]NAME=
-  INC[]NAME=
-  LIB[]NAME[]_PREFIX=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='$1 $2'
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-        dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-          else
-            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-            dnl that this library doesn't exist. So just drop it.
-            :
-          fi
-        else
-          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-          dnl and the already constructed $LIBNAME/$LTLIBNAME.
-          found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-            dnl The same code as in the loop below:
-            dnl First look for a shared library.
-            if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-            dnl Then look for a static library.
-            if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIB[]NAME; do
-              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  dnl First look for a shared library.
-                  if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                  dnl Then look for a static library.
-                  if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-            dnl Found the library.
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-              dnl Linking with a shared library. We attempt to hardcode its
-              dnl directory into the executable's runpath, unless it's the
-              dnl standard /usr/lib.
-              if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                dnl No hardcoding is needed.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-              else
-                dnl Use an explicit option to hardcode DIR into the resulting
-                dnl binary.
-                dnl Potentially add DIR to ltrpathdirs.
-                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$acl_hardcode_direct" = yes; then
-                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-                  dnl resulting binary.
-                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                    dnl Use an explicit option to hardcode DIR into the resulting
-                    dnl binary.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    dnl Potentially add DIR to rpathdirs.
-                    dnl The rpathdirs will be appended to $LIBNAME at the end.
-                    haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                    dnl Rely on "-L$found_dir".
-                    dnl But don't add it if it's already contained in the LDFLAGS
-                    dnl or the already constructed $LIBNAME
-                    haveit=
-                    for x in $LDFLAGS $LIB[]NAME; do
-                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    else
-                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
-                      dnl here, because this doesn't fit in flags passed to the
-                      dnl compiler. So give up. No hardcoding. This affects only
-                      dnl very old systems.
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                dnl Linking with a static library.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-              else
-                dnl We shouldn't come here, but anyway it's good to have a
-                dnl fallback.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-              fi
-            fi
-            dnl Assume the include files are nearby.
-            additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = '$1'; then
-                  LIB[]NAME[]_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = '$1'; then
-                  LIB[]NAME[]_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-              dnl Potentially add $additional_includedir to $INCNAME.
-              dnl But don't add it
-              dnl   1. if it's the standard /usr/include,
-              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
-              dnl   3. if it's already present in $CPPFLAGS or the already
-              dnl      constructed $INCNAME,
-              dnl   4. if it doesn't exist as a directory.
-              if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INC[]NAME; do
-                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                    if test "X$x" = "X${i_system}$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                      dnl Really add $additional_includedir to $INCNAME.
-                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }${i_system}$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-            dnl Look for dependencies.
-            if test -n "$found_la"; then
-              dnl Read the .la file. It defines the variables
-              dnl dlname, library_names, old_library, dependency_libs, current,
-              dnl age, revision, installed, dlopen, dlpreopen, libdir.
-              save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-              dnl We use only dependency_libs.
-              for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-                    dnl But don't add it
-                    dnl   1. if it's the standard /usr/lib,
-                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
-                    dnl   3. if it's already present in $LDFLAGS or the already
-                    dnl      constructed $LIBNAME,
-                    dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                      dnl Potentially add DIR to rpathdirs.
-                      dnl The rpathdirs will be appended to $LIBNAME at the end.
-                      haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                      dnl Potentially add DIR to ltrpathdirs.
-                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                      haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                    dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                    dnl Handle this in the next round. Throw away the .la's
-                    dnl directory; it is already contained in a preceding -L
-                    dnl option.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                    dnl Most likely an immediate library name.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-            dnl Didn't find the library; assume it is in the system directories
-            dnl known to the linker and runtime loader. (All the system
-            dnl directories known to the linker should also be known to the
-            dnl runtime loader, otherwise the system is severely misconfigured.)
-            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-      dnl Weird platform: only the last -rpath option counts, the user must
-      dnl pass all path elements in one option. We can arrange that for a
-      dnl single library, but not when more than one $LIBNAMEs are used.
-      alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
-      acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-    else
-      dnl The -rpath options are cumulative.
-      for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-    dnl When using libtool, the option that works for both libraries and
-    dnl executables is -R. The -R options are cumulative.
-    for found_dir in $ltrpathdirs; do
-      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-    done
-  fi
-  popdef([P_A_C_K])
-  popdef([PACKLIBS])
-  popdef([PACKUP])
-  popdef([PACK])
-  popdef([NAME])
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
-  for element in [$2]; do
-    haveit=
-    for x in $[$1]; do
-      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      [$1]="${[$1]}${[$1]:+ }$element"
-    fi
-  done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
-  AC_REQUIRE([AC_LIB_RPATH])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  $1=
-  if test "$enable_rpath" != no; then
-    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-      dnl Use an explicit option to hardcode directories into the resulting
-      dnl binary.
-      rpathdirs=
-      next=
-      for opt in $2; do
-        if test -n "$next"; then
-          dir="$next"
-          dnl No need to hardcode the standard /usr/lib.
-          if test "X$dir" != "X/usr/$acl_libdirstem" \
-             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
-            rpathdirs="$rpathdirs $dir"
-          fi
-          next=
-        else
-          case $opt in
-            -L) next=yes ;;
-            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
-                 dnl No need to hardcode the standard /usr/lib.
-                 if test "X$dir" != "X/usr/$acl_libdirstem" \
-                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
-                   rpathdirs="$rpathdirs $dir"
-                 fi
-                 next= ;;
-            *) next= ;;
-          esac
-        fi
-      done
-      if test "X$rpathdirs" != "X"; then
-        if test -n ""$3""; then
-          dnl libtool is used for linking. Use -R options.
-          for dir in $rpathdirs; do
-            $1="${$1}${$1:+ }-R$dir"
-          done
-        else
-          dnl The linker is used for linking directly.
-          if test -n "$acl_hardcode_libdir_separator"; then
-            dnl Weird platform: only the last -rpath option counts, the user
-            dnl must pass all path elements in one option.
-            alldirs=
-            for dir in $rpathdirs; do
-              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
-            done
-            acl_save_libdir="$libdir"
-            libdir="$alldirs"
-            eval flag=\"$acl_hardcode_libdir_flag_spec\"
-            libdir="$acl_save_libdir"
-            $1="$flag"
-          else
-            dnl The -rpath options are cumulative.
-            for dir in $rpathdirs; do
-              acl_save_libdir="$libdir"
-              libdir="$dir"
-              eval flag=\"$acl_hardcode_libdir_flag_spec\"
-              libdir="$acl_save_libdir"
-              $1="${$1}${$1:+ }$flag"
-            done
-          fi
-        fi
-      fi
-    fi
-  fi
-  AC_SUBST([$1])
-])
@@ -1,221 +0,0 @@
-# lib-prefix.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
-  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib-prefix],
-[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  if test $use_additional = yes; then
-    dnl Potentially add $additional_includedir to $CPPFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/include,
-    dnl   2. if it's already present in $CPPFLAGS,
-    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-            dnl Really add $additional_includedir to $CPPFLAGS.
-            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-    dnl Potentially add $additional_libdir to $LDFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/lib,
-    dnl   2. if it's already present in $LDFLAGS,
-    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-      haveit=
-      for x in $LDFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-            dnl Really add $additional_libdir to $LDFLAGS.
-            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
-  dnl Unfortunately, prefix and exec_prefix get only finally determined
-  dnl at the end of configure.
-  if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  $1
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_PREPARE_MULTILIB creates
-dnl - a variable acl_libdirstem, containing the basename of the libdir, either
-dnl   "lib" or "lib64" or "lib/64",
-dnl - a variable acl_libdirstem2, as a secondary possible value for
-dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
-dnl   "lib/amd64".
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
-  dnl There is no formal standard regarding lib and lib64.
-  dnl On glibc systems, the current practice is that on a system supporting
-  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
-  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
-  dnl the compiler's default mode by looking at the compiler's library search
-  dnl path. If at least one of its elements ends in /lib64 or points to a
-  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
-  dnl Otherwise we use the default, namely "lib".
-  dnl On Solaris systems, the current practice is that on a system supporting
-  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
-  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
-  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  acl_libdirstem=lib
-  acl_libdirstem2=
-  case "$host_os" in
-    solaris*)
-      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
-      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
-      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
-      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
-      dnl symlink is missing, so we set acl_libdirstem2 too.
-      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
-        [AC_RUN_IFELSE([
-           AC_LANG_PROGRAM([], [[
-             return sizeof(void*) == 8 ? 0 : 1;
-           ]])            
-           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
-        ])
-      if test $gl_cv_solaris_64bit = yes; then
-        acl_libdirstem=lib/64
-        case "$host_cpu" in
-          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
-          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
-        esac
-      fi
-      ;;
-    *)
-      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-      if test -n "$searchpath"; then
-        acl_save_IFS="${IFS= 	}"; IFS=":"
-        for searchdir in $searchpath; do
-          if test -d "$searchdir"; then
-            case "$searchdir" in
-              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-              *) searchdir=`cd "$searchdir" && pwd`
-                 case "$searchdir" in
-                   */lib64 ) acl_libdirstem=lib64 ;;
-                 esac ;;
-            esac
-          fi
-        done
-        IFS="$acl_save_IFS"
-      fi
-      ;;
-  esac
-  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
-])
@@ -0,0 +1,5 @@
+# serial 2
+AC_DEFUN([CHECK_FOR_LIBGEARMAND],
+         [AX_CHECK_LIBRARY([LIBGEARMAN],[libgearman/gearman.h],[gearman],,
+                           [AC_DEFINE([HAVE_LIBGEARMAN],[0],[Define to 1 to compile in libgearman support])])
+         ])
@@ -1,7 +1,8 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -10,7 +11,8 @@
 
 m4_define([_LT_COPYING], [dnl
 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 #   This file is part of GNU Libtool.
@@ -37,7 +39,7 @@ m4_define([_LT_COPYING], [dnl
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ])
 
-# serial 56 LT_INIT
+# serial 57 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -66,6 +68,7 @@ esac
 # ------------------
 AC_DEFUN([LT_INIT],
 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
 AC_BEFORE([$0], [LTDL_INIT])dnl
@@ -82,6 +85,8 @@ AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
 dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
@@ -118,7 +123,7 @@ m4_defun([_LT_CC_BASENAME],
     *) break;;
   esac
 done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
 ])
 
 
@@ -138,6 +143,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
 m4_defun([_LT_SETUP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -160,10 +170,13 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
 # See if we are running on zsh, and set the options which allow our
@@ -179,7 +192,6 @@ fi
 _LT_CHECK_OBJDIR
 
 m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -193,23 +205,6 @@ aix3*)
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# 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'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
@@ -250,6 +245,28 @@ _LT_CONFIG_COMMANDS
 ])# _LT_SETUP
 
 
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# 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'
+])
+
 # _LT_PROG_LTMAIN
 # ---------------
 # Note that this code is called both from `configure', and `config.status'
@@ -408,7 +425,7 @@ m4_define([_lt_decl_all_varnames],
 # declaration there will have the same value as in `configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
 
 # _LT_CONFIG_STATUS_DECLARATIONS
@@ -418,7 +435,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE],
 # embedded single quotes properly.  In configure, this macro expands
 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 #
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
@@ -517,12 +534,20 @@ 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 lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -533,9 +558,9 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -543,16 +568,38 @@ for var in lt_decl_all_varnames([[ \
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
 _LT_OUTPUT_LIBTOOL_INIT
 ])
 
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
 # ---------
@@ -562,20 +609,11 @@ _LT_OUTPUT_LIBTOOL_INIT
 AC_DEFUN([LT_OUTPUT],
 [: ${CONFIG_LT=./config.lt}
 AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
 
 cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
+lt_cl_silent=false
 exec AS_MESSAGE_LOG_FD>>config.log
 {
   echo
@@ -601,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
@@ -646,15 +684,13 @@ chmod +x "$CONFIG_LT"
 # appending to config.log, which fails on DOS, as config.log is still kept
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
 ])# LT_OUTPUT
 
 
@@ -717,15 +753,12 @@ _LT_EOF
   # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  _LT_PROG_REPLACE_SHELLFNS
 
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -770,6 +803,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -791,6 +825,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -821,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -831,11 +894,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -921,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# 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 >&AS_MESSAGE_LOG_FD
+	# 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 >&AS_MESSAGE_LOG_FD
@@ -929,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	rm -rf libconftest.dylib*
 	rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -940,6 +1012,34 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	[lt_cv_ld_exported_symbols_list=no])
 	LDFLAGS="$save_LDFLAGS"
     ])
+
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [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" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $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 >&AS_MESSAGE_LOG_FD
+      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 >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
@@ -967,7 +1067,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
     else
       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -977,8 +1077,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -987,7 +1087,13 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
   case $cc_basename in
@@ -995,7 +1101,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
      *) _lt_dar_can_shared=$GCC ;;
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
+    output_verbose_link_cmd=func_echo_all
     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
@@ -1011,203 +1117,142 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-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 "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`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_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
 # _LT_SHELL_INIT(ARG)
 # -------------------
 m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
 
 
 # _LT_PROG_ECHO_BACKSLASH
 # -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# 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
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
 fi
 
-# 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
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
 
-	  if test "$prev" != 'sed 50q "[$]0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  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" )])])
 
-AC_SUBST(lt_ECHO)
-])
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+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|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
@@ -1236,7 +1281,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
@@ -1267,7 +1312,7 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+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
@@ -1281,7 +1326,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_i386"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1300,7 +1348,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1329,14 +1380,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
-sparc*-*solaris*)
+*-*solaris*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      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"
@@ -1354,14 +1418,47 @@ need_locks="$enable_libtool_lock"
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _LT_CMD_OLD_ARCHIVE
 # -------------------
 m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1380,18 +1477,27 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  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
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1416,15 +1522,15 @@ AC_CACHE_CHECK([$1], [$2],
    -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $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
        $2=yes
@@ -1464,7 +1570,7 @@ AC_CACHE_CHECK([$1], [$2],
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          $2=yes
@@ -1527,6 +1633,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     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.
@@ -1552,6 +1663,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     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
@@ -1591,8 +1707,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
       # 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+      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`
@@ -1643,7 +1759,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
+[#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -1684,7 +1800,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* 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);
@@ -1693,7 +1815,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -1869,16 +1995,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $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_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
@@ -2037,6 +2163,7 @@ m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
 	[], [
@@ -2045,16 +2172,23 @@ if test "$GCC" = yes; then
     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
     *) lt_awk_arg="/^libraries:/" ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  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 -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    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=
@@ -2067,7 +2201,7 @@ if test "$GCC" = yes; then
 	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 '
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS=" "; FS="/|\n";} {
   lt_foo="";
   lt_count=0;
@@ -2087,7 +2221,13 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # 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])
@@ -2113,7 +2253,7 @@ need_version=unknown
 
 case $host_os in
 aix3*)
-  version_type=linux
+  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
 
@@ -2122,7 +2262,7 @@ aix3*)
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
@@ -2175,7 +2315,7 @@ amigaos*)
   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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    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
   ;;
@@ -2187,7 +2327,7 @@ beos*)
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  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'
@@ -2206,8 +2346,9 @@ cygwin* | mingw* | pw32* | cegcc*)
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  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}`~
@@ -2228,36 +2369,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     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="/usr/lib /lib/w32api /lib /usr/local/lib"
+m4_if([$1], [],[
+      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}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        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
       ;;
     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
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2278,7 +2466,7 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=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'
@@ -2286,10 +2474,6 @@ dgux*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2297,7 +2481,7 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
@@ -2315,7 +2499,7 @@ freebsd* | dragonfly*)
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2335,12 +2519,26 @@ freebsd* | dragonfly*)
   ;;
 
 gnu*)
-  version_type=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}'
   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
   ;;
 
@@ -2386,12 +2584,14 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # 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
+  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}'
@@ -2407,7 +2607,7 @@ irix5* | irix6* | nonstopux*)
     nonstopux*) version_type=nonstopux ;;
     *)
 	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
@@ -2444,9 +2644,9 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+# 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}'
@@ -2454,16 +2654,21 @@ linux* | k*bsd*-gnu)
   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
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  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
@@ -2475,8 +2680,9 @@ linux* | k*bsd*-gnu)
 
   # 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;/^$/d' | tr '\n' ' '`
+    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
@@ -2507,7 +2713,7 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
+  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
@@ -2576,7 +2782,7 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=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}'
@@ -2601,7 +2807,7 @@ sunos4*)
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
+  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
@@ -2625,7 +2831,7 @@ sysv4 | sysv4.3*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
-    version_type=linux
+    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
@@ -2656,7 +2862,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=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}'
@@ -2666,7 +2872,7 @@ tpf*)
   ;;
 
 uts4*)
-  version_type=linux
+  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
@@ -2708,6 +2914,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],
@@ -2820,6 +3028,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
@@ -2941,6 +3150,11 @@ case $reload_flag in
 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'
@@ -2949,8 +3163,8 @@ case $host_os in
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
@@ -3002,16 +3216,18 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  if ( file / ) >/dev/null 2>&1; then
+  # 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
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # 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)
+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'
@@ -3041,6 +3257,10 @@ 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
@@ -3049,11 +3269,11 @@ hpux10.20* | hpux11*)
     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]) shared object file - PA-RISC [0-9].[0-9]']
+    [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_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
@@ -3074,8 +3294,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3153,6 +3373,21 @@ tpf*)
   ;;
 esac
 ])
+
+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
@@ -3160,7 +3395,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 _LT_DECL([], [deplibs_check_method], [1],
     [Method to check whether dependent libraries are shared objects])
 _LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3217,7 +3456,19 @@ 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.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
   if test "$DUMPBIN" != ":"; then
     NM="$DUMPBIN"
@@ -3230,13 +3481,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3251,15 +3502,76 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
 
-# LT_LIB_M
+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
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
 # --------
 # check for math library
 AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
@@ -3287,7 +3599,12 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
 if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3304,6 +3621,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
 AC_REQUIRE([LT_PATH_LD])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -3371,8 +3689,8 @@ esac
 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'"
+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=
@@ -3396,6 +3714,7 @@ for ac_symprfx in "" "_"; do
     # 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};"\
@@ -3408,6 +3727,7 @@ for ac_symprfx in "" "_"; do
   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
@@ -3429,7 +3749,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -3441,6 +3761,18 @@ _LT_EOF
       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@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3452,7 +3784,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t@_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3478,15 +3810,15 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
 	  LIBS="conftstm.$ac_objext"
 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 	fi
@@ -3519,6 +3851,13 @@ else
   AC_MSG_RESULT(ok)
 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
+
 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
@@ -3529,6 +3868,8 @@ _LT_DECL([global_symbol_to_c_name_address],
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3540,7 +3881,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -3591,6 +3931,11 @@ m4_if([$1], [CXX], [
       # DJGPP does not support shared libraries at all
       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
     interix[[3-9]]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -3640,6 +3985,12 @@ m4_if([$1], [CXX], [
 	  ;;
 	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).
+	m4_if([$1], [GCJ], [],
+	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -3696,7 +4047,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -3729,8 +4080,8 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -3792,7 +4143,7 @@ m4_if([$1], [CXX], [
 	;;
       solaris*)
 	case $cc_basename in
-	  CC*)
+	  CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -3896,6 +4247,12 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
     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
@@ -3938,6 +4295,15 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
@@ -3980,7 +4346,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -4001,7 +4367,13 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4013,25 +4385,40 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-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_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 	  ;;
 	esac
 	;;
@@ -4063,7 +4450,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
       *)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
@@ -4120,9 +4507,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4141,6 +4530,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 	[Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4161,6 +4552,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4169,27 +4561,37 @@ m4_require([_LT_TAG_COMPILER])dnl
 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_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
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     else
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
+    ;;
   cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ], [
   runpath_var=
   _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -4204,7 +4606,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4252,7 +4653,33 @@ dnl Note also adjust exclude_expsyms for C++ above.
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=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}'
 
@@ -4270,6 +4697,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     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 ...
@@ -4285,11 +4713,12 @@ dnl Note also adjust exclude_expsyms for C++ above.
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** 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 modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** 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
@@ -4325,10 +4754,12 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+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
         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -4346,6 +4777,11 @@ _LT_EOF
       fi
       ;;
 
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4361,7 +4797,7 @@ _LT_EOF
       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
       if test "$host_os" = linux-dietlibc; then
 	case $cc_basename in
@@ -4371,15 +4807,16 @@ _LT_EOF
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
 	 && test "$tmp_diet" = no
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -4390,13 +4827,17 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	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
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
@@ -4412,17 +4853,16 @@ _LT_EOF
         fi
 
 	case $cc_basename in
-	xlf*)
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
 	  if test "x$supports_anon_versioning" = xyes; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -4436,8 +4876,8 @@ _LT_EOF
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4455,8 +4895,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4502,8 +4942,8 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4543,8 +4983,10 @@ _LT_EOF
       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
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	else
 	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
 	fi
@@ -4631,9 +5073,9 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
+        _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
 	if test "$host_cpu" = ia64; then
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -4642,14 +5084,19 @@ _LT_EOF
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_SYS_MODULE_PATH_AIX([$1])
 	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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.
 	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	  # This is similar to how AIX traditionally builds its shared libraries.
 	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
@@ -4681,20 +5128,64 @@ _LT_EOF
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=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.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# 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.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='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
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=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.
+	_LT_TAGVAR(archive_cmds, $1)='$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.
+	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	# FIXME: Should let the user specify the lib program.
+	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4707,10 +5198,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=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
@@ -4723,7 +5210,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4732,7 +5219,7 @@ _LT_EOF
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -4740,7 +5227,7 @@ _LT_EOF
 
     hpux9*)
       if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
@@ -4755,14 +5242,13 @@ _LT_EOF
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
       if test "$with_gnu_ld" = no; then
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
@@ -4774,16 +5260,16 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
@@ -4795,7 +5281,14 @@ _LT_EOF
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	m4_if($1, [], [
+	  # 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)
+	  _LT_LINKER_OPTION([if $CC understands -b],
+	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 	  ;;
 	esac
       fi
@@ -4823,19 +5316,34 @@ _LT_EOF
 
     irix5* | irix6* | nonstopux*)
       if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	# 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.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4897,17 +5405,17 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
       ;;
 
     osf3*)
       if test "$GCC" = yes; then
 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
@@ -4917,13 +5425,13 @@ _LT_EOF
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
       if test "$GCC" = yes; then
 	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $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
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -4936,9 +5444,9 @@ _LT_EOF
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
       if test "$GCC" = yes; then
 	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $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"*)
@@ -5114,36 +5622,38 @@ x|xyes)
       # 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.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+	[$RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+	  _LT_TAGVAR(allow_undefined_flag, $1)=
+	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+	  then
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	  else
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  fi
+	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
       ;;
     esac
   fi
@@ -5180,9 +5690,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
@@ -5208,8 +5715,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
     [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
     [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
@@ -5220,6 +5725,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
     [Symbols that must always be exported])
 _LT_TAGDECL([], [prelink_cmds], [2],
     [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5313,37 +5820,22 @@ CC="$lt_save_CC"
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
 # the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5355,7 +5847,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5365,6 +5856,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -5396,6 +5889,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # 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
@@ -5413,6 +5907,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5434,8 +5929,8 @@ if test "$_lt_caught_CXX_error" != yes; then
       # 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
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5467,7 +5962,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       # 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 "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -5576,10 +6071,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          _LT_SYS_MODULE_PATH_AIX
+          _LT_SYS_MODULE_PATH_AIX([$1])
           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
         else
           if test "$host_cpu" = ia64; then
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
@@ -5588,14 +6083,19 @@ if test "$_lt_caught_CXX_error" != yes; then
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_SYS_MODULE_PATH_AIX([$1])
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${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.
 	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 	    # This is similar to how AIX traditionally builds its shared
 	    # libraries.
@@ -5625,28 +6125,75 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='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
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
+	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.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # 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.
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='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, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='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, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='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
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
@@ -5669,7 +6216,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5688,6 +6235,11 @@ if test "$_lt_caught_CXX_error" != yes; then
       gnu*)
         ;;
 
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        ;;
+
       hpux9*)
         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
@@ -5712,11 +6264,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # 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; $ECHO "X$list" | $Xsed'
+            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
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5777,7 +6329,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # 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; $ECHO "X$list" | $Xsed'
+	    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
@@ -5787,10 +6339,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -5820,7 +6372,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -5831,9 +6383,9 @@ if test "$_lt_caught_CXX_error" != yes; then
           *)
 	    if test "$GXX" = yes; then
 	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
@@ -5844,7 +6396,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -5862,7 +6414,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # 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; $ECHO "X$list" | $Xsed'
+	    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"'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5899,26 +6451,26 @@ if test "$_lt_caught_CXX_error" != yes; then
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
-	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
 		rm -rf $tpldir~
 		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='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 | $NL2SP`~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
 		$RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+		$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 will use weak symbols
+	    *) # Version 6 and above use weak symbols
 	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 	      ;;
@@ -5926,7 +6478,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
@@ -5945,9 +6497,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    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*)
+	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
@@ -5967,13 +6519,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
 	      _LT_TAGVAR(compiler_needs_object, $1)=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='echo'
+	      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
@@ -6042,7 +6594,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 	  fi
-	  output_verbose_link_cmd=echo
+	  output_verbose_link_cmd=func_echo_all
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -6077,15 +6629,15 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    case $host in
 	      osf3*)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 		;;
 	      *)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $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'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
@@ -6101,17 +6653,17 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # 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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    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
 	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 	      case $host in
 	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 		  ;;
 	      esac
 
@@ -6121,7 +6673,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      # 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 "\-L"'
+	      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
@@ -6157,7 +6709,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
@@ -6178,7 +6730,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    esac
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-	    output_verbose_link_cmd='echo'
+	    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
@@ -6198,14 +6750,14 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $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 "\-L"'
+	        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.
@@ -6216,7 +6768,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	        # 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 "\-L"'
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
@@ -6270,6 +6822,10 @@ if test "$_lt_caught_CXX_error" != yes; then
           CC*)
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+	      '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
 	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
@@ -6325,6 +6881,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6339,6 +6896,29 @@ AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf 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).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+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
+])# _LT_FUNC_STRIPNAME_CNF
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6347,6 +6927,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6396,7 +6977,20 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_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
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6408,7 +7002,7 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case ${prev}${p} in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
@@ -6417,13 +7011,22 @@ if AC_TRY_EVAL(ac_compile); then
           test $p = "-R"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        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 $p in
-	 -L* | -R*)
+	 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.
@@ -6443,8 +7046,10 @@ if AC_TRY_EVAL(ac_compile); then
 	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${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.
@@ -6480,6 +7085,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6516,7 +7122,7 @@ linux*)
 
 solaris*)
   case $cc_basename in
-  CC*)
+  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
@@ -6560,32 +7166,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6595,7 +7185,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6604,6 +7193,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6643,7 +7234,9 @@ if test "$_lt_disable_F77" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6697,38 +7290,24 @@ if test "$_lt_disable_F77" != yes; then
 
   GCC=$lt_save_GCC
   CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
 fi # test "$_lt_disable_F77" != yes
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
 # to write the compiler configuration to `libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6738,7 +7317,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6747,6 +7325,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6786,7 +7366,9 @@ if test "$_lt_disable_FC" != yes; then
   # Allow CC to be a program name with arguments.
   lt_save_CC="$CC"
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6842,7 +7424,8 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
 fi # test "$_lt_disable_FC" != yes
 
 AC_LANG_POP
@@ -6879,10 +7462,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_TAGVAR(LD, $1)="$LD"
@@ -6892,6 +7477,8 @@ _LT_CC_BASENAME([$compiler])
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
@@ -6911,10 +7498,82 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## 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_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
@@ -6946,9 +7605,11 @@ _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
 lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -6961,7 +7622,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -6981,6 +7643,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7020,6 +7689,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7113,8 +7791,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES],
 # Try some XSI features
 xsi_shell=no
 ( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
+  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
@@ -7153,208 +7831,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# 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 ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# 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 ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# 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_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}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 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=:
+])
 
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
 
-# 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 ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
 
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # 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}"}])
 
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
 
-# 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 "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
 
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
 
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
 
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
 
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
 
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
 
-_LT_EOF
-esac
+  # 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
 
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[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
     ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
+  *-*-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
     ;;
-  esac
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#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
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
@@ -1,13 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
+#   Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # 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.
 
-# serial 6 ltoptions.m4
+# serial 7 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -125,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -133,13 +134,13 @@ case $host in
 esac
 
 test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
 test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 ])# win32-dll
 
 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
@@ -325,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [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],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
@@ -7,17 +7,17 @@
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-# serial 3017 ltversion.m4
+# serial 3337 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
+[macro_version='2.4.2'
+macro_revision='1.3337'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
@@ -1,13 +1,13 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # 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.
 
-# serial 4 lt~obsolete.m4
+# serial 5 lt~obsolete.m4
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
@@ -77,7 +77,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -90,3 +89,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
@@ -0,0 +1,9 @@
+AC_DEFUN([ENABLE_MEMASLAP],
+  [AC_ARG_ENABLE([memaslap],
+    [AS_HELP_STRING([--enable-memaslap],
+      [build with memaslap tool. @<:@default=off@:>@])],
+    [ac_cv_enable_memaslap=yes],
+    [ac_cv_enable_memaslap=no])
+
+  AM_CONDITIONAL([BUILD_MEMASLAP], [test "$ac_cv_enable_memaslap" = "yes"])
+])
@@ -1,31 +0,0 @@
-AC_DEFUN([WITH_MEMCACHED],
-  [AC_ARG_WITH([memcached],
-    [AS_HELP_STRING([--with-memcached],
-      [Memcached binary to use for make test])],
-    [ac_cv_with_memcached="$withval"],
-    [ac_cv_with_memcached=memcached])
-
-  # just ignore the user if --without-memcached is passed.. it is
-  # only used by make test
-  AS_IF([test "x$withval" = "xno"],
-    [
-      ac_cv_with_memcached=memcached
-      MEMC_BINARY=memcached
-    ],
-    [
-       AS_IF([test -f "$withval"],
-         [
-           ac_cv_with_memcached=$withval
-           MEMC_BINARY=$withval
-         ],
-         [
-           AC_PATH_PROG([MEMC_BINARY], [$ac_cv_with_memcached], "no")
-           AS_IF([test "x$MEMC_BINARY" = "xno"],
-             AC_MSG_ERROR(["could not find memcached binary"]))
-         ])
-    ])
-
-  AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMC_BINARY",
-            [Name of the memcached binary used in make test])
-  AC_SUBST(MEMC_BINARY)
-])
@@ -0,0 +1,18 @@
+dnl ---------------------------------------------------------------------------
+dnl Macro: ENABLE_MURMUR_HASH
+dnl ---------------------------------------------------------------------------
+AC_DEFUN([ENABLE_MURMUR_HASH],
+  [AC_ARG_ENABLE([murmur_hash],
+    [AS_HELP_STRING([--disable-murmur_hash],
+      [build with support for murmur hashing. @<:@default=on@:>@])],
+    [ac_cv_enable_murmur_hash=no],
+    [ac_cv_enable_murmur_hash=yes])
+
+  AS_IF([test "$ac_cv_enable_murmur_hash" = "yes"],
+        [AC_DEFINE([HAVE_MURMUR_HASH], [1], [Enables murmur hashing support])])
+
+  AM_CONDITIONAL([INCLUDE_MURMUR_SRC], [test "$ac_cv_enable_murmur_hash" = "yes"])
+])
+dnl ---------------------------------------------------------------------------
+dnl End Macro: ENABLE_MURMUR_HASH
+dnl ---------------------------------------------------------------------------
@@ -1,60 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: PANDORA_64BIT
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([PANDORA_64BIT],[
-  AC_BEFORE([$0], [AC_LIB_PREFIX])
-
-  AC_ARG_ENABLE([64bit],
-    [AS_HELP_STRING([--disable-64bit],
-      [Build 64 bit binary @<:@default=on@:>@])],
-    [ac_enable_64bit="$enableval"],
-    [ac_enable_64bit="yes"])
-
-  AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
-  AS_IF([test "x$ISAINFO" != "xno"],
-        [isainfo_b=`${ISAINFO} -b`],
-        [isainfo_b="x"])
-
-  AS_IF([test "$isainfo_b" != "x"],[
-
-    isainfo_k=`${ISAINFO} -k` 
-    DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_b}"
-
-    AS_IF([test "x$ac_enable_64bit" = "xyes"],[
-
-      AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
-        LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
-      ])
-
-      AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
-       dnl The user hasn't overridden the default libdir, so we'll 
-       dnl the dir suffix to match solaris 32/64-bit policy
-       libdir="${libdir}/${isainfo_k}"
-      ])
-
-      AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
-        CFLAGS="${CFLAGS} -m64"
-        ac_cv_env_CFLAGS_set=set
-        ac_cv_env_CFLAGS_value='-m64'
-      ])
-      AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
-        CXXFLAGS="${CXXFLAGS} -m64"
-        ac_cv_env_CXXFLAGS_set=set
-        ac_cv_env_CXXFLAGS_value='-m64'
-      ])
-
-      AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[
-        AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
-        AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
-      ])
-    ])
-  ])
-])
-dnl ---------------------------------------------------------------------------
-dnl End Macro: PANDORA_64BIT
-dnl ---------------------------------------------------------------------------
@@ -1,252 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.134])
-
-AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
-  AC_ARG_ENABLE([fat-binaries],
-    [AS_HELP_STRING([--enable-fat-binaries],
-      [Enable fat binary support on OSX @<:@default=off@:>@])],
-    [ac_enable_fat_binaries="$enableval"],
-    [ac_enable_fat_binaries="no"])
-
-  dnl Force dependency tracking on for Sun Studio builds
-  AS_IF([test "x${enable_dependency_tracking}" = "x"],[
-    enable_dependency_tracking=yes
-  ])
-  dnl If we're building OSX Fat Binaries, we have to turn off -M options
-  AS_IF([test "x${ac_enable_fat_binaries}" = "xyes"],[
-    enable_dependency_tracking=no
-  ])
-])
-
-dnl The standard setup for how we build Pandora projects
-AC_DEFUN([PANDORA_CANONICAL_TARGET],[
-  AC_REQUIRE([PANDORA_FORCE_DEPEND_TRACKING])
-  ifdef([m4_define],,[define([m4_define],   defn([define]))])
-  ifdef([m4_undefine],,[define([m4_undefine],   defn([undefine]))])
-  m4_define([PCT_ALL_ARGS],[$*])
-  m4_define([PCT_REQUIRE_CXX],[no])
-  m4_define([PCT_FORCE_GCC42],[no])
-  m4_define([PCT_DONT_SUPPRESS_INCLUDE],[no])
-  m4_define([PCT_VERSION_FROM_VC],[no])
-  m4_define([PCT_USE_VISIBILITY],[yes])
-  m4_foreach([pct_arg],[$*],[
-    m4_case(pct_arg,
-      [require-cxx], [
-        m4_undefine([PCT_REQUIRE_CXX])
-        m4_define([PCT_REQUIRE_CXX],[yes])
-      ],
-      [force-gcc42], [
-        m4_undefine([PCT_FORCE_GCC42])
-        m4_define([PCT_FORCE_GCC42],[yes])
-      ],
-      [skip-visibility], [
-        m4_undefine([PCT_USE_VISIBILITY])
-        m4_define([PCT_USE_VISIBILITY],[no])
-      ],
-      [dont-suppress-include], [
-        m4_undefine([PCT_DONT_SUPPRESS_INCLUDE])
-        m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes])
-      ],
-      [version-from-vc], [
-        m4_undefine([PCT_VERSION_FROM_VC])
-        m4_define([PCT_VERSION_FROM_VC],[yes])
-    ])
-  ])
-
-  AC_CONFIG_MACRO_DIR([m4])
-
-  m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[
-    AC_CONFIG_HEADERS([src/config.h])
-  ],[
-    AC_CONFIG_HEADERS([config.h])
-  ])
-
-  # We need to prevent canonical target
-  # from injecting -O2 into CFLAGS - but we won't modify anything if we have
-  # set CFLAGS on the command line, since that should take ultimate precedence
-  AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],
-        [CFLAGS=""])
-  AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],
-        [CXXFLAGS=""])
-  
-  AC_CANONICAL_TARGET
-  
-  m4_if(PCT_DONT_SUPRESS_INCLUDE,yes,[
-    AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability subdir-objects foreign)
-  ],[
-    AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability nostdinc subdir-objects foreign)
-  ])
-
-  m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-  m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
-    gl_EARLY
-  ])
-  
-  AC_REQUIRE([AC_PROG_CC])
-  m4_if(PCT_FORCE_GCC42, [yes], [
-    AC_REQUIRE([PANDORA_ENSURE_GCC_VERSION])
-  ])
-  AC_REQUIRE([PANDORA_64BIT])
-
-  m4_if(PCT_VERSION_FROM_VC,yes,[
-    PANDORA_VC_VERSION
-  ],[
-    PANDORA_TEST_VC_DIR
-  ])
-  PANDORA_VERSION
-
-  dnl Once we can use a modern autoconf, we can use this
-  dnl AC_PROG_CC_C99
-  AC_REQUIRE([AC_PROG_CXX])
-  PANDORA_EXTENSIONS
-  AM_PROG_CC_C_O
-
-
-
-  PANDORA_PLATFORM
-
-  PANDORA_LIBTOOL
-
-  dnl autoconf doesn't automatically provide a fail-if-no-C++ macro
-  dnl so we check c++98 features and fail if we don't have them, mainly
-  dnl for that reason
-  PANDORA_CHECK_CXX_STANDARD
-  m4_if(PCT_REQUIRE_CXX, [yes], [
-    AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
-      AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
-    ])
-
-  ])
-  
-  m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
-    gl_INIT
-    AC_CONFIG_LIBOBJ_DIR([gnulib])
-  ])
-
-  PANDORA_CHECK_C_VERSION
-  PANDORA_CHECK_CXX_VERSION
-
-  AC_C_BIGENDIAN
-  AC_C_CONST
-  AC_C_INLINE
-  AC_C_VOLATILE
-  AC_C_RESTRICT
-
-  AC_HEADER_TIME
-  AC_STRUCT_TM
-  AC_TYPE_SIZE_T
-  AC_SYS_LARGEFILE
-  PANDORA_CLOCK_GETTIME
-
-  # off_t is not a builtin type
-  AC_CHECK_SIZEOF(off_t, 4)
-  AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[
-    AC_MSG_ERROR("${PACKAGE} needs an off_t type.")
-  ])
-
-  AC_CHECK_SIZEOF(size_t)
-  AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[
-    AC_MSG_ERROR("${PACKAGE} needs an size_t type.")
-  ])
-
-  AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])
-  AC_CHECK_SIZEOF(long long)
-  AC_DEFINE_UNQUOTED([SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()])
-  AC_CACHE_CHECK([if time_t is unsigned], [ac_cv_time_t_unsigned],[
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-      [[
-#include <time.h>
-      ]],
-      [[
-      int array[(((time_t)-1) > 0) ? 1 : -1];
-      ]])
-    ],[
-      ac_cv_time_t_unsigned=yes
-    ],[
-      ac_cv_time_t_unsigned=no
-    ])
-  ])
-  AS_IF([test "$ac_cv_time_t_unsigned" = "yes"],[
-    AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
-  ])
-
-  AC_CHECK_LIBM
-  dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
-  AC_SUBST([LIBM])
-  
-  AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
-  AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
-
-
-
-  PANDORA_OPTIMIZE
-
-  AC_LANG_PUSH(C++)
-  # Test whether madvise() is declared in C++ code -- it is not on some
-  # systems, such as Solaris
-  AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
-  #if HAVE_SYS_MMAN_H
-  #include <sys/types.h>
-  #include <sys/mman.h>
-  #endif
-  ]])
-  AC_LANG_POP()
-
-  PANDORA_HAVE_GCC_ATOMICS
-
-  m4_if(PCT_USE_VISIBILITY,[yes],[
-    dnl We need to inject error into the cflags to test if visibility works or not
-    save_CFLAGS="${CFLAGS}"
-    CFLAGS="${CFLAGS} -Werror"
-    PANDORA_VISIBILITY
-    CFLAGS="${save_CFLAGS}"
-  ])
-
-  PANDORA_HEADER_ASSERT
-
-  PANDORA_WARNINGS(PCT_ALL_ARGS)
-
-  PANDORA_ENABLE_DTRACE
-
-  AC_LIB_PREFIX
-  PANDORA_HAVE_BETTER_MALLOC
-
-  AC_CHECK_PROGS([DOXYGEN], [doxygen])
-  AC_CHECK_PROGS([PERL], [perl])
-  AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
-
-  AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
-
-  PANDORA_WITH_GETTEXT
-
-  AS_IF([test "x${gl_LIBOBJS}" != "x"],[
-    AS_IF([test "$GCC" = "yes"],[
-      AM_CPPFLAGS="-isystem \${top_srcdir}/gnulib -isystem \${top_builddir}/gnulib ${AM_CPPFLAGS}"
-    ],[
-    AM_CPPFLAGS="-I\${top_srcdir}/gnulib -I\${top_builddir}/gnulib ${AM_CPPFLAGS}"
-    ])
-  ])
-  m4_if(m4_substr(m4_esyscmd(test -d src && echo 0),0,1),0,[
-    AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}"
-  ],[
-    AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}"
-  ])
-
-  PANDORA_USE_PIPE
-
-
-  AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
-  AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
-
-  AC_SUBST([AM_CFLAGS])
-  AC_SUBST([AM_CXXFLAGS])
-  AC_SUBST([AM_CPPFLAGS])
-  AC_SUBST([AM_LDFLAGS])
-
-])
@@ -1,37 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-
-AC_DEFUN([PANDORA_CHECK_C_VERSION],[
-
-  dnl Print version of C compiler
-  AC_MSG_CHECKING("C Compiler version--$GCC")
-  AS_IF([test "$GCC" = "yes"],[
-    CC_VERSION=`$CC --version | sed 1q`
-  ],[AS_IF([test "$SUNCC" = "yes"],[
-      CC_VERSION=`$CC -V 2>&1 | sed 1q`
-    ],[
-      CC_VERSION=""
-    ])
-  ])
-  AC_MSG_RESULT("$CC_VERSION")
-  AC_SUBST(CC_VERSION)
-])
-
-
-AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [
-  dnl Print version of CXX compiler
-  AC_MSG_CHECKING("C++ Compiler version")
-  AS_IF([test "$GCC" = "yes"],[
-    CXX_VERSION=`$CXX --version | sed 1q`
-  ],[AS_IF([test "$SUNCC" = "yes"],[
-      CXX_VERSION=`$CXX -V 2>&1 | sed 1q`
-    ],[
-    CXX_VERSION=""
-    ])
-  ])
-  AC_MSG_RESULT("$CXX_VERSION")
-  AC_SUBST(CXX_VERSION)
-])
@@ -1,23 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_CHECK_CXX_STANDARD],[
-  AC_REQUIRE([AC_CXX_COMPILE_STDCXX_0X])
-  AS_IF([test "$GCC" = "yes"],
-        [AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = "yes"],[],
-               [AS_IF([test "$ac_cv_cxx_compile_cxx0x_gxx" = "yes"],
-                      [CXX_STANDARD="-std=gnu++0x"],
-                      [CXX_STANDARD="-std=gnu++98"])
-               ])
-        ])
-  AM_CXXFLAGS="${CXX_STANDARD} ${AM_CXXFLAGS}"
-  
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${CXXFLAGS} ${CXX_STANDARD}"
-  AC_CXX_HEADER_STDCXX_98
-  CXXFLAGS="${save_CXXFLAGS}"
-
-  AC_SUBST([CXX_STANDARD])
-])
@@ -1,34 +0,0 @@
-# We check two things: where the include file is for cinttypes. We
-# include AC_TRY_COMPILE for all the combinations we've seen in the
-# wild.  We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or 
-# HAVE_BOOST_CINTTYPES depending
-# on location.
-
-AC_DEFUN([PANDORA_CXX_CINTTYPES],
-  [AC_REQUIRE([PANDORA_CXX_CSTDINT])
-   AC_MSG_CHECKING(the location of cinttypes)
-   AC_LANG_PUSH(C++)
-   save_CXXFLAGS="${CXXFLAGS}"
-   CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
-   ac_cv_cxx_cinttypes=""
-   for location in tr1/cinttypes boost/cinttypes cinttypes; do
-     if test -z "$ac_cv_cxx_cinttypes"; then
-       AC_TRY_COMPILE([#include $ac_cv_cxx_cstdint;
-                       #include <$location>],
-                      [uint32_t foo= UINT32_C(1)],
-                      [ac_cv_cxx_cinttypes="<$location>";])
-     fi
-   done
-   AC_LANG_POP()
-   CXXFLAGS="${save_CXXFLAGS}"
-   if test -n "$ac_cv_cxx_cinttypes"; then
-      AC_MSG_RESULT([$ac_cv_cxx_cinttypes])
-   else
-      ac_cv_cxx_cinttypes="<inttypes.h>"
-      AC_MSG_RESULT()
-      AC_MSG_WARN([Could not find a cinttypes header.])
-   fi
-   AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++])
-   AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes,
-                      [the location of <cinttypes>])
-])
@@ -1,15 +0,0 @@
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for clock_gettime
-#--------------------------------------------------------------------
-
-AC_DEFUN([PANDORA_CLOCK_GETTIME],[
-  AC_SEARCH_LIBS([clock_gettime],[rt])
-  AS_IF([test "x${ac_cv_search_clock_gettime}" != "xno"],[
-    AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have a working clock_gettime function])
-  ])
-])
@@ -1,33 +0,0 @@
-# We check two things: where the include file is for cstdint. We
-# include AC_TRY_COMPILE for all the combinations we've seen in the
-# wild.  We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or 
-# HAVE_BOOST_CSTDINT depending
-# on location.
-
-AC_DEFUN([PANDORA_CXX_CSTDINT],
-  [AC_MSG_CHECKING(the location of cstdint)
-   AC_LANG_PUSH(C++)
-   save_CXXFLAGS="${CXXFLAGS}"
-   CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
-   ac_cv_cxx_cstdint=""
-   for location in tr1/cstdint boost/cstdint cstdint; do
-     if test -z "$ac_cv_cxx_cstdint"; then
-       AC_TRY_COMPILE([#include <$location>],
-                      [uint32_t t],
-                      [ac_cv_cxx_cstdint="<$location>";])
-     fi
-   done
-   AC_LANG_POP()
-   CXXFLAGS="${save_CXXFLAGS}"
-   if test -n "$ac_cv_cxx_cstdint"; then
-      AC_MSG_RESULT([$ac_cv_cxx_cstdint])
-   else
-      AC_DEFINE([__STDC_CONSTANT_MACROS],[1],[Use STDC Constant Macros in C++])
-      AC_DEFINE([__STDC_FORMAT_MACROS],[1],[Use STDC Format Macros in C++])
-      ac_cv_cxx_cstdint="<stdint.h>"
-      AC_MSG_RESULT()
-      AC_MSG_WARN([Could not find a cstdint header.])
-   fi
-   AC_DEFINE_UNQUOTED(CSTDINT_H,$ac_cv_cxx_cstdint,
-                      [the location of <cstdint>])
-])
@@ -1,27 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Check for all of the headers and libs that Drizzle needs. We check all
-dnl of these for plugins too, to ensure that all of the appropriate defines
-dnl are set.
-
-AC_DEFUN([PANDORA_CXX_DEMANGLE],[
-  AC_LANG_PUSH([C++])
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
-  AC_CHECK_HEADERS(cxxabi.h)
-  AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle,
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
-    char *foo= 0; int bar= 0;
-    foo= abi::__cxa_demangle(foo, foo, 0, &bar);
-  ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])])
-  CXXFLAGS="${save_CXXFLAGS}"
-  AC_LANG_POP()
-
-  AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[
-    AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
-              [Define to 1 if you have the `abi::__cxa_demangle' function.])
-  ])
-])
@@ -1,112 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Check for all of the headers and libs that Drizzle needs. We check all
-dnl of these for plugins too, to ensure that all of the appropriate defines
-dnl are set.
-
-AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
-
-  PANDORA_HAVE_CXX_UNORDERED
-
-  PANDORA_CXX_CSTDINT
-  PANDORA_CXX_CINTTYPES
-
-  AC_STRUCT_TM
-
-  AC_FUNC_ALLOCA
-  AC_FUNC_UTIME_NULL
-  AC_FUNC_VPRINTF
-
-  PANDORA_WORKING_FDATASYNC
-
-  AC_CHECK_FUNCS(\
-    gethrtime \
-    setupterm \
-    backtrace \
-    backtrace_symbols \
-    backtrace_symbols_fd)
-
-  AC_HEADER_STAT
-  AC_HEADER_DIRENT
-  AC_HEADER_STDC
-  AC_HEADER_SYS_WAIT
-  AC_HEADER_STDBOOL
-
-  AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
-  AC_CHECK_HEADERS(select.h sys/select.h)
-  AC_CHECK_HEADERS(utime.h sys/utime.h )
-  AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
-  AC_CHECK_HEADERS(sched.h)
-  AC_CHECK_HEADERS(sys/prctl.h)
-  AC_CHECK_HEADERS(execinfo.h)
-  AC_CHECK_HEADERS(locale.h)
-  AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
-  AC_CHECK_HEADERS(paths.h)
-
-  
-  #--------------------------------------------------------------------
-  # Check for system libraries. Adds the library to $LIBS
-  # and defines HAVE_LIBM etc
-  #--------------------------------------------------------------------
-  
-    # For the sched_yield() function on Solaris
-  AC_CHECK_FUNC(sched_yield, [],
-    [AC_CHECK_LIB(posix4, [sched_yield],
-      [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
-  
-  AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
-    AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
-  ])
-  
-  AC_CHECK_HEADERS([curses.h term.h],[],[],[[
-    #ifdef HAVE_CURSES_H
-    # include <curses.h>
-    #endif
-  ]])
-  AC_CHECK_TYPES([uint, ulong])
-
-  PANDORA_CXX_DEMANGLE
-  PANDORA_REQUIRE_BOOST([1.38])
-  PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS
-
-
-  AH_TOP([
-#ifndef __CONFIG_H__
-#define __CONFIG_H__
-
-#include "config/top.h"
-])
-  mkdir -p config
-  cat > config/top.h.stamp <<EOF_CONFIG_TOP
-
-#if defined(i386) && !defined(__i386__)
-#define __i386__
-#endif
-
-#if defined(_FILE_OFFSET_BITS)
-# undef _FILE_OFFSET_BITS
-#endif
-EOF_CONFIG_TOP
-  diff config/top.h.stamp config/top.h >/dev/null 2>&1 || mv config/top.h.stamp config/top.h
-  rm -f config/top.h.stamp
-
-
-  AH_BOTTOM([
-#if defined(__cplusplus)
-# include CSTDINT_H
-# include CINTTYPES_H
-#else
-# include <stdint.h>
-# include <inttypes.h>
-#endif
-
-#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
-typedef unsigned long int ulong;
-#endif
-
-#endif /* __CONFIG_H__ */
-  ])
-])
@@ -1,5 +1,5 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
+dnl  Copyright (C) 2009 Sun Microsystems, Inc.
+dnl This file is free software; Sun Microsystems, Inc.
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
@@ -8,14 +8,16 @@ dnl Macro: PANDORA_ENABLE_DTRACE
 dnl ---------------------------------------------------------------------------
 AC_DEFUN([PANDORA_ENABLE_DTRACE],[
   AC_ARG_ENABLE([dtrace],
-    [AS_HELP_STRING([--disable-dtrace],
-            [Build with support for the DTRACE. @<:@default=on@:>@])],
+    [AS_HELP_STRING([--enable-dtrace],
+            [Build with support for the DTRACE. @<:@default=no@:>@])],
     [ac_cv_enable_dtrace="$enableval"],
-    [ac_cv_enable_dtrace="yes"])
+    [ac_cv_enable_dtrace="no"])
 
   AS_IF([test "$ac_cv_enable_dtrace" = "yes"],[
     AC_CHECK_PROGS([DTRACE], [dtrace])
-    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace"],[
+    AC_CHECK_HEADERS(sys/sdt.h)
+
+    AS_IF([test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"],[
 
       AC_CACHE_CHECK([if dtrace works],[ac_cv_dtrace_works],[
         cat >conftest.d <<_ACEOF
@@ -1,62 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_TRY_GCC],[
-  pushdef([Name],[translit([$1],[./-], [___])])
-  pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CHECK_PROGS([CC]NAME,[gcc$1])
-  AC_CHECK_PROGS([CXX]NAME,[g++$1])
-  AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CC_set}" = "x"],
-    [CC="${CC]NAME[}"])
-  AS_IF([test "x${CXX]NAME[}" != "x" -a "x${ac_cv_env_CCX_set}" = "x"],
-    [CXX="${CXX]NAME[}"])
-  AS_IF([test "x${CC]NAME[}" != "x" -a "x${ac_cv_env_CPP_set}" = "x"],
-    [CPP="${CC]NAME[} -E"])
-])
-
-dnl If the user is on a Mac and didn't ask for a specific compiler
-dnl You're gonna get 4.2.
-AC_DEFUN([PANDORA_MAC_GCC42],
-  [AS_IF([test "$GCC" = "yes"],[
-    AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[
-      host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'`
-      AS_IF([test "$host_os_version" -lt 10],[
-        _PANDORA_TRY_GCC([-4.2])
-      ])
-    ])
-  ])
-])
-
-dnl If the user is on CentOS or RHEL and didn't ask for a specific compiler
-dnl You're gonna get 4.4 (forward compatible with 4.5)
-AC_DEFUN([PANDORA_RH_GCC44],
-  [AS_IF([test "$GCC" = "yes"],[
-    AS_IF([test "x${ac_cv_env_CC_set}" = "x"],[
-      _PANDORA_TRY_GCC([44])
-      _PANDORA_TRY_GCC([45])
-    ])
-  ])
-])
-
-dnl 
-AC_DEFUN([PANDORA_ENSURE_GCC_VERSION],[
-  AC_REQUIRE([PANDORA_MAC_GCC42])
-  AC_REQUIRE([PANDORA_RH_GCC44])
-  AS_IF([test "$GCC" = "yes"],[
-    AC_CACHE_CHECK([if GCC is recent enough], [ac_cv_gcc_recent],
-      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 2))
-# error GCC is Too Old!
-#endif
-        ]])],
-        [ac_cv_gcc_recent=yes],
-        [ac_cv_gcc_recent=no])])
-    AS_IF([test "$ac_cv_gcc_recent" = "no" -a "$host_vendor" = "apple"],
-      AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required on OSX. You may need to install a version of XCode >= 3.1.2]))
-    AS_IF([test "$ac_cv_gcc_recent" = "no"],
-      AC_MSG_ERROR([Your version of GCC is too old. At least version 4.2 is required. On RHEL/CentOS systems this is found in the gcc44 and gcc44-c++ packages.]))
-  ])
-])
@@ -1,16 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_EXTENSIONS],[
-
-  m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
-    [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
-    [AC_REQUIRE([AC_GNU_SOURCE])])
-
-])
-
-AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[
-  AC_REQUIRE([PANDORA_EXTENSIONS])
-])
@@ -1,25 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for a working fdatasync call
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([PANDORA_WORKING_FDATASYNC],[
-  AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[
-    AC_LANG_PUSH(C++)
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <unistd.h>
-      ]],[[
-fdatasync(4);
-      ]])],
-    [ac_cv_func_fdatasync=yes],
-    [ac_cv_func_fdatasync=no])
-    AC_LANG_POP()
-  ])
-  AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
-    [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])])
-])
@@ -1,68 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[
-  AC_REQUIRE([AC_FUNC_MALLOC])
-  AC_REQUIRE([AC_FUNC_REALLOC])
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_ARG_ENABLE([umem],
-    [AS_HELP_STRING([--enable-umem],
-       [Enable linking with libumem @<:@default=off@:>@])],
-    [ac_enable_umem="$enableval"],[
-      case "$target_os" in
-        *solaris*)
-          ac_enable_umem="yes"
-        ;;
-        *)
-          ac_enable_umem="no"
-        ;;
-      esac
-    ])
-  
-  AC_ARG_ENABLE([tcmalloc],
-    [AS_HELP_STRING([--enable-tcmalloc],
-       [Enable linking with tcmalloc @<:@default=off@:>@])],
-    [ac_enable_tcmalloc="$enableval"],
-    [ac_enable_tcmalloc="no"])
-  
-  AC_ARG_ENABLE([mtmalloc],
-    [AS_HELP_STRING([--disable-mtmalloc],
-       [Enable linking with mtmalloc @<:@default=on@:>@])],
-    [ac_enable_mtmalloc="$enableval"],
-    [ac_enable_mtmalloc="yes"])
-  
-  save_LIBS="${LIBS}"
-  LIBS=
-  AS_IF([test "x$ac_enable_umem" = "xyes"],[
-    AC_CHECK_LIB(umem,malloc,[],[])
-  ],[
-    case "$target_os" in
-      *linux*)
-        AS_IF([test "x$ac_enable_tcmalloc" != "xno"],[
-          AC_CHECK_LIB(tcmalloc-minimal,malloc,[],[])
-          AS_IF([test "x$ac_cv_lib_tcmalloc_minimal_malloc" != "xyes"],[
-            AC_CHECK_LIB(tcmalloc,malloc,[],[])
-          ])
-        ])
-        ;;
-      *solaris*)
-        AS_IF([test "x$ac_enable_mtmalloc" != "xno"],[
-          AC_CHECK_LIB(mtmalloc,malloc,[],[])
-        ])
-        ;;
-    esac
-  ])
-  BETTER_MALLOC_LIBS="${LIBS}"
-  LIBS="${save_LIBS}"
-  AC_SUBST([BETTER_MALLOC_LIBS])
-
-])
-
-AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[
-  AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC])
-  LIBS="${LIBS} ${BETTER_MALLOC_LIBS}"
-])
-
@@ -1,73 +0,0 @@
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for boost
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([boost],
-    [AS_HELP_STRING([--disable-boost],
-      [Build with boost support @<:@default=on@:>@])],
-    [ac_enable_boost="$enableval"],
-    [ac_enable_boost="yes"])
-
-  AS_IF([test "x$ac_enable_boost" = "xyes"],[
-    dnl link against libc because we're just looking for headers here
-    AC_LANG_PUSH(C++)
-    AC_LIB_HAVE_LINKFLAGS(c,,[
-      #include <boost/pool/pool.hpp>
-    ],[
-      boost::pool<> test_pool(1);
-    ])
-    AC_LANG_POP()
-  ],[
-    ac_cv_boost="no"
-  ])
-  
-
-  AS_IF([test "x$1" != "x"],[
-    AC_CACHE_CHECK([if boost is recent enough],
-      [pandora_cv_recent_boost],[
-      pandora_need_boost_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d00", $[]1, $[]2 ;'`
-      AS_IF([test "x${pandora_need_boost_version}" = "x000000"],[
-        pandora_cv_recent_boost=yes
-      ],[
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <boost/version.hpp>
-
-#if BOOST_VERSION < ${pandora_need_boost_version}
-# error boost too old!
-#endif
-          ]],[[]])
-        ],[
-          pandora_cv_recent_boost=yes
-        ],[
-          pandora_cv_recent_boost=no
-        ])
-      ])
-    ])
-    AS_IF([test "x${pandora_cv_recent_boost}" = "xno"],[
-      ac_cv_boost=no
-    ])
-  ])
-      
-
-  AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"])
-  
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST],[
-  _PANDORA_SEARCH_BOOST($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST],[
-  PANDORA_HAVE_BOOST($1)
-  AS_IF([test x$ac_cv_boost = xno],
-      AC_MSG_ERROR([boost is required for ${PACKAGE}]))
-])
-
@@ -1,37 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for GCC Atomic Support
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[
-	
-  AC_CACHE_CHECK(
-    [whether the compiler provides atomic builtins],
-    [ac_cv_gcc_atomic_builtins],
-    [AC_LINK_IFELSE(
-      [AC_LANG_PROGRAM([],[[
-        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;
-        ]])],
-      [ac_cv_gcc_atomic_builtins=yes],
-      [ac_cv_gcc_atomic_builtins=no])])
-
-  AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[
-    AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
-              [Define to 1 if compiler provides atomic builtins.])
-  ])
-
-])
@@ -1,41 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBINNODB],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libinnodb
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libinnodb],
-    [AS_HELP_STRING([--disable-libinnodb],
-      [Build with libinnodb support @<:@default=on@:>@])],
-    [ac_enable_libinnodb="$enableval"],
-    [ac_enable_libinnodb="yes"])
-
-  AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(innodb,,[
-      #include <embedded_innodb-1.0/innodb.h>
-    ],[
-      ib_u64_t
-      ib_api_version(void);
-    ])
-  ],[
-    ac_cv_libinnodb="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBINNODB],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBINNODB])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[
-  AC_REQUIRE([PANDORA_HAVE_LIBINNODB])
-  AS_IF([test "x${ac_cv_libinnodb}" = "xno"],
-      AC_MSG_ERROR([libinnodb is required for ${PACKAGE}]))
-])
@@ -1,41 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libavahi
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libavahi],
-    [AS_HELP_STRING([--disable-libavahi],
-      [Build with libavahi support @<:@default=on@:>@])],
-    [ac_enable_libavahi="$enableval"],
-    [ac_enable_libavahi="yes"])
-
-  AS_IF([test "x$ac_enable_libavahi" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[
-      #include <avahi-client/client.h>
-      #include <avahi-common/simple-watch.h>
-    ],[
-      AvahiSimplePoll *simple_poll= avahi_simple_poll_new();
-    ])
-  ],[
-    ac_cv_libavahi="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
-  AS_IF([test "x${ac_cv_libavahi}" = "xno"],
-    AC_MSG_ERROR([libavahi is required for ${PACKAGE}]))
-])
@@ -1,40 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBBDB],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for bekerely db
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libbdb],
-    [AS_HELP_STRING([--disable-libbdb],
-      [Build with libbdb support @<:@default=on@:>@])],
-    [ac_enable_libbdb="$enableval"],
-    [ac_enable_libbdb="yes"])
-
-  AS_IF([test "x$ac_enable_libbdb" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(db,,[
-      #include <db.h>
-    ],[
-      const char *test= DB_VERSION_STRING;
-    ])
-  ],[
-    ac_cv_libbdb="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBBDB, [test "x${ac_cv_libbdb}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBBDB],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])
-  AS_IF([test "x${ac_cv_libbdb}" = "xno"],
-    AC_MSG_ERROR([libbdb is required for ${PACKAGE}]))
-])
@@ -1,47 +0,0 @@
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for boost::program_options
-  dnl --------------------------------------------------------------------
-
-  AC_LANG_PUSH(C++)
-  AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[
-    #include <boost/program_options.hpp>
-  ],[
-    boost::program_options::options_description d;
-    d.add_options()("a","some option");
-  ])
-  AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[
-    AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
-      #include <boost/program_options.hpp>
-    ],[
-      boost::program_options::options_description d;
-      d.add_options()("a","some option");
-    ])
-  ])
-  AC_LANG_POP()
-  
-  AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
-    [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"])
-  BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}"
-  AC_SUBST(BOOST_LIBS) 
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
-  PANDORA_HAVE_BOOST($1)
-  _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
-  PANDORA_REQUIRE_BOOST($1)
-  _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
-  AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"],
-      AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))
-])
-
@@ -1,44 +0,0 @@
-dnl  Copyright (C) 2010 Padraig O'Sullivan
-dnl This file is free software; 
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBCASSANDRA],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libcassandra
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libcassandra],
-    [AS_HELP_STRING([--disable-libcassandra],
-      [Build with libcassandra support @<:@default=on@:>@])],
-    [ac_enable_libcassandra="$enableval"],
-    [ac_enable_libcassandra="yes"])
-
-  AS_IF([test "x$ac_enable_libcassandra" = "xyes"],[
-    AC_LANG_PUSH([C++])
-    AC_LIB_HAVE_LINKFLAGS(cassandra,[thrift],[
-      #include <libcassandra/cassandra_factory.h>
-    ],[
-       libcassandra::CassandraFactory fact("localhost", 9306);
-    ])
-    AC_LANG_POP()
-  ],[
-    ac_cv_libcassandra="no"
-  ])
-  
-  AM_CONDITIONAL(HAVE_LIBCASSANDRA, [test "x${ac_cv_libcassandra}" = "xyes"])
-  
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBCASSANDRA],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBCASSANDRA])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBCASSANDRA],[
-  AC_REQUIRE([PANDORA_HAVE_LIBCASSANDRA])
-  AS_IF([test "x$ac_cv_libcassandra" = "xno"],[
-      AC_MSG_ERROR([libcassandra is required for ${PACKAGE}])
-  ])
-])
@@ -1,51 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libdl
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBDL],[
-
-  save_LIBS="$LIBS"
-  LIBS=""
-  AC_CHECK_LIB(dl,dlopen)
-  AC_CHECK_FUNCS(dlopen)
-  LIBDL_LIBS="$LIBS"
-  LIBS="${save_LIBS}"
-  AC_SUBST(LIBDL_LIBS)
-
-  AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBDL],[
-
-  AC_ARG_ENABLE([libdl],
-    [AS_HELP_STRING([--disable-libdl],
-      [Build with libdl support @<:@default=on@:>@])],
-    [ac_enable_libdl="$enableval"],
-    [ac_enable_libdl="yes"])
-
-  _PANDORA_SEARCH_LIBDL
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBDL],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBDL])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBDL],[
-  ac_enable_libdl="yes"
-  _PANDORA_SEARCH_LIBDL
-
-  AS_IF([test "$ac_cv_func_dlopen" != "yes"],[
-    AC_MSG_ERROR([libdl/dlopen() is required for ${PACKAGE}. On Debian this can be found in libc6-dev. On RedHat this can be found in glibc-devel.])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBDL],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBDL])
-])
@@ -1,61 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBDRIZZLE],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libdrizzle
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libdrizzle],
-    [AS_HELP_STRING([--disable-libdrizzle],
-      [Build with libdrizzle support @<:@default=on@:>@])],
-    [ac_enable_libdrizzle="$enableval"],
-    [ac_enable_libdrizzle="yes"])
-
-  AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(drizzle,,[
-      #include <libdrizzle/drizzle_client.h>
-    ],[
-      drizzle_st drizzle;
-      drizzle_version();
-    ])
-  ],[
-    ac_cv_libdrizzle="no"
-  ])
-  
-  AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBDRIZZLE])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[
-  AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])
-  AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],[
-    AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])
-  ],[
-    dnl We need at least 0.8 on Solaris non-sparc
-    AS_IF([test "$target_cpu" != "sparc" -a "x${TARGET_SOLARIS}" = "xtrue"],[
-      PANDORA_LIBDRIZZLE_RECENT
-    ])
-  ])
-])
-
-AC_DEFUN([PANDORA_LIBDRIZZLE_RECENT],[
-  AC_CACHE_CHECK([if libdrizzle is recent enough],
-    [pandora_cv_libdrizzle_recent],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <libdrizzle/drizzle.h>
-drizzle_con_options_t foo= DRIZZLE_CON_EXPERIMENTAL;
-    ]])],
-    [pandora_cv_libdrizzle_recent=yes],
-    [pandora_cv_libdrizzle_recent=no])])
-  AS_IF([test "$pandora_cv_libdrizzle_recent" = "no"],[
-    AC_MSG_ERROR([Your version of libdrizzle is too old. ${PACKAGE} requires at least version 0.8])
-  ])
-])
@@ -1,66 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libevent
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_LIB_HAVE_LINKFLAGS(event,,
-  [
-    #include <sys/types.h>
-    #include <sys/time.h>
-    #include <stdlib.h>
-    #include <event.h>
-  ],[
-    struct bufferevent bev;
-    bufferevent_settimeout(&bev, 1, 1);
-    event_init();
-    event_loop(EVLOOP_ONCE);
-  ]) 
-
-  AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"])
-
-  AS_IF([test "x${ac_cv_libevent}" = "xyes"],[
-    save_LIBS="${LIBS}"
-    LIBS="${LIBS} ${LTLIBEVENT}"
-    AC_CHECK_FUNCS(event_base_new)
-    AC_CHECK_FUNCS(event_base_free)
-    AC_CHECK_FUNCS(event_base_get_method)
-    LIBS="$save_LIBS"
-  ])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[
-
-  AC_ARG_ENABLE([libevent],
-    [AS_HELP_STRING([--disable-libevent],
-      [Build with libevent support @<:@default=on@:>@])],
-    [ac_enable_libevent="$enableval"],
-    [ac_enable_libevent="yes"])
-
-  _PANDORA_SEARCH_LIBEVENT
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBEVENT],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBEVENT])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[
-  ac_enable_libevent="yes"
-  _PANDORA_SEARCH_LIBEVENT
-
-  AS_IF([test x$ac_cv_libevent = xno],[
-    AC_MSG_ERROR([libevent is required for ${PACKAGE}. On Debian this can be found in libevent-dev. On RedHat this can be found in libevent-devel.])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT])
-])
@@ -1,41 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBGEARMAN],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libgearman
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libgearman],
-    [AS_HELP_STRING([--disable-libgearman],
-      [Build with libgearman support @<:@default=on@:>@])],
-    [ac_enable_libgearman="$enableval"],
-    [ac_enable_libgearman="yes"])
-
-  AS_IF([test "x$ac_enable_libgearman" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(gearman,,[
-      #include <libgearman/gearman.h>
-    ],[
-      gearman_client_st gearman_client;
-      gearman_client_context(&gearman_client);
-    ])
-  ],[
-    ac_cv_libgearman="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBGEARMAN])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
-  AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
-  AS_IF([test "x${ac_cv_libgearman}" = "xno"],
-      AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))
-])
@@ -1,44 +0,0 @@
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libgtest
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libgtest],
-    [AS_HELP_STRING([--disable-libgtest],
-      [Build with libgtest support @<:@default=on@:>@])],
-    [ac_enable_libgtest="$enableval"],
-    [ac_enable_libgtest="yes"])
-
-  AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
-    AC_LANG_PUSH(C++)
-    AC_LIB_HAVE_LINKFLAGS(gtest,,[
-      #include <gtest/gtest.h>
-TEST(pandora_test_libgtest, PandoraTest)
-{
-  ASSERT_EQ(1, 1);
-}
-    ],[])
-    AC_LANG_POP()
-  ],[
-    ac_cv_libgtest="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
-  AS_IF([test "x${ac_cv_libgtest}" = "xno"],
-    AC_MSG_ERROR([libgtest is required for ${PACKAGE}]))
-])
@@ -1,42 +0,0 @@
-dnl  Copyright (C) 2010 NorthScale
-dnl This file is free software; NorthScale
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libhashkit
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libhashkit],
-    [AS_HELP_STRING([--disable-libhashkit],
-      [Build with libhashkit support @<:@default=on@:>@])],
-    [ac_enable_libhashkit="$enableval"],
-    [ac_enable_libhashkit="yes"])
-
-  AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(hashkit,,[
-      #include <libhashkit/hashkit.h>
-    ],[
-      hashkit_st foo;
-      hashkit_st *kit = hashkit_create(&foo);
-      hashkit_free(kit);
-    ])
-  ],[
-    ac_cv_libhashkit="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[
-  AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT])
-  AS_IF([test x$ac_cv_libhashkit = xno],
-      AC_MSG_ERROR([libhashkit is required for ${PACKAGE}]))
-])
@@ -1,64 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBINNODB],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libinnodb
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libinnodb],
-    [AS_HELP_STRING([--disable-libinnodb],
-      [Build with libinnodb support @<:@default=on@:>@])],
-    [ac_enable_libinnodb="$enableval"],
-    [ac_enable_libinnodb="yes"])
-
-  AS_IF([test "x$ac_enable_libinnodb" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(innodb,,[
-      #include <embedded_innodb-1.0/innodb.h>
-    ],[
-      ib_u64_t
-      ib_api_version(void);
-    ])
-  ],[
-    ac_cv_libinnodb="no"
-  ])
-
-
-  AC_CACHE_CHECK([if libinnodb is recent enough],
-    [ac_cv_recent_innodb_h],[
-      save_LIBS=${LIBS}
-      LIBS="${LIBS} ${LTLIBINNODB}"
-      AC_LINK_IFELSE(
-          [AC_LANG_PROGRAM([[
-      #include <embedded_innodb-1.0/innodb.h>
-        ]],[[
-      /* Make sure we have the two-arg version */
-      ib_table_drop(NULL, "nothing");
-        ]])],[
-        ac_cv_recent_innodb_h=yes
-      ],[
-        ac_cv_recent_innodb_h=no
-      ])
-      LIBS="${save_LIBS}"
-    ])
-  AS_IF([test "x${ac_cv_recent_innodb_h}" = "xno"],[
-    AC_MSG_WARN([${PACKAGE} requires at least version 1.0.6 of Embedded InnoDB])
-    ac_cv_libinnodb=no
-  ])
-        
-  AM_CONDITIONAL(HAVE_LIBINNODB, [test "x${ac_cv_libinnodb}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBINNODB],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBINNODB])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBINNODB],[
-  AC_REQUIRE([PANDORA_HAVE_LIBINNODB])
-  AS_IF([test "x${ac_cv_libinnodb}" = "xno"],
-      AC_MSG_ERROR([libinnodb is required for ${PACKAGE}]))
-])
@@ -1,73 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libldap
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBLDAP],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_LIB_HAVE_LINKFLAGS(ldap,,
-  [#include <ldap.h>],
-  [
-    LDAP *ldap;
-    ldap_initialize(&ldap, "ldap://localhost/");
-  ])
-  AS_IF([test "x$ac_cv_libldap" = "xno"],
-  [
-    unset ac_cv_libldap
-    unset HAVE_LIBLDAP
-    unset LIBLDAP
-    unset LIBLDAP_PREFIX
-    unset LTLIBLDAP
-    AC_LIB_HAVE_LINKFLAGS(ldap,,
-    [#include <ldap/ldap.h>],
-    [
-      LDAP *ldap;
-      ldap_initialize(&ldap, "ldap://localhost/");
-    ])
-    AS_IF([test "x$ac_cv_libldap" = "xyes"], [
-      ac_cv_ldap_location="<ldap/ldap.h>"
-    ])
-  ],[
-    ac_cv_ldap_location="<ldap.h>"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBLDAP, [test "x${ac_cv_libldap}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBLDAP],[
-
-  AC_ARG_ENABLE([libldap],
-    [AS_HELP_STRING([--disable-libldap],
-      [Build with libldap support @<:@default=on@:>@])],
-    [ac_enable_libldap="$enableval"],
-    [ac_enable_libldap="yes"])
-
-  _PANDORA_SEARCH_LIBLDAP
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBLDAP],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBLDAP])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBLDAP],[
-  ac_enable_libldap="yes"
-  _PANDORA_SEARCH_LIBLDAP
-
-  AS_IF([test x$ac_cv_libldap = xno],[
-    AC_MSG_ERROR([libldap is required for ${PACKAGE}. On Debian this can be found in libldap2-dev. On RedHat this can be found in openldap-devel.])
-  ],[
-    AC_DEFINE_UNQUOTED(LDAP_HEADER,[${ac_cv_ldap_location}],
-                       [Location of ldap header])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBLDAP],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBLDAP])
-])
@@ -1,106 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBMEMCACHED],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libmemcached
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libmemcached],
-    [AS_HELP_STRING([--disable-libmemcached],
-      [Build with libmemcached support @<:@default=on@:>@])],
-    [ac_enable_libmemcached="$enableval"],
-    [ac_enable_libmemcached="yes"])
-
-  AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(memcached,,[
-      #include <libmemcached/memcached.h>
-    ],[
-      memcached_st memc;
-      memcached_dump_func *df;
-      memcached_lib_version();
-    ])
-  ],[
-    ac_cv_libmemcached="no"
-  ])
-
-  AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
-      #include <libmemcached/protocol_handler.h>
-    ],[
-      struct memcached_protocol_st *protocol_handle;
-      protocol_handle= memcached_protocol_create_instance();
-    ])
-  ],[
-    ac_cv_libmemcachedprotocol="no"
-  ])
-  
-  AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
-    [pandora_cv_libmemcached_server_fn],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <libmemcached/memcached.h>
-memcached_server_fn callbacks[1];
-    ]])],
-    [pandora_cv_libmemcached_server_fn=yes],
-    [pandora_cv_libmemcached_server_fn=no])])
-
-  AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
-    AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
-  ])
-])
-
-AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
-
-  AC_CACHE_CHECK([if libmemcached is recent enough],
-    [pandora_cv_recent_libmemcached],[
-    AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
-      pandora_cv_recent_libmemcached=no
-    ],[
-      AS_IF([test "x$1" != "x"],[
-        pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
-        AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
-          pandora_cv_recent_libmemcached=yes
-        ],[
-          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <libmemcached/configure.h>
-
-#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
-# error libmemcached too old!
-#endif
-            ]],[[]])
-          ],[
-            pandora_cv_recent_libmemcached=yes
-          ],[
-            pandora_cv_recent_libmemcached=no
-          ])
-        ])
-      ],[
-        pandora_cv_recent_libmemcached=yes
-      ])
-    ])
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
-  
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
-  _PANDORA_RECENT_LIBMEMCACHED($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
-  PANDORA_HAVE_LIBMEMCACHED($1)
-  AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
-      AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
-  PANDORA_HAVE_LIBMEMCACHED($1)
-  AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
-      AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))
-])
@@ -1,146 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl  Copyright (C) 2010 Monty Taylor
-dnl  This file is free software; Sun Microsystems
-dnl  gives unlimited permission to copy and/or distribute it,
-dnl  with or without modifications, as long as this notice is preserved.
-dnl
-
-AC_DEFUN([PANDORA_WITH_MYSQL],[
-  AC_ARG_WITH([mysql],
-    [AS_HELP_STRING([--with-mysql=PATH],
-        [path to mysql_config binary or mysql prefix dir])], 
-      [with_mysql=$withval],
-      [with_mysql=":"])
-
-  dnl There are three possibilities:
-  dnl   1) nothing is given: we will search for mysql_config in PATH
-  dnl   2) the location of mysql_config is given: we'll use that to determine
-  dnl   3) a directory argument is given: that will be mysql_base
-
-     
-  dnl option 1: nothing, we need to insert something into MYSQL_CONFIG
-  AS_IF([test "x$with_mysql" = "x:"],[
-    AC_CHECK_PROGS(MYSQL_CONFIG,[mysql_config])
-  ],[
-    MYSQL_CONFIG="${with_mysql}"
-  ])
-
-  AC_CACHE_CHECK([for MySQL Base Location],[pandora_cv_mysql_base],[
-
-    dnl option 2: something in MYSQL_CONFIG now, use that to get a base dir
-    AS_IF([test -f "${MYSQL_CONFIG}" -a -x "${MYSQL_CONFIG}"],[
-      pandora_cv_mysql_base=$(dirname $(MYSQL_CONFIG --include | sed 's/-I//'))
-    ],[
-      dnl option 1: a directory
-      AS_IF([test -d $with_mysql],[pandora_cv_mysql_base=$with_mysql],[
-        pandora_cv_mysql_base="not found"
-      ])
-    ])
-  ])
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBMYSQLCLIENT],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_ARG_ENABLE([libmysqlclient],
-    [AS_HELP_STRING([--disable-libmysqlclient],
-      [Build with libmysqlclient support @<:@default=on@:>@])],
-    [ac_enable_libmysqlclient="$enableval"],
-    [ac_enable_libmysqlclient="yes"])
-
-  AS_IF([test "x$ac_enable_libmysqlclient" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(mysqlclient_r,,[
-#include <mysql/mysql.h>
-    ],[
-MYSQL mysql;
-  ])],[
-    ac_cv_libmysqlclient_r="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBMYSQLCLIENT, [test "x${ac_cv_libmysqlclient_r}" = "xyes"])
-  
-AC_DEFUN([PANDORA_HAVE_LIBMYSQLCLIENT],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBMYSQLCLIENT])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBMYSQLCLIENT],[
-  AC_REQUIRE([PANDORA_HAVE_LIBMYSQLCLIENT])
-  AS_IF([test "x${ac_cv_libmysqlclient_r}" = "xno"],
-      AC_MSG_ERROR([libmysqlclient_r is required for ${PACKAGE}]))
-])
-
-  AS_IF([test "x$MYSQL_CONFIG" = "xISDIR"],[
-    IBASE="-I${with_mysql}"
-    MYSQL_CONFIG="${with_mysql}/scripts/mysql_config"
-    ADDIFLAGS="$IBASE/include "
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include/ndbapi "
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include/mgmapi "
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/include "
-    LDFLAGS="-L${with_mysql}/storage/ndb/src/.libs -L${with_mysql}/libmysql_r/.libs/ -L${with_mysql}/mysys/.libs -L${with_mysql}/mysys -L${with_mysql}/strings/.libs -L${with_mysql}/strings "
-  ],[
-    IBASE=`$MYSQL_CONFIG --include`
-    ADDIFLAGS=""
-    # add regular MySQL C flags
-    ADDCFLAGS=`$MYSQL_CONFIG --cflags` 
-    # add NdbAPI specific C flags
-    LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r | sed 's/-lmysqlclient_r//'`
-    ])
-
-
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb"
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/ndbapi"
-    ADDIFLAGS="$ADDIFLAGS $IBASE/storage/ndb/mgmapi"
-    ADDIFLAGS="$ADDIFLAGS $IBASE/ndb"
-    ADDIFLAGS="$ADDIFLAGS $IBASE/ndb/ndbapi"
-    ADDIFLAGS="$ADDIFLAGS $IBASE/ndb/mgmapi"
-    ADDIFLAGS="$ADDIFLAGS $IBASE"
-
-    CFLAGS="$CFLAGS $ADDCFLAGS $ADDIFLAGS"    
-    CXXFLAGS="$CXXFLAGS $ADDCFLAGS $ADDIFLAGS" 
-    MYSQL_INCLUDES="$IBASE $ADDIFLAGS"   
-
-    
-    dnl AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,[AC_MSG_ERROR([Can't link against libmysqlclient_r])])
-    dnl First test to see if we can run with only ndbclient
-    AC_CHECK_LIB([ndbclient],[decimal_bin_size],,[dnl else
-      LDFLAGS="$LDFLAGS -lmysys -ldbug"
-      AC_CHECK_LIB([mysqlclient_r],[safe_mutex_init],,)
-      AC_CHECK_LIB([ndbclient],[ndb_init],,[
-        AC_MSG_ERROR([Can't link against libndbclient])])
-      AC_CHECK_LIB([mystrings],[decimal_bin_size],,[
-          AC_MSG_ERROR([Can't find decimal_bin_size])])])
-    AC_MSG_CHECKING(for NdbApi headers)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <NdbApi.hpp>]], [[int attr=NdbTransaction::Commit; ]])],[ndbapi_found="yes"],[])
-    AS_IF([test "$ndbapi_found" = "yes"], 
-       [AC_MSG_RESULT(found)],
-       [AC_MSG_ERROR([Couldn't find NdbApi.hpp!])])
-    AC_MSG_CHECKING(for NDB_LE_ThreadConfigLoop)
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mgmapi.h>]], [[int attr=NDB_LE_ThreadConfigLoop; ]])],[have_cge63="yes"],[])
-      AS_IF([test "$have_cge63" = "yes"],
-        [AC_MSG_RESULT(found)
-         HAVE_CGE63="-DCGE63"
-         AC_SUBST(HAVE_CGE63)],
-        [AC_MSG_RESULT(missing)])
-
-    LDFLAGS="$LDFLAGS $LIBS"
-  
-
-    MYSQL_MAJOR_VERSION=`$MYSQL_CONFIG --version | sed -e 's/\.//g' -e 's/-//g' -e 's/[A-Za-z]//g' | cut -c1-2`
-
-    case "$MYSQL_MAJOR_VERSION" in 
-      50) AC_DEFINE(MYSQL_50, [1], [mysql5.0])
-	;;
-      51) AC_DEFINE(MYSQL_51, [1], [mysql5.1])
-        ;;
-      *) echo "Unsupported version of MySQL Detected!"
-        ;;
-     esac
-    
-    AC_SUBST(MYSQL_MAJOR_VERSION)
-    AC_SUBST(MYSQL_CONFIG)
-    
-  
-])
-
@@ -1,80 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl  Copyright (C) 2010 Monty Taylor
-dnl  This file is free software; Sun Microsystems
-dnl  gives unlimited permission to copy and/or distribute it,
-dnl  with or without modifications, as long as this notice is preserved.
-dnl
-
-AC_DEFUN([_PANDORA_SEARCH_LIBNDBCLIENT],[
-
-  AC_REQUIRE([AC_LIB_PREFIX])
-  AC_REQUIRE([PANDORA_WITH_MYSQL])
-
-  AC_ARG_ENABLE([libndbclient],
-    [AS_HELP_STRING([--disable-libndbclient],
-      [Build with libndbclient support @<:@default=on@:>@])],
-    [ac_enable_libndbclient="$enableval"],
-    [ac_enable_libndbclient="yes"])
-
-  AC_ARG_WITH([libndbclient-prefix],
-    [AS_HELP_STRING([--with-libndbclient-prefix],
-      [search for libndbclient in DIR])],
-    [ac_with_libndbclient=${withval}],
-    [ac_with_libndbclient=${pandora_cv_mysql_base}])
-
-  save_LIBS="${LIBS}"
-  LIBS=""
-  save_CPPFLAGS="${CPPFLAGS}"
-  AS_IF([test "x${ac_with_libndbclient}" != "x"],[
-    LIBS="-L${ac_with_libndbclient}/lib/mysql -L${ac_with_libndbclient}/lib"
-    AS_IF([test "$GCC" = "yes"],[
-      ndb_include_prefix="-isystem "
-    ],[
-      ndb_include_prefix="-I"
-    ])
-    CPPFLAGS="${CPPFLAGS} ${ndb_include_prefix}${ac_with_libndbclient}/include ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/ndbapi ${ndb_include_prefix}${ac_with_libndbclient}/include/mysql/storage/ndb/mgmapi"
-  ])
-  LIBS="${LIBS} -lndbclient -lmysqlclient_r"
-
-  AC_CACHE_CHECK([if NdbApi works],[ac_cv_libndbclient],[
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <NdbApi.hpp>
-      ]],[[
-Ndb *ndb;
-ndb_init();
-      ]])
-    ],[
-      ac_cv_libndbclient=yes
-    ],[
-      ac_cv_libndbclient=no
-    ])
-  ])
-  AC_LANG_POP()
-
-  LIBNDBCLIENT="${LIBS}"
-  LTLIBNDBCLIENT="${LIBS}"
-  AC_SUBST([LIBNDBCLIENT])
-  AC_SUBST([LTLIBNDBCLIENT])
-
-  AS_IF([test "x${ac_cv_libndbclient}" = "xno"],[
-    CPPFLAGS="${save_CPPFLAGS}"
-  ])    
-  LIBS="${save_LIBS}"
-  
-  AM_CONDITIONAL(HAVE_LIBNDBCLIENT, [test "x${ac_cv_libndbclient}" = "xyes"])
-])
-  
-AC_DEFUN([PANDORA_HAVE_LIBNDBCLIENT],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBNDBCLIENT])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBNDBCLIENT],[
-  AC_REQUIRE([PANDORA_HAVE_LIBNDBCLIENT])
-  AS_IF([test "x${ac_cv_libndbclient}" = "xno"],
-      AC_MSG_ERROR([libndbclient is required for ${PACKAGE}]))
-])
-
@@ -1,73 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libpcre
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_LIB_HAVE_LINKFLAGS(pcre,,
-  [#include <pcre.h>],
-  [
-    pcre *re= NULL;
-    pcre_version();
-  ])
-  AS_IF([test "x$ac_cv_libpcre" = "xno"],
-  [
-    unset ac_cv_libpcre
-    unset HAVE_LIBPCRE
-    unset LIBPCRE
-    unset LIBPCRE_PREFIX
-    unset LTLIBPCRE
-    AC_LIB_HAVE_LINKFLAGS(pcre,,
-    [#include <pcre/pcre.h>],
-    [
-      pcre *re= NULL;
-      pcre_version();
-    ])
-    AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
-      ac_cv_pcre_location="<pcre/pcre.h>"
-    ])
-  ],[
-    ac_cv_pcre_location="<pcre.h>"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
-
-  AC_ARG_ENABLE([libpcre],
-    [AS_HELP_STRING([--disable-libpcre],
-      [Build with libpcre support @<:@default=on@:>@])],
-    [ac_enable_libpcre="$enableval"],
-    [ac_enable_libpcre="yes"])
-
-  _PANDORA_SEARCH_LIBPCRE
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
-  ac_enable_libpcre="yes"
-  _PANDORA_SEARCH_LIBPCRE
-
-  AS_IF([test x$ac_cv_libpcre = xno],[
-    AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])
-  ],[
-    AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
-                       [Location of pcre header])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])
-])
@@ -1,46 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBPQ],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libpq
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libpq],
-    [AS_HELP_STRING([--disable-libpq],
-      [Build with libpq support @<:@default=on@:>@])],
-    [ac_enable_libpq="$enableval"],
-    [ac_enable_libpq="yes"])
-
-  AS_IF([test "x$ac_enable_libpq" = "xyes"],[
-    AC_CHECK_HEADERS([libpq-fe.h])
-    AC_LIB_HAVE_LINKFLAGS(pq,,[
-      #ifdef HAVE_LIBPQ_FE_H
-      # include <libpq-fe.h>
-      #else
-      # include <postgresql/libpq-fe.h>
-      #endif
-    ], [
-      PGconn *conn;
-      conn = PQconnectdb(NULL);
-    ])
-  ],[
-    ac_cv_libpq="no"
-  ])
-  
-  AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBPQ],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBPQ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[
-  AC_REQUIRE([PANDORA_HAVE_LIBPQ])
-  AS_IF([test "x${ac_cv_libpq}" = "xno"],
-    AC_MSG_ERROR([libpq is required for ${PACKAGE}]))
-])
@@ -1,44 +0,0 @@
-dnl  Copyright (C) 2010 Padraig O'Sullivan
-dnl This file is free software; 
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBPQXX],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libpqxx
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libpqxx],
-    [AS_HELP_STRING([--disable-libpqxx],
-      [Build with libpqxx support @<:@default=on@:>@])],
-    [ac_enable_libpqxx="$enableval"],
-    [ac_enable_libpqxx="yes"])
-
-  AS_IF([test "x$ac_enable_libpqxx" = "xyes"],[
-    AC_LANG_PUSH([C++])
-    AC_LIB_HAVE_LINKFLAGS(pqxx,,[
-      #include <pqxx/pqxx>
-    ],[
-       pqxx::connection conn("dbname=test");
-    ])
-    AC_LANG_POP()
-  ],[
-    ac_cv_libpqxx="no"
-  ])
-  
-  AM_CONDITIONAL(HAVE_LIBPQXX, [test "x${ac_cv_libpqxx}" = "xyes"])
-  
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBPQXX],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBPQXX])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBPQXX],[
-  AC_REQUIRE([PANDORA_HAVE_LIBPQXX])
-  AS_IF([test "x$ac_cv_libpqxx" = "xno"],[
-      AC_MSG_ERROR([libpqxx is required for ${PACKAGE}])
-  ])
-])
@@ -1,242 +0,0 @@
-#
-# SYNOPSIS
-#
-#   PANDORA_HAVE_LIBREADLINE
-#
-# DESCRIPTION
-#
-#   Searches for a readline compatible library. If found, defines
-#   `HAVE_LIBREADLINE'. If the found library has the `add_history'
-#   function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
-#   locations of the necessary include files and sets `HAVE_READLINE_H'
-#   or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
-#   'HAVE_HISTORY_H' if the corresponding include files exists.
-#
-#   The libraries that may be readline compatible are `libedit',
-#   `libeditline' and `libreadline'. Sometimes we need to link a
-#   termcap library for readline to work, this macro tests these cases
-#   too by trying to link with `libtermcap', `libcurses' or
-#   `libncurses' before giving up.
-#
-#   Here is an example of how to use the information provided by this
-#   macro to perform the necessary includes or declarations in a C
-#   file:
-#
-#     #ifdef HAVE_LIBREADLINE
-#     #  if defined(HAVE_READLINE_READLINE_H)
-#     #    include <readline/readline.h>
-#     #  elif defined(HAVE_READLINE_H)
-#     #    include <readline.h>
-#     #  else /* !defined(HAVE_READLINE_H) */
-#     extern char *readline ();
-#     #  endif /* !defined(HAVE_READLINE_H) */
-#     char *cmdline = NULL;
-#     #else /* !defined(HAVE_READLINE_READLINE_H) */
-#       /* no readline */
-#     #endif /* HAVE_LIBREADLINE */
-#
-#     #ifdef HAVE_READLINE_HISTORY
-#     #  if defined(HAVE_READLINE_HISTORY_H)
-#     #    include <readline/history.h>
-#     #  elif defined(HAVE_HISTORY_H)
-#     #    include <history.h>
-#     #  else /* !defined(HAVE_HISTORY_H) */
-#     extern void add_history ();
-#     extern int write_history ();
-#     extern int read_history ();
-#     #  endif /* defined(HAVE_READLINE_HISTORY_H) */
-#       /* no history */
-#     #endif /* HAVE_READLINE_HISTORY */
-#
-# LAST MODIFICATION
-#
-#   2009-11-17
-#
-# Based on VL_LIB_READLINE from  Ville Laurikari
-#
-# COPYLEFT
-#
-#   Copyright (c) 2009 Monty Taylor
-#   Copyright (c) 2002 Ville Laurikari <vl@iki.fi>
-#
-#   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.
-
-AC_DEFUN([PANDORA_CHECK_TIOCGWINSZ],[
-  AC_CACHE_CHECK([for TIOCGWINSZ in sys/ioctl.h],
-    [pandora_cv_tiocgwinsz_in_ioctl],[
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/ioctl.h>
-      ]],[[
-int x= TIOCGWINSZ;
-      ]])
-    ],[
-      pandora_cv_tiocgwinsz_in_ioctl=yes
-    ],[
-      pandora_cv_tiocgwinsz_in_ioctl=no
-    ])
-  ])
-  AS_IF([test "$pandora_cv_tiocgwinsz_in_ioctl" = "yes"],[   
-    AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
-              [READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.])
-  ])
-])
-
-AC_DEFUN([PANDORA_CHECK_RL_COMPENTRY], [
-  AC_CACHE_CHECK([defined rl_compentry_func_t], [pandora_cv_rl_compentry],[
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include "stdio.h"
-#include "readline/readline.h"
-      ]],[[
-rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
-      ]])
-    ],[
-      pandora_cv_rl_compentry=yes
-    ],[
-      pandora_cv_rl_compentry=no
-    ])
-  ])
-  AS_IF([test "$pandora_cv_rl_compentry" = "yes"],[
-    AC_DEFINE([HAVE_RL_COMPENTRY], [1],
-              [Does system provide rl_compentry_func_t])
-  ])
-
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
-  AC_LANG_PUSH(C++)
-  AC_CACHE_CHECK([rl_compentry_func_t works], [pandora_cv_rl_compentry_works],[
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include "stdio.h"
-#include "readline/readline.h"
-      ]],[[
-rl_completion_entry_function= (rl_compentry_func_t*)NULL;
-      ]])
-    ],[
-      pandora_cv_rl_compentry_works=yes
-    ],[
-      pandora_cv_rl_compentry_works=no
-    ])
-  ])
-  AS_IF([test "$pandora_cv_rl_compentry_works" = "yes"],[
-    AC_DEFINE([HAVE_WORKING_RL_COMPENTRY], [1],
-              [Does system provide an rl_compentry_func_t that is usable])
-  ])
-  CXXFLAGS="${save_CXXFLAGS}"
-  AC_LANG_POP()
-])
-
-
-AC_DEFUN([PANDORA_CHECK_RL_COMPLETION_FUNC], [
-  AC_CACHE_CHECK([defined rl_completion_func_t], [pandora_cv_rl_completion],[
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-#include "stdio.h"
-#include "readline/readline.h"
-      ]],[[
-rl_completion_func_t *func1= (rl_completion_func_t*)0;
-      ]])
-    ],[
-      pandora_cv_rl_completion=yes
-    ],[
-      pandora_cv_rl_completion=no
-    ])
-  ])
-  AS_IF([test "$pandora_cv_rl_completion" = "yes"],[
-    AC_DEFINE([HAVE_RL_COMPLETION], [1],
-              [Does system provide rl_completion_func_t])
-  ])
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBREADLINE], [
-
-  save_LIBS="${LIBS}"
-  LIBS=""
-
-  AC_CACHE_CHECK([for a readline compatible library],
-                 ac_cv_libreadline, [
-    ORIG_LIBS="$LIBS"
-    for readline_lib in readline edit editline; do
-      for termcap_lib in "" termcap curses ncurses; do
-        if test -z "$termcap_lib"; then
-          TRY_LIB="-l$readline_lib"
-        else
-          TRY_LIB="-l$readline_lib -l$termcap_lib"
-        fi
-        LIBS="$ORIG_LIBS $TRY_LIB"
-        AC_TRY_LINK_FUNC(readline, ac_cv_libreadline="$TRY_LIB")
-        if test -n "$ac_cv_libreadline"; then
-          break
-        fi
-      done
-      if test -n "$ac_cv_libreadline"; then
-        break
-      fi
-    done
-    if test -z "$ac_cv_libreadline"; then
-      ac_cv_libreadline="no"
-      LIBS="$ORIG_LIBS"
-    fi
-  ])
-
-  if test "$ac_cv_libreadline" != "no"; then
-    AC_DEFINE(HAVE_LIBREADLINE, 1,
-              [Define if you have a readline compatible library])
-    AC_CHECK_HEADERS(readline.h readline/readline.h)
-    AC_CACHE_CHECK([whether readline supports history],
-                   ac_cv_libreadline_history, [
-      ac_cv_libreadline_history="no"
-      AC_TRY_LINK_FUNC(add_history, ac_cv_libreadline_history="yes")
-    ])
-    if test "$ac_cv_libreadline_history" = "yes"; then
-      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
-                [Define if your readline library has \`add_history'])
-      AC_CHECK_HEADERS(history.h readline/history.h)
-    fi
-  fi
-  PANDORA_CHECK_RL_COMPENTRY  
-  PANDORA_CHECK_RL_COMPLETION_FUNC
-  PANDORA_CHECK_TIOCGWINSZ
-
-
-  READLINE_LIBS="${LIBS}"
-  LIBS="${save_LIBS}"
-  AC_SUBST(READLINE_LIBS)
-
-  AM_CONDITIONAL(HAVE_LIBREADLINE, [test "x${ac_cv_libreadline}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBREADLINE],[
-
-  AC_ARG_ENABLE([libreadline],
-    [AS_HELP_STRING([--disable-libreadline],
-      [Build with libreadline support @<:@default=on@:>@])],
-    [ac_enable_libreadline="$enableval"],
-    [ac_enable_libreadline="yes"])
-
-  _PANDORA_SEARCH_LIBREADLINE
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBREADLINE],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBREADLINE])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBREADLINE],[
-  ac_enable_libreadline="yes"
-  _PANDORA_SEARCH_LIBREADLINE
-
-  AS_IF([test "x$ac_cv_libreadline" = "xno"],
-    AC_MSG_ERROR([libreadline is required for ${PACKAGE}. On Debian this can be found in libreadline5-dev. On RedHat this can be found in readline-devel.]))
-
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBREADLINE],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBREADLINE])
-])
-
-
@@ -1,42 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSQLITE3],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libsqlite3
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libsqlite3],
-    [AS_HELP_STRING([--disable-libsqlite3],
-      [Build with libsqlite3 support @<:@default=on@:>@])],
-    [ac_enable_libsqlite3="$enableval"],
-    [ac_enable_libsqlite3="yes"])
-
-  AS_IF([test "x$ac_enable_libsqlite3" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(sqlite3,,[
-      #include <stdio.h>
-      #include <sqlite3.h>
-    ],[
-      sqlite3 *db;
-      sqlite3_open(NULL, &db);
-    ])
-  ],[
-    ac_cv_libsqlite3="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSQLITE3],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])
-  AS_IF([test "x${ac_cv_libsqlite3}" = "xno"],
-    AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}]))
-])
@@ -1,54 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
- 
-dnl Provides support for finding libtokyocabinet.
-dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET
-
-AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libtokyocabinet
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libtokyocabinet],
-    [AS_HELP_STRING([--disable-libtokyocabinet],
-      [Build with libtokyocabinet support @<:@default=on@:>@])],
-    [ac_enable_libtokyocabinet="$enableval"],
-    [ac_enable_libtokyocabinet="yes"])
-
-  AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[
-#include <tcutil.h>
-#include <tcadb.h>
-    ],[
-const char *test= tcversion;
-bool ret= tcadboptimize(NULL, "params");
-    ])
-  ],[
-    ac_cv_libtokyocabinet="no"
-  ])
-
-  AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[
-
-    PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet >= 1.4.15], [
-      ac_cv_libtokyocabinet=yes
-      LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
-      LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
-    ],[test x = y])
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
-  AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"],
-    AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.]))
-])
@@ -1,55 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libuuid
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
-  dnl not be a lib is weird.
-  AC_CHECK_HEADERS(uuid/uuid.h)
-  AC_LIB_HAVE_LINKFLAGS(uuid,,
-  [
-    #include <uuid/uuid.h>
-  ],
-  [
-    uuid_t uout;
-    uuid_generate(uout);
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBUUID],[
-
-  AC_ARG_ENABLE([libuuid],
-    [AS_HELP_STRING([--disable-libuuid],
-      [Build with libuuid support @<:@default=on@:>@])],
-    [ac_enable_libuuid="$enableval"],
-    [ac_enable_libuuid="yes"])
-
-  _PANDORA_SEARCH_LIBUUID
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBUUID],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBUUID])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[
-  ac_enable_libuuid="yes"
-  _PANDORA_SEARCH_LIBUUID
-  AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
-    AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID])
-])
@@ -1,40 +0,0 @@
-dnl  Copyright (C) 2010 NorthScale
-dnl This file is free software; NorthScale
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBVBUCKET],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libvbucket
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libvbucket],
-    [AS_HELP_STRING([--disable-libvbucket],
-      [Build with libvbucket support @<:@default=on@:>@])],
-    [ac_enable_libvbucket="$enableval"],
-    [ac_enable_libvbucket="yes"])
-
-  AS_IF([test "x$ac_enable_libvbucket" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(vbucket,,[
-      #include <libvbucket/vbucket.h>
-    ],[
-      VBUCKET_CONFIG_HANDLE config = vbucket_config_parse_file(NULL);
-    ])
-  ],[
-    ac_cv_libvbucket="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBVBUCKET, [test "x${ac_cv_libvbucket}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBVBUCKET],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBVBUCKET])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBVBUCKET],[
-  AC_REQUIRE([PANDORA_HAVE_LIBVBUCKET])
-  AS_IF([test x$ac_cv_libvbucket = xno],
-      AC_MSG_ERROR([libvbucket is required for ${PACKAGE}]))
-])
@@ -1,52 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
- 
-dnl Provides support for finding libxml2.
-dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2
-
-AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libxml2
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libxml2],
-    [AS_HELP_STRING([--disable-libxml2],
-      [Build with libxml2 support @<:@default=on@:>@])],
-    [ac_enable_libxml2="$enableval"],
-    [ac_enable_libxml2="yes"])
-
-  AS_IF([test "x$ac_enable_libxml2" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(xml2,,[
-#include <libxml/xmlversion.h>
-    ],[
-const char *test= LIBXML_DOTTED_VERSION;
-    ])
-  ],[
-    ac_cv_libxml2="no"
-  ])
-
-  AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[
-
-    PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [
-      ac_cv_libxml2=yes
-      LTLIBXML2=${LIBXML2_LIBS}
-      LIBXML2=${LIBXML2_LIBS}
-    ],[])
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBXML2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
-  AS_IF([test "x${ac_cv_libxml2}" = "xno"],
-    AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.]))
-])
@@ -1,51 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check for libz
-#--------------------------------------------------------------------
-
-
-AC_DEFUN([_PANDORA_SEARCH_LIBZ],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  AC_LIB_HAVE_LINKFLAGS(z,,
-  [
-    #include <zlib.h>
-  ],[
-    crc32(0, Z_NULL, 0);
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"])
-])
-
-AC_DEFUN([_PANDORA_HAVE_LIBZ],[
-
-  AC_ARG_ENABLE([libz],
-    [AS_HELP_STRING([--disable-libz],
-      [Build with libz support @<:@default=on@:>@])],
-    [ac_enable_libz="$enableval"],
-    [ac_enable_libz="yes"])
-
-  _PANDORA_SEARCH_LIBZ
-])
-
-
-AC_DEFUN([PANDORA_HAVE_LIBZ],[
-  AC_REQUIRE([_PANDORA_HAVE_LIBZ])
-])
-
-AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[
-  ac_enable_libz="yes"
-  _PANDORA_SEARCH_LIBZ
-
-  AS_IF([test x$ac_cv_libz = xno],[
-    AC_MSG_ERROR([libz is required for ${PACKAGE}. On Debian this can be found in zlib1g-dev. On RedHat this can be found in zlib-devel.])
-  ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBZ],[
-  AC_REQUIRE([_PANDORA_REQUIRE_LIBZ])
-])
@@ -1,80 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-dnl --------------------------------------------------------------------
-dnl  Check for Google Proto Buffers
-dnl --------------------------------------------------------------------
-
-AC_DEFUN([_PANDORA_SEARCH_LIBPROTOBUF],[
-  AC_REQUIRE([PANDORA_HAVE_PTHREAD])
-
-  AC_LANG_PUSH([C++])
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
-  AC_LIB_HAVE_LINKFLAGS(protobuf,,
-    [#include <google/protobuf/descriptor.h>],
-    [google::protobuf::FileDescriptor* file;],
-    [system])
-  CXXFLAGS="${save_CXXFLAGS}"
-  AC_LANG_POP()
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBPROTOBUF],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[
-  AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF])
-  AS_IF([test x$ac_cv_libprotobuf = xno],
-      AC_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.]))
-])
-
-AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
-  p_recent_ver=$1
-  p_recent_ver_major=`echo $p_recent_ver | cut -f1 -d.`
-  p_recent_ver_minor=`echo $p_recent_ver | cut -f2 -d.`
-  p_recent_ver_patch=`echo $p_recent_ver | cut -f3 -d.`
-  p_recent_ver_hex=`printf "%d%03d%03d" $p_recent_ver_major $p_recent_ver_minor $p_recent_ver_patch` 
-  AC_LANG_PUSH([C++])
-  AC_CACHE_CHECK([for protobuf >= $p_recent_ver],
-    [drizzle_cv_protobuf_recent],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <google/protobuf/descriptor.h>
-#if GOOGLE_PROTOBUF_VERSION < $p_recent_ver_hex
-# error Your version of Protobuf is too old
-#endif
-      ]])],
-    [drizzle_cv_protobuf_recent=yes],
-    [drizzle_cv_protobuf_recent=no])])
-  AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[
-    AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver])
-  ])
-  AC_LANG_POP()
-])
-
-AC_DEFUN([_PANDORA_SEARCH_PROTOC],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
-  AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
-])
-
-AC_DEFUN([PANDORA_HAVE_PROTOC],[
-  AC_REQUIRE([_PANDORA_SEARCH_PROTOC])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_PROTOC],[
-  AC_REQUIRE([PANDORA_HAVE_PROTOC])
-  AS_IF([test "x$PROTOC" = "xno"],[
-    AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.])
-  ])
-])
-
-
@@ -1,133 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_SASL],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for sasl
-  dnl --------------------------------------------------------------------
-  AC_ARG_ENABLE([sasl],
-    [AS_HELP_STRING([--disable-sasl],
-      [Build with sasl support @<:@default=on@:>@])],
-    [ac_enable_sasl="$enableval"],
-    [ac_enable_sasl="yes"])
-
-  AS_IF([test "x$ac_enable_sasl" = "xyes"],
-    [
-      AC_LIB_HAVE_LINKFLAGS(sasl,,[
-        #include <stdlib.h>
-        #include <sasl/sasl.h>
-      ],[
-        sasl_server_init(NULL, NULL);
-      ])
-
-      AS_IF([test "x${ac_cv_libsasl}" != "xyes" ],
-            [
-              AC_LIB_HAVE_LINKFLAGS(sasl2,,[
-                #include <stdlib.h>
-                #include <sasl/sasl.h>
-              ],[
-                sasl_server_init(NULL, NULL);
-              ])
-              HAVE_LIBSASL="$HAVE_LIBSASL2"
-              LIBSASL="$LIBSASL2"
-              LIBSASL_PREFIX="$LIBSASL2_PREFIX"
-	      LTLIBSASL="$LT_LIBSASL2"
-            ])
-    ])
-
-  AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"],
-        [ac_cv_sasl=yes],
-        [ac_cv_sasl=no])
-
-  AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
-  AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
-  AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_SASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_SASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_SASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_SASL])
-  AS_IF([test "x${ac_cv_sasl}" = "xno"],
-    AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libsasl
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libsasl],
-    [AS_HELP_STRING([--disable-libsasl],
-      [Build with libsasl support @<:@default=on@:>@])],
-    [ac_enable_libsasl="$enableval"],
-    [ac_enable_libsasl="yes"])
-
-  AS_IF([test "x$ac_enable_libsasl" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(sasl,,[
-      #include <stdlib.h>
-      #include <sasl/sasl.h>
-    ],[
-      sasl_server_init(NULL, NULL);
-    ])
-  ],[
-    ac_cv_libsasl="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
-  AS_IF([test "x${ac_cv_libsasl}" = "xno"],
-    AC_MSG_ERROR([libsasl is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libsasl2
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libsasl2],
-    [AS_HELP_STRING([--disable-libsasl2],
-      [Build with libsasl2 support @<:@default=on@:>@])],
-    [ac_enable_libsasl2="$enableval"],
-    [ac_enable_libsasl2="yes"])
-
-  AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(sasl2,,[
-      #include <stdlib.h>
-      #include <sasl2/sasl2.h>
-    ],[
-      sasl2_server_init(NULL, NULL);
-    ])
-  ],[
-    ac_cv_libsasl2="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
-  AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
-    AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
-])
@@ -1,45 +0,0 @@
-dnl  Copyright (C) 2010 Padraig O'Sullivan
-dnl This file is free software; Padraig O'Sullivan
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_THRIFT],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for thrift
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([thrift],
-    [AS_HELP_STRING([--disable-thrift],
-      [Build with thrift support @<:@default=on@:>@])],
-    [ac_enable_thrift="$enableval"],
-    [ac_enable_thrift="yes"])
-
-  AS_IF([test "x$ac_enable_thrift" = "xyes"],[
-    AC_LANG_PUSH(C++)
-    AC_LIB_HAVE_LINKFLAGS(thrift,,[
-      #include <thrift/Thrift.h>
-    ],[
-      apache::thrift::TOutput test_output;
-    ])
-    AC_LANG_POP()
-  ],[
-    ac_cv_thrift="no"
-  ])
-  
-  AM_CONDITIONAL(HAVE_THRIFT, [test "x${ac_cv_thrift}" = "xyes"])
-  
-])
-
-AC_DEFUN([PANDORA_HAVE_THRIFT],[
-  AC_REQUIRE([_PANDORA_SEARCH_THRIFT])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_THRIFT],[
-  AC_REQUIRE([PANDORA_HAVE_THRIFT])
-  AS_IF([test x$ac_cv_thrift= xno],[
-      AC_MSG_ERROR([thrift required for ${PACKAGE}])
-  ])
-])
-
@@ -1,23 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl PANDORA_HEADER_ASSERT
-dnl ----------------
-dnl Check whether to enable assertions.
-AC_DEFUN([PANDORA_HEADER_ASSERT],
-[
-  AC_CHECK_HEADERS(assert.h)
-  AC_MSG_CHECKING([whether to enable assertions])
-  AC_ARG_ENABLE([assert],
-    [AS_HELP_STRING([--disable-assert],
-       [Turn off assertions])],
-    [ac_cv_assert="no"],
-    [ac_cv_assert="yes"])
-  AC_MSG_RESULT([$ac_cv_assert])
-
-  AS_IF([test "$ac_cv_assert" = "no"], 
-    [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
-])
-
@@ -1,25 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_LIBTOOL],[
-  AC_REQUIRE([AC_DISABLE_STATIC])
-  AC_REQUIRE([AC_PROG_LIBTOOL])
-  m4_ifndef([LT_PREREQ],[
-    pandora_have_old_libtool=yes
-  ],[
-    pandora_have_old_libtool=no
-  ])
-  AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[
-    AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2])
-  ])
-
-  dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read
-  dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT
-  dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it.
-  m4_ifdef([LT_LANG],[
-    LT_LANG(C)
-    LT_LANG(C++)
-  ])
-])
@@ -1,79 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_OPTIMIZE],[
-  dnl Build optimized or debug version ?
-  dnl First check for gcc and g++
-  AS_IF([test "$GCC" = "yes" -a "$INTELCC" = "no"],[
-
-    dnl The following is required for portable results of floating point 
-    dnl calculations on PowerPC. The same must also be done for IA-64, but 
-    dnl this options is missing in the IA-64 gcc backend.
-    case "$target_cpu" in
-      *ppc* | *powerpc*)
-        AM_CFLAGS="-mno-fused-madd ${AM_CFLAGS}"
-        AM_CXXFLAGS="-mno-fused-madd ${AM_CXXFLAGS}"
-      ;;
-    esac
-
-    dnl Once we can use a modern autoconf, we can replace the std=gnu99 here
-    dnl with using AC_CC_STD_C99 above
-    CC="${CC} -std=gnu99"
-
-    AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}"
-
-    DEBUG_CFLAGS="-O0"
-    DEBUG_CXXFLAGS="-O0"
-
-    OPTIMIZE_CFLAGS="-O3"
-    OPTIMIZE_CXXFLAGS="-O3"
-  ])
-  AS_IF([test "$INTELCC" = "yes"],[
-    dnl Once we can use a modern autoconf, we can replace the std=gnu99 here
-    dnl with using AC_CC_STD_C99 above
-    CC="${CC} -std=c99"
-
-    AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
-
-    DEBUG_CFLAGS="-O0"
-    DEBUG_CXXFLAGS="-O0"
-
-    OPTIMIZE_CFLAGS="-xHOST -O3 -no-prec-div -static"
-    OPTIMIZE_CXXFLAGS="${OPTIMIZE_CFLAGS}"
-
-  ])
-  AS_IF([test "$SUNCC" = "yes"],[
-    dnl Once we can use a modern autoconf, we can replace the -xc99=all here
-    dnl with using AC_CC_STD_C99 above
-    CC="${CC} -xc99=all"
-    CXX="${CXX} -xlang=c99"
-
-    AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}"
-    AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${AM_CXXFLAGS}"
-
-    DEBUG_CXXFLAGS="-g"
-
-    dnl TODO: Make a test for -xO4 usability here
-    OPTIMIZE_FLAGS="-xO3 -xlibmil -xdepend -xbuiltin"
-    OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}"
-    OPTIMIZE_CXXFLAGS="-g0 ${OPTIMIZE_FLAGS}"
-
-  ])
-
-  AC_ARG_WITH([debug],
-    [AS_HELP_STRING([--with-debug],
-       [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])],
-    [with_debug=$withval],
-    [with_debug=no])
-  AS_IF([test "$with_debug" = "yes"],[
-    # Debugging. No optimization.
-    AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
-  ],[
-    # Optimized version. No debug
-    AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
-    AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
-  ])
-])
@@ -1,90 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_PLATFORM],[
-
-  dnl Canonicalize the configuration name.
-
-  AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System])
-  AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System])
-  AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System])
-
-  AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System])
-  AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System])
-  AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System])
-
-
-  case "$host_os" in
-    *solaris*|*freebsd*)
-    AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
-      CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
-    ])
-
-    AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
-      LDFLAGS="${LDFLAGS} -L/usr/local/lib"
-    ])
-    ;;
-  esac
-
-  PANDORA_OPTIMIZE_BITFIELD=1
-
-  case "$target_os" in
-    *linux*)
-    TARGET_LINUX="true"
-    AC_SUBST(TARGET_LINUX)
-    AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
-      ;;
-    *darwin*)
-      TARGET_OSX="true"
-      AC_SUBST(TARGET_OSX)
-      AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
-      ;;
-    *solaris*)
-      TARGET_SOLARIS="true"
-      PANDORA_OPTIMIZE_BITFIELD=0
-      AC_SUBST(TARGET_SOLARIS)
-      AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
-      ;;
-    *freebsd*)
-      TARGET_FREEBSD="true"
-      AC_SUBST(TARGET_FREEBSD)
-      AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD])
-      AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])
-      ;;
-    *)
-      ;;
-  esac
-
-  AC_SUBST(PANDORA_OPTIMIZE_BITFIELD)
-
-  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-  AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
-
-  AS_IF([test "$INTELCC" = "yes"], [enable_rpath=no])
- 
-  dnl By default, Sun Studio grabs special versions of limits.h and string.h
-  dnl when you use <cstring> and <climits>. By setting this define, we can
-  dnl disable that and cause those to wrap the standard headers instead.
-  dnl http://www.stlport.com/doc/configure.html
-  AS_IF([test "$SUNCC" = "yes"],[
-    AC_DEFINE([_STLP_NO_NEW_C_HEADERS],[1],
-      [Cause Sun Studio to not be quite so strict with standards conflicts])
-  ])
-
-  AS_IF([test "x$TARGET_OSX" = "xtrue"],[
-    AS_IF([test "x$ac_enable_fat_binaries" = "xyes"],[
-      AM_CFLAGS="-arch i386 -arch x86_64 -arch ppc"
-      AM_CXXFLAGS="-arch i386 -arch x86_64 -arch ppc"
-      AM_LDFLAGS="-arch i386 -arch x86_64 -arch ppc"
-    ])
-  ])
-
-])
@@ -1,57 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl--------------------------------------------------------------------
-dnl PANDORA_PLUGINS
-dnl Declare our plugin modules
-dnl--------------------------------------------------------------------
-
-AC_DEFUN([PANDORA_PLUGINS],[
-
-  dnl We do this to prime the files from a fresh checkout. Normally we want
-  dnl these commands to be executed by make. Perhaps we should split them into
-  dnl a few shell script snippets in config and make Make call them... we're
-  dnl going to get there...
-  dnl ANYWAY - syscmd gets called during aclocal - so before automake. It will
-  dnl get called probably during autoconf too, so it's important to protect
-  dnl with test -f ... if the files exist, we don't have the chicken/egg 
-  dnl problem and therefore don't need to do anything here
-  m4_syscmd([python config/pandora-plugin > /dev/null])
-  m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
-
-  m4_sinclude(config/pandora-plugin.ac)
-
-  dnl Add code here to read set plugin lists and  set drizzled_default_plugin_list
-  pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
-  pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'`
-  AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL")
-  AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
-  AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list])
-  AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
-  m4_ifval(m4_normalize([$1]),[
-    AC_CONFIG_FILES($*)
-    ],[
-    AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],["$pandora_builtin_list"],
-                       [List of plugins to be built in])
-    AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_SYMBOLS_LIST],["$pandora_builtin_symbols_list"],
-                       [List of builtin plugin symbols to be built in])
-    AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],
-                       [List of plugins that should be loaded on startup if no
-                        value is given for --plugin-load])
-  ])
-
-
-  AC_SUBST(pandora_plugin_test_list)
-  AC_SUBST(pandora_plugin_libs)
-
-  pandora_plugin_defs=`echo $pandora_plugin_defs | sed 's/, *$//'`
-  AC_SUBST(pandora_plugin_defs)
-
-  AC_SUBST(PANDORA_PLUGIN_DEP_LIBS)
-  AC_SUBST(pkgplugindir,"\$(pkglibdir)")
-])
-
-AC_DEFUN([PANDORA_ADD_PLUGIN_DEP_LIB],[
-  PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} $*"
-])
@@ -1,61 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Try to define a macro to dump the current callstack.
-AC_DEFUN([PANDORA_PRINT_CALLSTACK],[
-  AC_CHECK_HEADERS([ucontext.h])
-  AS_IF([test "x$ac_cv_header_ucontext_h" = "xyes"],
-  	[ AC_CHECK_FUNCS([printstack]) ])
-
-
-  AS_IF([ test "x$ac_cv_func_printstack" != "xyes"],
-        [ AC_CHECK_HEADERS([dlfcn.h])
-          AC_CHECK_HEADERS([execinfo.h])
-          AC_CHECK_FUNCS([backtrace])
-          AC_CHECK_FUNCS([backtrace_symbols_fd]) ])
-
-  AH_BOTTOM([
-#ifdef __cplusplus
-#include <cstdio>
-#define PANDORA_PRINTSTACK_STD_PREFIX std::
-#else
-#include <stdio.h>
-#define PANDORA_PRINTSTACK_STD_PREFIX
-#endif
-
-#if defined(HAVE_UCONTEXT_H) && defined(HAVE_PRINTSTACK)
-#include <ucontext.h>
-#define pandora_print_callstack(a) \
-printstack(PANDORA_PRINTSTACK_STD_PREFIX fileno(a))
-#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD)
-
-#include <execinfo.h>
-
-#define pandora_print_callstack(a) \
-{ \
-  void *stack[100];  \
-  int depth = backtrace(stack, 100); \
-  backtrace_symbols_fd(stack, depth, PANDORA_PRINTSTACK_STD_PREFIX fileno(a)); \
-}
-#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && !defined(HAVE_BACKTRACE_SYMBOLS_FD)
-
-#include <execinfo.h>
-
-#define pandora_print_callstack(a) \
-{ \
-  void *stack[100];  \
-  int depth= backtrace(stack, 100); \
-  char **symbol= backtrace_symbols(stack, depth); \
-  for (int x= 0; x < size; ++x) \
-    PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, "%s\n", symbol[x]); \
-}
-#else
-#define pandora_print_callstack(a) \
-    PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, \
-      "Stackdump not supported for this platform\n");
-#endif
-  ])
-
-])
@@ -1,258 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-dnl --------------------------------------------------------------------
-dnl  Check for libpthread
-dnl --------------------------------------------------------------------
-
-AC_DEFUN([PANDORA_PTHREAD_YIELD],[
-  AC_REQUIRE([ACX_PTHREAD])
-
-  save_CFLAGS="${CFLAGS}"
-  save_CXXFLAGS="${CXXFLAGS}"
-  CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
-  CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
-  dnl Some OSes like Mac OS X have that as a replacement for pthread_yield()
-  AC_CHECK_FUNCS(pthread_yield_np)
-  AC_CACHE_CHECK([if pthread_yield takes zero arguments],
-    [pandora_cv_pthread_yield_zero_arg],
-    [AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <pthread.h>
-        ]],[[
-  pthread_yield();
-        ]])],
-      [pandora_cv_pthread_yield_zero_arg=yes],
-      [pandora_cv_pthread_yield_zero_arg=no])])
-  AS_IF([test "$pandora_cv_pthread_yield_zero_arg" = "yes"],[
-    AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
-              [pthread_yield that doesn't take any arguments])
-  ])
-
-  AC_CACHE_CHECK([if pthread_yield takes one argument],
-    [pandora_cv_pthread_yield_one_arg],
-    [AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <pthread.h>
-        ]],[[
-  pthread_yield(0);
-        ]])],
-      [pandora_cv_pthread_yield_one_arg=yes],
-      [pandora_cv_pthread_yield_one_arg=no])])
-  AS_IF([test "$pandora_cv_pthread_yield_one_arg" = "yes"],[
-    AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
-              [pthread_yield function with one argument])
-  ])
-
-  AC_CHECK_FUNCS(pthread_attr_getstacksize pthread_attr_setprio \
-    pthread_attr_setschedparam \
-    pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
-    pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
-    pthread_setprio_np pthread_setschedparam pthread_sigmask \
-    pthread_attr_create rwlock_init
-)
-
-
-
-# Check definition of pthread_getspecific
-AC_CACHE_CHECK([args to pthread_getspecific], [pandora_cv_getspecific_args],
-  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#if !defined(_REENTRANT)
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS 
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h>
-   ]], [[
-void *pthread_getspecific(pthread_key_t key);
-pthread_getspecific((pthread_key_t) NULL);
-   ]])],
-    [pandora_cv_getspecific_args=POSIX],
-    [pandora_cv_getspecific_args=other])])
-  if test "$pandora_cv_getspecific_args" = "other"
-  then
-    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
-              [For some non posix threads])
-  fi
-
-  # Check definition of pthread_mutex_init
-  AC_CACHE_CHECK([args to pthread_mutex_init], [pandora_cv_mutex_init_args],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h> ]], [[ 
-  pthread_mutexattr_t attr;
-  pthread_mutex_t mp;
-  pthread_mutex_init(&mp,&attr); ]])],
-      [pandora_cv_mutex_init_args=POSIX],
-      [pandora_cv_mutex_init_args=other])])
-  if test "$pandora_cv_mutex_init_args" = "other"
-  then
-    AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
-              [For some non posix threads])
-  fi
-#---END:
-
-#---START: Used in for client configure
-# Check definition of readdir_r
-AC_CACHE_CHECK([args to readdir_r], [pandora_cv_readdir_r],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS 
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h>
-#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
-readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
-    [pandora_cv_readdir_r=POSIX],
-    [pandora_cv_readdir_r=other])])
-if test "$pandora_cv_readdir_r" = "POSIX"
-then
-  AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
-fi
-
-# Check definition of posix sigwait()
-AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h>
-#include <signal.h>
-      ]], [[
-#ifndef _AIX
-sigset_t set;
-int sig;
-sigwait(&set,&sig);
-#endif
-      ]])],
-    [pandora_cv_sigwait=POSIX],
-    [pandora_cv_sigwait=other])])
-if test "$pandora_cv_sigwait" = "POSIX"
-then
-  AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
-fi
-
-if test "$pandora_cv_sigwait" != "POSIX"
-then
-unset pandora_cv_sigwait
-# Check definition of posix sigwait()
-AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h>
-#include <signal.h>
-      ]], [[
-sigset_t set;
-int sig;
-sigwait(&set);
-      ]])],
-    [pandora_cv_sigwait=NONPOSIX],
-    [pandora_cv_sigwait=other])])
-if test "$pandora_cv_sigwait" = "NONPOSIX"
-then
-  AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
-fi
-fi
-#---END:
-
-# Check if pthread_attr_setscope() exists
-AC_CACHE_CHECK([for pthread_attr_setscope], [pandora_cv_pthread_attr_setscope],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS 
-#endif
-#include <pthread.h>
-      ]], [[
-pthread_attr_t thr_attr;
-pthread_attr_setscope(&thr_attr,0);
-      ]])],
-    [pandora_cv_pthread_attr_setscope=yes],
-    [pandora_cv_pthread_attr_setscope=no])])
-if test "$pandora_cv_pthread_attr_setscope" = "yes"
-then
-  AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
-fi
-
-
-AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
-[AC_TRY_LINK([#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[
-  pthread_yield();
-], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)])
-if test "$ac_cv_pthread_yield_zero_arg" = "yes"
-then
-  AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
-            [pthread_yield that doesn't take any arguments])
-fi
-AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg,
-[AC_TRY_LINK([#define _GNU_SOURCE
-#include <pthread.h>
-#ifdef __cplusplus
-extern "C"
-#endif
-],
-[
-  pthread_yield(0);
-], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)])
-if test "$ac_cv_pthread_yield_one_arg" = "yes"
-then
-  AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
-            [pthread_yield function with one argument])
-fi
-
-  CFLAGS="${save_CFLAGS}"
-  CXXFLAGS="${save_CXXFLAGS}"
-])
-
-
-AC_DEFUN([_PANDORA_SEARCH_PTHREAD],[
-  AC_REQUIRE([ACX_PTHREAD])
-  LIBS="${PTHREAD_LIBS} ${LIBS}"
-  AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
-  AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
-  PANDORA_PTHREAD_YIELD
-])
-
-
-AC_DEFUN([PANDORA_HAVE_PTHREAD],[
-  AC_REQUIRE([_PANDORA_SEARCH_PTHREAD])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[
-  AC_REQUIRE([PANDORA_HAVE_PTHREAD])
-  AS_IF([test "x$acx_pthread_ok" != "xyes"],[
-    AC_MSG_ERROR(could not find libpthread)])
-])
@@ -1,236 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl
-dnl   Copyright (C) 2009 Sun Microsystems, Inc.
-dnl   Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
-dnl   Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
-dnl   Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
-dnl   Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
-dnl   Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org>
-dnl   Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org>
-dnl
-dnl   This program is free software: you can redistribute it and/or modify it
-dnl   under the terms of the GNU General Public License as published by the
-dnl   Free Software Foundation, either version 3 of the License, or (at your
-dnl   option) any later version.
-dnl
-dnl   This program is distributed in the hope that it will be useful, but
-dnl   WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-dnl   Public License for more details.
-dnl
-dnl   You should have received a copy of the GNU General Public License along
-dnl   with this program. If not, see <http://www.gnu.org/licenses/>.
-dnl
-dnl   As a special exception, the respective Autoconf Macro's copyright owner
-dnl   gives unlimited permission to copy, distribute and modify the configure
-dnl   scripts that are the output of Autoconf when processing the Macro. You
-dnl   need not follow the terms of the GNU General Public License when using
-dnl   or distributing such scripts, even though portions of the text of the
-dnl   Macro appear in them. The GNU General Public License (GPL) does govern
-dnl   all other use of the material that constitutes the Autoconf Macro.
-dnl
-dnl   This special exception to the GPL applies to versions of the Autoconf
-dnl   Macro released by the Autoconf Macro Archive. When you make and
-dnl   distribute a modified version of the Autoconf Macro, you may extend this
-dnl   special exception to the GPL to apply to your modified version as well.
-
-dnl SYNOPSIS
-dnl
-dnl   PANDORA_PYTHON3_DEVEL([version])
-dnl
-dnl DESCRIPTION
-dnl
-dnl   Note: Defines as a precious variable "PYTHON3_VERSION". Don't override it
-dnl   in your configure.ac.
-dnl
-dnl   This macro checks for Python and tries to get the include path to
-dnl   'Python.h'. It provides the $(PYTHON3_CPPFLAGS) and $(PYTHON3_LDFLAGS)
-dnl   output variables. It also exports $(PYTHON3_EXTRA_LIBS) and
-dnl   $(PYTHON3_EXTRA_LDFLAGS) for embedding Python in your code.
-dnl
-dnl   You can search for some particular version of Python by passing a
-dnl   parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
-dnl   note that you *have* to pass also an operator along with the version to
-dnl   match, and pay special attention to the single quotes surrounding the
-dnl   version number. Don't use "PYTHON3_VERSION" for this: that environment
-dnl   variable is declared as precious and thus reserved for the end-user.
-dnl
-dnl LAST MODIFICATION
-dnl
-dnl   2009-08-23
-
-AC_DEFUN([PANDORA_PYTHON3_DEVEL],[
-	#
-	# Allow the use of a (user set) custom python version
-	#
-	AC_ARG_VAR([PYTHON3_VERSION],[The installed Python
-		version to use, for example '3.0'. This string
-		will be appended to the Python interpreter
-		canonical name.])
-
-
-  AS_IF([test -z "$PYTHON3"],[
-  	AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]])
-  ])
-	AS_IF([test -z "$PYTHON3"],[
-	  AC_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path])
-	  PYTHON3_VERSION=""
-  ])
-
-	#
-	# if the macro parameter ``version'' is set, honour it
-	#
-	if test -n "$1"; then
-		AC_MSG_CHECKING([for a version of Python $1])
-		ac_supports_python3_ver=`$PYTHON3 -c "import sys, string; \
-			ver = string.split(sys.version)[[0]]; \
-			print(ver $1)"`
-		if test "$ac_supports_python3_ver" = "True"; then
-	   	   AC_MSG_RESULT([yes])
-		else
-			AC_MSG_RESULT([no])
-			AC_MSG_ERROR([this package requires Python $1.
-If you have it installed, but it isn't the default Python
-interpreter in your system path, please pass the PYTHON3_VERSION
-variable to configure. See ``configure --help'' for reference.
-])
-			PYTHON_VERSION=""
-		fi
-	fi
-
-	#
-	# Check if you have distutils, else fail
-	#
-	AC_MSG_CHECKING([for Python3 distutils package])
-	ac_python3_distutils_result=`$PYTHON3 -c "import distutils" 2>&1`
-	if test -z "$ac_python3_distutils_result"; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		AC_MSG_ERROR([cannot import Python3 module "distutils".
-Please check your Python3 installation. The error was:
-$ac_python3_distutils_result])
-		PYTHON3_VERSION=""
-	fi
-
-	#
-	# Check for Python include path
-	#
-	AC_MSG_CHECKING([for Python3 include path])
-	if test -z "$PYTHON3_CPPFLAGS"; then
-		python3_path=`$PYTHON3 -c "import distutils.sysconfig; \
-           		print(distutils.sysconfig.get_python_inc());"`
-		if test -n "${python3_path}"; then
-		   	python3_path="-I$python3_path"
-		fi
-		PYTHON3_CPPFLAGS=$python3_path
-	fi
-	AC_MSG_RESULT([$PYTHON3_CPPFLAGS])
-	AC_SUBST([PYTHON3_CPPFLAGS])
-
-	#
-	# Check for Python library path
-	#
-	AC_MSG_CHECKING([for Python3 library path])
-	if test -z "$PYTHON3_LDFLAGS"; then
-		# (makes two attempts to ensure we've got a version number
-		# from the interpreter)
-		py3_version=`$PYTHON3 -c "from distutils.sysconfig import *; \
-			print(' '.join(get_config_vars('VERSION')))"`
-		if test "$py3_version" == "[None]"; then
-			if test -n "$PYTHON3_VERSION"; then
-				py3_version=$PYTHON3_VERSION
-			else
-				py3_version=`$PYTHON3 -c "import sys; \
-					print(sys.version[[:3]])"`
-			fi
-		fi
-
-		PYTHON3_LDFLAGS=`$PYTHON3 -c "from distutils.sysconfig import *; \
-			print('-L' + get_python_lib(0,1), \
-		      	'-lpython');"`$py3_version
-	fi
-	AC_MSG_RESULT([$PYTHON3_LDFLAGS])
-	AC_SUBST([PYTHON3_LDFLAGS])
-
-	#
-	# Check for site packages
-	#
-	AC_MSG_CHECKING([for Python3 site-packages path])
-	if test -z "$PYTHON3_SITE_PKG"; then
-		PYTHON3_SITE_PKG=`$PYTHON3 -c "import distutils.sysconfig; \
-		        print(distutils.sysconfig.get_python_lib(0,0));"`
-	fi
-	AC_MSG_RESULT([$PYTHON3_SITE_PKG])
-	AC_SUBST([PYTHON3_SITE_PKG])
-
-	#
-	# libraries which must be linked in when embedding
-	#
-	AC_MSG_CHECKING(for Python3 embedding libraries)
-	if test -z "$PYTHON3_EMBED_LIBS"; then
-	   PYTHON3_EMBED_LIBS=`$PYTHON3 -c "import distutils.sysconfig; \
-                conf = distutils.sysconfig.get_config_var; \
-                print(conf('LOCALMODLIBS'), conf('LIBS'))"`
-	fi
-	AC_MSG_RESULT([$PYTHON3_EMBED_LIBS])
-	AC_SUBST(PYTHON3_EMBED_LIBS)
-
-	#
-	# linking flags needed when embedding
-	#
-	AC_MSG_CHECKING(for Python3 embedding linking flags)
-	if test -z "$PYTHON3_EMBED_LDFLAGS"; then
-		PYTHON3_EMBED_LDFLAGS=`$PYTHON3 -c "import distutils.sysconfig; \
-			conf = distutils.sysconfig.get_config_var; \
-			print(conf('LINKFORSHARED'))"`
-	fi
-	AC_MSG_RESULT([$PYTHON3_EMBED_LDFLAGS])
-	AC_SUBST(PYTHON3_EMBED_LDFLAGS)
-
-	#
-	# final check to see if everything compiles alright
-	#
-	AC_MSG_CHECKING([for Python3 development environment consistency])
-	AC_LANG_PUSH([C])
-	# save current global flags
-  ac_save_LIBS="$LIBS"
-  ac_save_CPPFLAGS="$CPPFLAGS"
-	LIBS="$ac_save_LIBS $PYTHON3_LDFLAGS"
-	CPPFLAGS="$ac_save_CPPFLAGS $PYTHON3_CPPFLAGS"
-	AC_TRY_LINK([
-		#include <Python.h>
-	],[
-		Py_Initialize();
-	],[python3exists=yes],[python3exists=no])
-
-	AC_MSG_RESULT([$python3exists])
-
-        if test ! "$python3exists" = "yes"; then
-	   AC_MSG_WARN([
-  Could not link test program to Python3.
-  Maybe the main Python3 library has been installed in some non-standard
-  library path. If so, pass it to configure, via the LDFLAGS environment
-  variable.
-  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python3/lib"
-  ============================================================================
-   ERROR!
-   You probably have to install the development version of the Python3 package
-   for your distribution.  The exact name of this package varies among them.
-  ============================================================================
-	   ])
-	  PYTHON3_VERSION=""
-	fi
-	AC_LANG_POP
-	# turn back to default flags
-	CPPFLAGS="$ac_save_CPPFLAGS"
-	LIBS="$ac_save_LIBS"
-
-	#
-	# all done!
-	#
-])
-
@@ -1,8 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_RUN_CPPLINT],[
-  m4_syscmd([python config/make-lint.py])
-])
@@ -1,133 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_SASL],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for sasl
-  dnl --------------------------------------------------------------------
-  AC_ARG_ENABLE([sasl],
-    [AS_HELP_STRING([--disable-sasl],
-      [Build with sasl support @<:@default=on@:>@])],
-    [ac_enable_sasl="$enableval"],
-    [ac_enable_sasl="yes"])
-
-  AS_IF([test "x$ac_enable_sasl" = "xyes"],
-    [
-      AC_LIB_HAVE_LINKFLAGS(sasl,,[
-        #include <stdlib.h>
-        #include <sasl/sasl.h>
-      ],[
-        sasl_server_init(NULL, NULL);
-      ])
-
-      AS_IF([test "x${ac_cv_libsasl}" != "xyes" ],
-            [
-              AC_LIB_HAVE_LINKFLAGS(sasl2,,[
-                #include <stdlib.h>
-                #include <sasl/sasl.h>
-              ],[
-                sasl_server_init(NULL, NULL);
-              ])
-              HAVE_LIBSASL="$HAVE_LIBSASL2"
-              LIBSASL="$LIBSASL2"
-              LIBSASL_PREFIX="$LIBSASL2_PREFIX"
-	      LTLIBSASL="$LT_LIBSASL2"
-            ])
-    ])
-
-  AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"],
-        [ac_cv_sasl=yes],
-        [ac_cv_sasl=no])
-
-  AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
-  AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
-  AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_SASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_SASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_SASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_SASL])
-  AS_IF([test "x${ac_cv_sasl}" = "xno"],
-    AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libsasl
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libsasl],
-    [AS_HELP_STRING([--disable-libsasl],
-      [Build with libsasl support @<:@default=on@:>@])],
-    [ac_enable_libsasl="$enableval"],
-    [ac_enable_libsasl="yes"])
-
-  AS_IF([test "x$ac_enable_libsasl" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(sasl,,[
-      #include <stdlib.h>
-      #include <sasl/sasl.h>
-    ],[
-      sasl_server_init(NULL, NULL);
-    ])
-  ],[
-    ac_cv_libsasl="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
-  AS_IF([test "x${ac_cv_libsasl}" = "xno"],
-    AC_MSG_ERROR([libsasl is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
-  AC_REQUIRE([AC_LIB_PREFIX])
-
-  dnl --------------------------------------------------------------------
-  dnl  Check for libsasl2
-  dnl --------------------------------------------------------------------
-
-  AC_ARG_ENABLE([libsasl2],
-    [AS_HELP_STRING([--disable-libsasl2],
-      [Build with libsasl2 support @<:@default=on@:>@])],
-    [ac_enable_libsasl2="$enableval"],
-    [ac_enable_libsasl2="yes"])
-
-  AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[
-    AC_LIB_HAVE_LINKFLAGS(sasl2,,[
-      #include <stdlib.h>
-      #include <sasl2/sasl2.h>
-    ],[
-      sasl2_server_init(NULL, NULL);
-    ])
-  ],[
-    ac_cv_libsasl2="no"
-  ])
-
-  AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBSASL2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
-  AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
-  AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
-    AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
-])
@@ -1,59 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl We check two things: where is the memory include file, and in what
-dnl namespace does shared_ptr reside.
-dnl We include AC_COMPILE_IFELSE for all the combinations we've seen in the
-dnl wild:
-dnl 
-dnl  GCC 4.3: namespace: std::  #include <memory>
-dnl  GCC 4.2: namespace: tr1::  #include <tr1/memory>
-dnl  GCC 4.2: namespace: boost::  #include <boost/shared_ptr.hpp>
-dnl
-dnl We define one of HAVE_HAVE_TR1_SHARED_PTR or HAVE_BOOST_SHARED_PTR
-dnl depending on location, and SHARED_PTR_NAMESPACE to be the namespace in
-dnl which shared_ptr is defined.
-dnl 
-
-AC_DEFUN([PANDORA_SHARED_PTR],[
-  AC_REQUIRE([PANDORA_CHECK_CXX_STANDARD])
-  AC_LANG_PUSH(C++)
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}"
-  AC_CHECK_HEADERS(memory tr1/memory boost/shared_ptr.hpp)
-  AC_CACHE_CHECK([the location of shared_ptr header file],
-    [ac_cv_shared_ptr_h],[
-      for namespace in std tr1 std::tr1 boost
-      do
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([[
-#if defined(HAVE_MEMORY)
-# include <memory>
-#endif
-#if defined(HAVE_TR1_MEMORY)
-# include <tr1/memory>
-#endif
-#if defined(HAVE_BOOST_SHARED_PTR_HPP)
-# include <boost/shared_ptr.hpp>
-#endif
-#include <string>
-
-using $namespace::shared_ptr;
-using namespace std;
-            ]],[[
-shared_ptr<string> test_ptr(new string("test string"));
-            ]])],
-            [
-              ac_cv_shared_ptr_namespace="${namespace}"
-              break
-            ],[ac_cv_shared_ptr_namespace=missing])
-       done
-  ])
-  AC_DEFINE_UNQUOTED([SHARED_PTR_NAMESPACE],
-                     ${ac_cv_shared_ptr_namespace},
-                     [The namespace in which SHARED_PTR can be found])
-  CXXFLAGS="${save_CXXFLAGS}"
-  AC_LANG_POP()
-])
@@ -1,39 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#--------------------------------------------------------------------
-# Check what direction the stack runs in
-#--------------------------------------------------------------------
-
-AC_DEFUN([PANDORA_STACK_DIRECTION],[
- AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_CACHE_CHECK([stack direction], [ac_cv_c_stack_direction],[
-  AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <stdlib.h>
- int find_stack_direction ()
- {
-   static char *addr = 0;
-   auto char dummy;
-   if (addr == 0)
-     {
-       addr = &dummy;
-       return find_stack_direction ();
-     }
-   else
-     return (&dummy > addr) ? 1 : -1;
- }
-  ]],[[
-    exit (find_stack_direction() < 0);
-  ]])],[
-   ac_cv_c_stack_direction=1
-  ],[
-   ac_cv_c_stack_direction=-1
-  ])
- ])
- AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
-])
-
-
-
@@ -1,89 +0,0 @@
-# We check two things: where the include file is for unordered_map, and
-# what namespace unordered_map lives in within that include file.  We
-# include AC_COMPILE_IFELSE for all the combinations we've seen in the
-# wild.  We define HAVE_UNORDERED_MAP and HAVE_UNORDERED_SET if we have
-# them, UNORDERED_MAP_H and UNORDERED_SET_H to their location and
-# UNORDERED_NAMESPACE to be the namespace unordered_map is defined in.
-
-AC_DEFUN([PANDORA_CXX_STL_UNORDERED],[
-  save_CXXFLAGS="${CXXFLAGS}"
-  CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
-  AC_LANG_PUSH(C++)
-  AC_CACHE_CHECK([for STL unordered_map],
-    [pandora_cv_stl_unordered],[
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[#include <unordered_map>]],
-                         [[std::unordered_map<int, int> t]])],
-        [pandora_cv_stl_unordered="yes"],
-        [pandora_cv_stl_unordered="no"])])
-
-  AS_IF([test "x${pandora_cv_stl_unordered}" != "xyes"],[
-    AC_CACHE_CHECK([for tr1 unordered_map],
-      [pandora_cv_tr1_unordered],[
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([[
-/* We put in this define because of a YACC symbol clash in Drizzle.
-   Seriously... I cannot believe the GCC guys defined a piece of the internals
-   of this named IF - and I can't believe that YACC generates a token define
-   called IF. Really?
-*/
-#define IF 21;
-#include <tr1/unordered_map>
-            ]],[[
-std::tr1::unordered_map<int, int> t
-          ]])],
-          [pandora_cv_tr1_unordered="yes"],
-          [pandora_cv_tr1_unordered="no"])])
-  ])
-
-  AS_IF([test "x${pandora_cv_stl_unordered}" != "xyes" -a "x${pandora_cv_tr1_unordered}" != "xyes"],[
-    AC_CACHE_CHECK([for boost unordered_map],
-      [pandora_cv_boost_unordered],[
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([[#include <boost/unordered_map.hpp>]],
-                           [[boost::unordered_map<int, int> t]])],
-          [pandora_cv_boost_unordered="yes"],
-          [pandora_cv_boost_unordered="no"])])
-  ])
-
-  CXXFLAGS="${save_CXXFLAGS}"
-  AC_LANG_POP()
-
-  AS_IF([test "x${pandora_cv_stl_unordered}" = "xyes"],[
-    AC_DEFINE(HAVE_STD_UNORDERED_MAP, 1,
-              [if the compiler has std::unordered_map])
-    AC_DEFINE(HAVE_STD_UNORDERED_SET, 1,
-              [if the compiler has std::unordered_set])
-    pandora_has_unordered=yes
-  ])
-  AS_IF([test "x${pandora_cv_tr1_unordered}" = "xyes"],[
-    AC_DEFINE(HAVE_TR1_UNORDERED_MAP, 1,
-              [if the compiler has std::tr1::unordered_map])
-    AC_DEFINE(HAVE_TR1_UNORDERED_SET, 1,
-              [if the compiler has std::tr1::unordered_set])
-    pandora_has_unordered=yes
-  ])
-  AS_IF([test "x${pandora_cv_boost_unordered}" = "xyes"],[
-    AC_DEFINE(HAVE_BOOST_UNORDERED_MAP, 1,
-              [if the compiler has boost::unordered_map])
-    AC_DEFINE(HAVE_BOOST_UNORDERED_SET, 1,
-              [if the compiler has boost::unordered_set])
-    pandora_has_unordered=yes
-  ])
-    
-  AS_IF([test "x${pandora_has_unordered}" != "xyes"],[
-    AC_MSG_WARN([could not find an STL unordered_map])
-  ])
-])
-
-AC_DEFUN([PANDORA_HAVE_CXX_UNORDERED],[
-  AC_REQUIRE([PANDORA_CXX_STL_UNORDERED])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_CXX_UNORDERED],[
-  AC_REQUIRE([PANDORA_HAVE_CXX_UNORDERED])
-  AS_IF([test "x${pandora_has_unordered}" != "xyes"],[
-    AC_MSG_ERROR([An STL compliant unordered_map is required for ${PACKAGE}.
-    Implementations can be found in Recent versions of gcc and in boost])
-  ])
-])
@@ -1,39 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystem
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_SWIG],[
-
-  AC_PROG_SWIG(1.3.31)
-  
-  AC_DEFINE_UNQUOTED([SWIG_TYPE_TABLE],
-    [$PACKAGE],
-    [Type Table name for SWIG symbol table])
-
-  dnl Have to hard-code /usr/local/include and /usr/include into the path.
-  dnl I hate this. Why is swig sucking me
-  SWIG="$SWIG \${DEFS} -I\${top_srcdir} -I\${top_builddir} -I/usr/local/include -I/usr/include"
-  AC_SUBST([SWIG])
-
-
-])
-
-AC_DEFUN([PANDORA_SWIG_PYTHON3],[
-  AC_REQUIRE([PANDORA_SWIG])
-  AS_IF([test "x$SWIG" != "x"],[
-    AC_CACHE_CHECK([if swig supports Python3],
-      [ac_cv_swig_has_python3_],
-      [
-        AS_IF([$SWIG -python -help 2>&1 | grep py3 > /dev/null],
-          [ac_cv_swig_has_python3_=yes],
-          [ac_cv_swig_has_python3_=no])
-      ])
-  ])
-])
@@ -1,36 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystem
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-dnl
-dnl Test if we can Use -pipe to avoid making temp files during the compile.
-dnl Should speed up compile on slower disks
-
-AC_DEFUN([PANDORA_USE_PIPE],[
-
-  AS_IF([test "$GCC" = "yes"],[
-    AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [
-      AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-
-int main(int argc, char** argv)
-{
-  (void) argc; (void) argv;
-  return 0;
-}
-      ]])],
-      [pandora_cv_use_pipe=yes],
-      [pandora_cv_use_pipe=no])
-    ])
-    AS_IF([test "$pandora_cv_use_pipe" = "yes"],[
-      AM_CFLAGS="-pipe ${AM_CFLAGS}"
-      AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}"
-    ])
-  ])
-])
@@ -1,132 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_TEST_VC_DIR],[
-  pandora_building_from_vc=no
-
-  if test -d ".bzr" ; then
-    pandora_building_from_bzr=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_bzr=no
-  fi
-
-  if test -d ".svn" ; then
-    pandora_building_from_svn=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_svn=no
-  fi
-
-  if test -d ".hg" ; then
-    pandora_building_from_hg=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_hg=no
-  fi
-
-  if test -d ".git" ; then
-    pandora_building_from_git=yes
-    pandora_building_from_vc=yes
-  else
-    pandora_building_from_git=no
-  fi
-])
-
-AC_DEFUN([PANDORA_BUILDING_FROM_VC],[
-  m4_syscmd(PANDORA_TEST_VC_DIR [
-
-    PANDORA_RELEASE_DATE=`date +%Y.%m`
-    PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
-
-    # Set some defaults
-    PANDORA_VC_REVNO="0"
-    PANDORA_VC_REVID="unknown"
-    PANDORA_VC_BRANCH="bzr-export"
-
-    if test "${pandora_building_from_bzr}" = "yes"; then
-      echo "# Grabbing changelog and version information from bzr"
-      PANDORA_BZR_REVNO=`bzr revno`
-      if test "x$PANDORA_BZR_REVNO" != "x${PANDORA_VC_REVNO}" ; then
-        PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
-        PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
-        PANDORA_VC_BRANCH=`bzr nick`
-      fi
-    fi
-
-    if ! test -d config ; then
-      mkdir -p config
-    fi
-
-    if test "${pandora_building_from_bzr}" = "yes" -o ! -f config/pandora_vc_revinfo ; then 
-      cat > config/pandora_vc_revinfo.tmp <<EOF
-PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
-PANDORA_VC_REVID=${PANDORA_VC_REVID}
-PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
-PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
-PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
-EOF
-      if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then
-        mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo
-      fi
-      rm -f config/pandora_vc_revinfo.tmp
-    fi
-  ])
-])
-  
-AC_DEFUN([_PANDORA_READ_FROM_FILE],[
-  $1=`grep $1 $2 | cut -f2 -d=`
-])
-
-AC_DEFUN([PANDORA_VC_VERSION],[
-  AC_REQUIRE([PANDORA_BUILDING_FROM_VC])
-
-  PANDORA_TEST_VC_DIR
-
-  AS_IF([test -f ${srcdir}/config/pandora_vc_revinfo],[
-    _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/pandora_vc_revinfo)
-    _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)
-    _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
-                            ${srcdir}/config/pandora_vc_revinfo)
-    _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
-                            ${srcdir}/config/pandora_vc_revinfo)
-    _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
-                            ${srcdir}/config/pandora_vc_revinfo)
-  ])
-  AS_IF([test "x${PANDORA_VC_BRANCH}" != x"${PACKAGE}"],[
-    PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}"
-  ],[
-    PANDORA_RELEASE_COMMENT="trunk"
-  ])
-    
-  PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
-  PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
-
-  VERSION="${PANDORA_RELEASE_VERSION}"
-  AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"],
-                     [The real version of the software])
-  AC_SUBST(PANDORA_VC_REVNO)
-  AC_SUBST(PANDORA_VC_REVID)
-  AC_SUBST(PANDORA_VC_BRANCH)
-  AC_SUBST(PANDORA_RELEASE_DATE)
-  AC_SUBST(PANDORA_RELEASE_NODOTS_DATE)
-  AC_SUBST(PANDORA_RELEASE_COMMENT)
-  AC_SUBST(PANDORA_RELEASE_VERSION)
-  AC_SUBST(PANDORA_RELEASE_ID)
-])
-
-AC_DEFUN([PANDORA_VC_INFO_HEADER],[
-  AC_REQUIRE([PANDORA_VC_VERSION])
-  m4_define([PANDORA_VC_PREFIX],m4_toupper(m4_normalize(AC_PACKAGE_NAME))[_])
-
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVNO], [$PANDORA_VC_REVNO], [Version control revision number])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVID], ["$PANDORA_VC_REVID"], [Version control revision ID])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_BRANCH], ["$PANDORA_VC_BRANCH"], [Version control branch name])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_DATE], ["$PANDORA_RELEASE_DATE"], [Release date of version control checkout])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_NODOTS_DATE], [$PANDORA_RELEASE_NODOTS_DATE], [Numeric formatted release date of checkout])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_COMMENT], ["$PANDORA_RELEASE_COMMENT"], [Set to trunk if the branch is the main $PACKAGE branch])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_VERSION], ["$PANDORA_RELEASE_VERSION"], [Release date and revision number of checkout])
-  AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_ID], [$PANDORA_RELEASE_ID], [Numeric formatted release date and revision number of checkout])
-])
@@ -1,11 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_VERSION],[
-
-  PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \
-    awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
-  AC_SUBST([PANDORA_HEX_VERSION])
-])
@@ -1,57 +0,0 @@
-dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
-dnl Copyright (C) 2009 Monty Taylor
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl Tests whether the compiler supports the command-line option
-dnl -fvisibility=hidden and the function and variable attributes
-dnl __attribute__((__visibility__("hidden"))) and
-dnl __attribute__((__visibility__("default"))).
-dnl Does *not* test for __visibility__("protected") - which has tricky
-dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl MacOS X.
-dnl Does *not* test for __visibility__("internal") - which has processor
-dnl dependent semantics.
-dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
-dnl "really only recommended for legacy code".
-dnl Set the variable CFLAG_VISIBILITY.
-dnl Defines and sets the variable HAVE_VISIBILITY.
-
-AC_DEFUN([PANDORA_VISIBILITY],
-[
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([PANDORA_PLATFORM])
-  CFLAG_VISIBILITY=
-  HAVE_VISIBILITY=0
-  AS_IF([test -n "$GCC"],[
-    AC_MSG_CHECKING([for simple visibility declarations])
-    AC_CACHE_VAL([gl_cv_cc_visibility], [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-      AC_TRY_COMPILE(
-        [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);],
-        [],
-        [gl_cv_cc_visibility=yes],
-        [gl_cv_cc_visibility=no])
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_visibility])
-    if test $gl_cv_cc_visibility = yes; then
-      CFLAG_VISIBILITY="-fvisibility=hidden"
-      HAVE_VISIBILITY=1
-    fi
-  ])
-  AS_IF([test "x$SUNCC" = "xyes"],[
-    CFLAG_VISIBILITY="-xldscope=hidden"
-    HAVE_VISIBILITY=1
-  ])
-  AC_SUBST([CFLAG_VISIBILITY])
-  AC_SUBST([HAVE_VISIBILITY])
-  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
-    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
-])
@@ -1,358 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl AC_PANDORA_WARNINGS([less-warnings|warnings-always-on])
-dnl   less-warnings turn on a limited set of warnings
-dnl   warnings-always-on always set warnings=error regardless of tarball/vc
-
-dnl @TODO: remove less-warnings option as soon as Drizzle is clean enough to
-dnl        allow it
- 
-AC_DEFUN([PANDORA_WARNINGS],[
-  m4_define([PW_LESS_WARNINGS],[no])
-  m4_define([PW_WARN_ALWAYS_ON],[no])
-  ifdef([m4_define],,[define([m4_define],   defn([define]))])
-  ifdef([m4_undefine],,[define([m4_undefine],   defn([undefine]))])
-  m4_foreach([pw_arg],[$*],[
-    m4_case(pw_arg,
-      [less-warnings],[
-        m4_undefine([PW_LESS_WARNINGS])
-        m4_define([PW_LESS_WARNINGS],[yes])
-      ],
-      [warnings-always-on],[
-        m4_undefine([PW_WARN_ALWAYS_ON])
-        m4_define([PW_WARN_ALWAYS_ON],[yes])
-    ]) 
-  ])
-
-  AC_REQUIRE([PANDORA_BUILDING_FROM_VC])
-  m4_if(PW_WARN_ALWAYS_ON, [yes],
-    [ac_cv_warnings_as_errors=yes],
-    AS_IF([test "$pandora_building_from_vc" = "yes"],
-          [ac_cv_warnings_as_errors=yes],
-          [ac_cv_warnings_as_errors=no]))
-
-  AC_ARG_ENABLE([profiling],
-      [AS_HELP_STRING([--enable-profiling],
-         [Toggle profiling @<:@default=off@:>@])],
-      [ac_profiling="$enableval"],
-      [ac_profiling="no"])
-
-  AC_ARG_ENABLE([coverage],
-      [AS_HELP_STRING([--enable-coverage],
-         [Toggle coverage @<:@default=off@:>@])],
-      [ac_coverage="$enableval"],
-      [ac_coverage="no"])
-
-  AS_IF([test "$GCC" = "yes"],[
-
-    AS_IF([test "$ac_profiling" = "yes"],[
-      CC_PROFILING="-pg"
-      GCOV_LIBS="-pg -lgcov"
-      save_LIBS="${LIBS}"
-      LIBS=""
-      AC_CHECK_LIB(c_p, read)
-      LIBC_P="${LIBS}"
-      LIBS="${save_LIBS}"
-      AC_SUBST(LIBC_P)
-    ],[
-      CC_PROFILING=" "
-    ])
-
-    AS_IF([test "$ac_coverage" = "yes"],
-          [
-            CC_COVERAGE="--coverage"
-            GCOV_LIBS="-lgcov"
-          ])
-
-
-	 
-    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],
-          [W_FAIL="-Werror"])
-
-    AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option],
-      [ac_cv_safe_to_use_fdiagnostics_show_option_],
-      [save_CFLAGS="$CFLAGS"
-       CFLAGS="-fdiagnostics-show-option ${AM_CFLAGS} ${CFLAGS}"
-       AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([],[])],
-         [ac_cv_safe_to_use_fdiagnostics_show_option_=yes],
-         [ac_cv_safe_to_use_fdiagnostics_show_option_=no])
-       CFLAGS="$save_CFLAGS"])
-
-    AS_IF([test "$ac_cv_safe_to_use_fdiagnostics_show_option_" = "yes"],
-          [
-            F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option"
-          ])
-
-    AC_CACHE_CHECK([whether it is safe to use -Wconversion],
-      [ac_cv_safe_to_use_wconversion_],
-      [save_CFLAGS="$CFLAGS"
-       dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
-       dnl conversion warnings to all the tarball folks
-       CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-       AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM([[
-#include <stdbool.h>
-void foo(bool a)
-{
-  (void)a;
-}
-         ]],[[
-foo(0);
-         ]])],
-         [ac_cv_safe_to_use_wconversion_=yes],
-         [ac_cv_safe_to_use_wconversion_=no])
-       CFLAGS="$save_CFLAGS"])
-
-    AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"],
-      [W_CONVERSION="-Wconversion"
-      AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons],
-        [ac_cv_safe_to_use_Wconversion_],
-        [save_CFLAGS="$CFLAGS"
-         dnl Use -Werror here instead of ${W_FAIL} so that we don't spew
-         dnl conversion warnings to all the tarball folks
-         CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM(
-             [[
-#include <netinet/in.h>
-             ]],[[
-uint16_t x= htons(80);
-             ]])],
-           [ac_cv_safe_to_use_Wconversion_=yes],
-           [ac_cv_safe_to_use_Wconversion_=no])
-         CFLAGS="$save_CFLAGS"])
-
-      AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"],
-            [NO_CONVERSION="-Wno-conversion"])
-    ])
-
-    NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing"
-    NO_SHADOW="-Wno-shadow"
-
-    AS_IF([test "$INTELCC" = "yes"],[
-      m4_if(PW_LESS_WARNINGS,[no],[
-        BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual"
-      ],[
-        BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981"
-      ])
-      CC_WARNINGS="${BASE_WARNINGS}"
-      CXX_WARNINGS="${BASE_WARNINGS}"
-    ],[
-      m4_if(PW_LESS_WARNINGS,[no],[
-        BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing"
-        CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
-        CXX_WARNINGS_FULL="-Wold-style-cast"
-        NO_OLD_STYLE_CAST="-Wno-old-style-cast"
-        NO_EFF_CXX="-Wno-effc++"
-      ],[
-        BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}"
-      ])
-
-      AS_IF([test "${ac_cv_assert}" = "no"],
-            [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wextra],
-        [ac_cv_safe_to_use_Wextra_],
-        [save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wextra_=yes],
-        [ac_cv_safe_to_use_Wextra_=no])
-      CFLAGS="$save_CFLAGS"])
-
-      BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
-      AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
-            [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
-            [BASE_WARNINGS="${BASE_WARNINGS} -W"])
-  
-      CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
-      CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
-
-      AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++],
-        [ac_cv_safe_to_use_Wmissing_declarations_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wmissing_declarations_=yes],
-        [ac_cv_safe_to_use_Wmissing_declarations_=no])
-        CXXFLAGS="$save_CXXFLAGS"
-        AC_LANG_POP()
-      ])
-      AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wlogical-op],
-        [ac_cv_safe_to_use_Wlogical_op_],
-        [save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wlogical_op_=yes],
-        [ac_cv_safe_to_use_Wlogical_op_=no])
-      CFLAGS="$save_CFLAGS"])
-      AS_IF([test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"],
-            [CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"])
-  
-      AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++],
-        [ac_cv_safe_to_use_Wredundant_decls_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([
-template <typename E> struct C { void foo(); };
-template <typename E> void C<E>::foo() { }
-template <> void C<int>::foo();
-            AC_INCLUDES_DEFAULT])],
-            [ac_cv_safe_to_use_Wredundant_decls_=yes],
-            [ac_cv_safe_to_use_Wredundant_decls_=no])
-         CXXFLAGS="${save_CXXFLAGS}"
-         AC_LANG_POP()])
-      AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"],
-            [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])
-
-      AC_CACHE_CHECK([whether it is safe to use -Wattributes from C++],
-        [ac_cv_safe_to_use_Wattributes_],
-        [AC_LANG_PUSH(C++)
-         save_CXXFLAGS="${CXXFLAGS}"
-         CXXFLAGS="${W_FAIL} -pedantic -Wattributes -fvisibility=hidden ${AM_CXXFLAGS}"
-         AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([
-#include <google/protobuf/message.h>
-#include <google/protobuf/descriptor.h>
-
-
-const ::google::protobuf::EnumDescriptor* Table_TableOptions_RowType_descriptor();
-enum Table_TableOptions_RowType {
-  Table_TableOptions_RowType_ROW_TYPE_DEFAULT = 0,
-  Table_TableOptions_RowType_ROW_TYPE_FIXED = 1,
-  Table_TableOptions_RowType_ROW_TYPE_DYNAMIC = 2,
-  Table_TableOptions_RowType_ROW_TYPE_COMPRESSED = 3,
-  Table_TableOptions_RowType_ROW_TYPE_REDUNDANT = 4,
-  Table_TableOptions_RowType_ROW_TYPE_COMPACT = 5,
-  Table_TableOptions_RowType_ROW_TYPE_PAGE = 6
-};
-
-namespace google {
-namespace protobuf {
-template <>
-inline const EnumDescriptor* GetEnumDescriptor<Table_TableOptions_RowType>() {
-  return Table_TableOptions_RowType_descriptor();
-}
-}
-}
-            ])],
-            [ac_cv_safe_to_use_Wattributes_=yes],
-            [ac_cv_safe_to_use_Wattributes_=no])
-          CXXFLAGS="${save_CXXFLAGS}"
-          AC_LANG_POP()])
-      AC_CACHE_CHECK([whether it is safe to use -Wno-attributes],
-        [ac_cv_safe_to_use_Wno_attributes_],
-        [save_CFLAGS="$CFLAGS"
-         CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
-         AC_COMPILE_IFELSE([
-           AC_LANG_PROGRAM(
-           [[
-#include <stdio.h>
-           ]], [[]])
-        ],
-        [ac_cv_safe_to_use_Wno_attributes_=yes],
-        [ac_cv_safe_to_use_Wno_attributes_=no])
-      CFLAGS="$save_CFLAGS"])
-
-      dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off
-      dnl by using that. 
-      AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[
-        AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[
-          CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
-          NO_ATTRIBUTES="-Wno-attributes"])])
-  
-  
-      NO_REDUNDANT_DECLS="-Wno-redundant-decls"
-      dnl TODO: Figure out a better way to deal with this:
-      PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
-      NO_WERROR="-Wno-error"
-      INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
-      AS_IF([test "$host_vendor" = "apple"],[
-        BOOSTSKIP_WARNINGS="-Wno-uninitialized"
-      ])
-    ])
-  ])
-
-  AS_IF([test "$SUNCC" = "yes"],[
-
-    AS_IF([test "$ac_profiling" = "yes"],
-          [CC_PROFILING="-xinstrument=datarace"])
-
-    AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],
-          [W_FAIL="-errwarn=%all"])
-
-    AC_CACHE_CHECK([whether E_PASTE_RESULT_NOT_TOKEN is usable],
-      [ac_cv_paste_result],
-      [
-        save_CFLAGS="${CFLAGS}"
-        CFLAGS="-errwarn=%all -erroff=E_PASTE_RESULT_NOT_TOKEN ${CFLAGS}"
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([
-            AC_INCLUDES_DEFAULT
-          ],[
-            int x= 0;])],
-          [ac_cv_paste_result=yes],
-          [ac_cv_paste_result=no])
-        CFLAGS="${save_CFLAGS}"
-      ])
-    AS_IF([test $ac_cv_paste_result = yes],
-      [W_PASTE_RESULT=",E_PASTE_RESULT_NOT_TOKEN"])
-
-
-    m4_if(PW_LESS_WARNINGS, [no],[
-      CC_WARNINGS_FULL="-erroff=E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}"
-      CXX_WARNINGS_FULL="-erroff=inllargeuse"
-    ],[
-      CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR"
-      CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint"
-    ])
-
-    CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL} ${CFLAG_VISIBILITY}"
-    CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL} ${CFLAG_VISIBILITY}"
-    PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit"
-    BOOSTSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint,hidef,wvarhidenmem"
-    NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
-    NO_WERROR="-errwarn=%none"
-
-  ])
-
-  AC_SUBST(NO_CONVERSION)
-  AC_SUBST(NO_REDUNDANT_DECLS)
-  AC_SUBST(NO_UNREACHED)
-  AC_SUBST(NO_SHADOW)
-  AC_SUBST(NO_STRICT_ALIASING)
-  AC_SUBST(NO_EFF_CXX)
-  AC_SUBST(NO_OLD_STYLE_CAST)
-  AC_SUBST(PROTOSKIP_WARNINGS)
-  AC_SUBST(BOOSTSKIP_WARNINGS)
-  AC_SUBST(INNOBASE_SKIP_WARNINGS)
-  AC_SUBST(NO_WERROR)
-  AC_SUBST([GCOV_LIBS])
-
-])
@@ -1,44 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_WITH_GETTEXT],[
-
-  
-  m4_syscmd([if test -d po ; then
-    echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp
-    PACKAGE=$(grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d])
-    for f in $(find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort)
-    do
-      if grep gettext.h "$f" | grep include >/dev/null 2>&1
-      then
-        echo "$f" >> po/POTFILES.in.stamp
-      fi
-    done
-    if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1
-    then
-      rm po/POTFILES.in.stamp
-    else
-      mv po/POTFILES.in.stamp po/POTFILES.in
-    fi
-  fi])
-
-  m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [
-    AM_GNU_GETTEXT(external, need-formatstring-macros)
-    AM_GNU_GETTEXT_VERSION([0.17])
-    AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
-      AM_PATH_PROG_WITH_TEST([GMSGMERGE], gmsgmerge,
-        [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
-      MSGMERGE="${GMSGMERGE}"
-    ])
-    AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
-  ])
-
-])
@@ -1,55 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_WITH_LUA],[
-    dnl Check for lua
-    AC_ARG_WITH([lua], 
-    [AS_HELP_STRING([--with-lua],
-      [Build Lua Bindings @<:@default=yes@:>@])],
-    [with_lua=$withval], 
-    [with_lua=yes])
-
-  AS_IF([test "x$with_lua" != "xno"],[
-    AS_IF([test "x$with_lua" = "xyes"],
-      [LUAPC=lua],
-      [LUAPC=$with_lua])
-
-    PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
-      AC_DEFINE([HAVE_LUA], [1], [liblua])
-      AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
-      with_lua=yes
-    ],[
-      LUAPC=lua5.1
-      PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
-        AC_DEFINE([HAVE_LUA], [1], [liblua])
-        AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
-        with_lua=yes
-      ],[
-        AC_DEFINE([HAVE_LUA],["x"],["x"])
-        with_lua=no
-      ])
-    ])
-
-    AC_CACHE_CHECK([for LUA installation location],[pandora_cv_lua_archdir],[
-      AS_IF([test "$prefix" = "NONE"],[
-        pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${ac_default_prefix} --variable=INSTALL_CMOD ${LUAPC}`
-      ],[
-        pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${LUAPC}`
-      ])
-    ])
-    LUA_ARCHDIR="${pandora_cv_lua_archdir}"
-    AC_SUBST(LUA_ARCHDIR)
-    AC_SUBST(LUA_CFLAGS)
-    AC_SUBST(LUA_LIBS)
-  ])
-  AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes")
-
-])
@@ -1,41 +0,0 @@
-dnl  Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[
-
-  AC_ARG_WITH([memcached],
-    [AS_HELP_STRING([--with-memcached],
-      [Memcached binary to use for make test])],
-    [ac_cv_with_memcached="$withval"],
-    [ac_cv_with_memcached=memcached])
-
-  # just ignore the user if --without-memcached is passed.. it is
-  # only used by make test
-  AS_IF([test "x$ac_cv_with_memcached" = "xno"],[
-    ac_cv_with_memcached=memcached
-    MEMCACHED_BINARY=memcached
-  ],[
-    AS_IF([test -f "$ac_cv_with_memcached"],[
-      MEMCACHED_BINARY=$ac_cv_with_memcached
-    ],[
-      AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")
-    ])
-  ])
-  AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", 
-            [Name of the memcached binary used in make test])
-  AM_CONDITIONAL([HAVE_MEMCACHED],[test "x$MEMCACHED_BINARY" != "xno"])
-])
-
-AC_DEFUN([PANDORA_HAVE_MEMCACHED],[
-  AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[
-  AC_REQUIRE([PANDORA_HAVE_MEMCACHED])
-  AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[
-    AC_MSG_ERROR(["could not find memcached binary"])
-  ])
-])
-
@@ -1,81 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_PERL], [
-
-  AC_ARG_WITH([perl], 
-    [AS_HELP_STRING([--with-perl],
-      [Build Perl Bindings @<:@default=yes@:>@])],
-    [with_perl=$withval], 
-    [with_perl=yes])
-
-  AC_ARG_WITH([perl-arch],
-    [AS_HELP_STRING([--with-perl-arch],
-      [Install Perl bindings into system location @<:@default=no@:>@])],
-    [with_perl_arch=$withval],
-    [with_perl_arch=no])
-
-  AS_IF([test "x$with_perl" != "xno"],[
-    AS_IF([test "x$with_perl" != "xyes"],
-      [ac_chk_perl=$with_perl],
-      [ac_chk_perl=perl])
-    AC_CHECK_PROGS(PERL,$ac_chk_perl)
-  ])
-  AS_IF([test "x$PERL" != "x"],[
-    AC_CACHE_CHECK([for Perl include path],[pandora_cv_perl_include],[
-      pandora_cv_perl_include=`$PERL -MConfig -e 'print $Config{archlib};'`
-      pandora_cv_perl_include="${pandora_cv_perl_include}/CORE"
-    ])
-    AC_CACHE_CHECK([for Perl CPPFLAGS],[pandora_cv_perl_cppflags],[
-      pandora_cv_perl_cppflags=`$PERL -MConfig -e 'print $Config{cppflags};'`
-      pandora_cv_perl_cppflags="${pandora_cv_perl_cppflags}"
-    ])
-    PERL_CPPFLAGS="-I${pandora_cv_perl_include} ${pandora_cv_perl_cppflags}"
-
-    AC_CACHE_CHECK([for Perl development headers],
-      [pandora_cv_perl_dev],[
-        
-        save_CPPFLAGS="${CPPFLAGS}"
-        CPPFLAGS="${CPPFLAGS} ${PERL_CPPFLAGS}"
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <math.h>
-#include <stdlib.h>
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-        ]])],
-        [pandora_cv_perl_dev=yes],
-        [pandora_cv_perl_dev=no])
-        CPPFLAGS="${save_CPPFLAGS}"
-      ])
-
-    AS_IF([test "${pandora_cv_perl_dev}" = "no"],
-      [with_perl=no])
-
-    AC_CACHE_CHECK([for Perl install location],
-      [pandora_cv_perl_archdir],[
-        AS_IF([test "${with_perl_arch}" = "no"],[
-          pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{sitearch}'`
-        ],[
-          pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{archlib}'`
-        ])
-        pandora_cv_perl_archdir="${pandora_cv_perl_archdir}"
-    ])
- 
-    PERL_ARCHDIR="${pandora_cv_perl_archdir}"
-  ])
-  AC_SUBST([PERL_CPPFLAGS])
-  AC_SUBST([PERL_ARCHDIR])
-
-  AM_CONDITIONAL(BUILD_PERL, [test "$with_perl" != "no"])
-
-])
@@ -1,56 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_PHP],[
-
-  AC_ARG_WITH([php],
-    [AS_HELP_STRING([--with-php],
-      [Build NDB/PHP @<:@default=no@:>@])],
-    [with_php=$withval],
-    [with_php=no])
-
-  AS_IF([test "x$with_php" != "xno"],[
-    dnl We explicitly requested PHP build. Fail on too-young SWIG.
-    AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"],
-      [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")])
-    AS_IF([test "x$with_php" != "xyes"],
-      [ac_check_php_config=$with_php],
-      [ac_check_php_config="php-config php-config5"])
-      AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config])
-    ])
-
-  AS_IF([test "x$PHP_CONFIG" != "x"],[
-    PHP_CFLAGS=`$PHP_CONFIG --includes`
-    PHP_CPPFLAGS=`$PHP_CONFIG --includes`
-    PHP_LDFLAGS=`$PHP_CONFIG --ldflags`
-    PHP_EXTDIR=`$PHP_CONFIG --extension-dir`
-    strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'`
-    PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"`
-  ],[
-    PHP_CFLAGS=
-    PHP_CPPFLAGS=
-    PHP_LDFLAGS=
-    PHP_EXTDIR=
-    PHP_ARCH_DIR=
-    with_php=no
-  ])
-
-  AC_SUBST(PHP_CFLAGS)
-  AC_SUBST(PHP_CPPFLAGS)
-  AC_SUBST(PHP_LDFLAGS)
-  AC_SUBST(PHP_EXTDIR)
-  AC_SUBST(PHP_ARCH_DIR)
-
-  AM_CONDITIONAL(BUILD_PHP, test "$with_php" = "yes")
-  
-])
-
@@ -1,37 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_PYTHON], [
-
-  AC_ARG_WITH([python], 
-    [AS_HELP_STRING([--with-python],
-      [Build Python Bindings @<:@default=yes@:>@])],
-    [with_python=$withval
-     python_requested=$withval
-    ], 
-    [with_python=yes
-     python_requested=no
-    ])
-
-  AS_IF([test "x$with_python" != "xno"],[
-    AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python])
-    AM_PATH_PYTHON([2.4],,[with_python="no"])
-    AC_PYTHON_DEVEL()
-    AS_IF([test "x$pythonexists" = "xno"],[with_python="no"])
-  ])
-  AS_IF([test "x$with_python" = "xno" -a "$python_requested" = "yes"],[
-    AC_MSG_ERROR([Python support was explicity requested, but Python support
-                  was not found. Please correct your build environment and try
-                  again])
-  ])
-  AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"])
-])
@@ -1,44 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_WITH_PYTHON3], [
-
-  AC_REQUIRE([PANDORA_SWIG])
-
-  AC_ARG_WITH([python3], 
-    [AS_HELP_STRING([--with-python3],
-      [Build Python3 Bindings @<:@default=yes@:>@])],[
-        with_python3=$withval
-        python3_requested=$withval
-      ],[ 
-        with_python3=yes
-        python3_requested=no
-      ])
-
-  AS_IF([test "x$ac_cv_swig_has_python3_" != "xyes"],[
-     with_python3=no
-  ],[
-   AS_IF([test "x$with_python3" != "xno"],[
-     AS_IF([test "x$with_python3" != "xyes"],
-       [PYTHON3=$with_python3],[
-        AC_PATH_PROG([PYTHON3],[python3],[no])
-        PANDORA_PYTHON3_DEVEL()
-        AS_IF([test "x$python3exists" = "xno"],[with_python="no"])
-     ]) 
-   ])
-  ])
-  AS_IF([test "x$with_python3" = "xno" -a "$python3_requested" = "yes"],[
-    AC_MSG_ERROR([Python3 support was explicity requested, but Python3 support
-                  was not found. Please correct your build environment and try
-                  again])
-  ])
-  AM_CONDITIONAL(BUILD_PYTHON3, [test "$with_python3" = "yes"])
-])
@@ -1,33 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_WITH_R],[
-    dnl Check for GNU R
-    AC_ARG_WITH([r], 
-    [AS_HELP_STRING([--with-r],
-      [Build R Bindings @<:@default=yes@:>@])],
-    [with_r=$withval], 
-    [with_r=yes])
-
-  AS_IF([test "x$with_r" != "xno"],[
-
-    PKG_CHECK_MODULES([R], [libR], [
-      with_r=yes
-    ],[
-      with_r=no
-    ])
-
-   AC_SUBST(R_CFLAGS)
-   AC_SUBST(R_LIBS)
-  ])
-  AM_CONDITIONAL(BUILD_R, test "$with_r" = "yes")
-
-])
@@ -1,79 +0,0 @@
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl   
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_RUBY], [
-
-  AC_ARG_WITH([ruby],
-    [AS_HELP_STRING([--with-ruby],
-      [Build Ruby Bindings @<:@default=yes@:>@])],
-      [with_ruby=$withval],
-      [with_ruby=ruby])
-
-  AS_IF([test "x$with_ruby" != "xno"],[
-    AS_IF([test "x$with_ruby" != "xyes"],
-      [ac_chk_ruby=$with_ruby],
-      [ac_chk_ruby=ruby1.8 ruby])
-    AC_CHECK_PROGS(RUBY,$ac_chk_ruby)
-  ])
-
-  AS_IF([test "x$RUBY" != "x"],[
-
-    AC_MSG_CHECKING(for ruby devel)
-
-    dnl need to change quotes to allow square brackets
-    changequote(<<, >>)dnl
-    ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"`
-    strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed 's/\//./g'`
-    
-    RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"`
-    LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"`
-    RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"`
-    RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"`
-    RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"`
-    RUBY_INCLUDES="-I$ruby_prefix"
-    changequote([, ])dnl
-
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_CPPFLAGS="$CPPFLAGS"
-    ac_save_LDFLAGS="$LDFLAGS"
-    CFLAGS="$ac_save_CFLAGS $RUBY_INCLUDES"
-    CPPFLAGS="$ac_save_CPPFLAGS $RUBY_INCLUDES"
-    LDFLAGS="$ac_save_LDFLAGS $LIBRUBYARG_SHARED"
-    
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[VALUE rb_ac_test = rb_define_module("actest");]])],[with_ruby="yes";AC_MSG_RESULT(found)],[with_ruby="no";AC_MSG_RESULT(missing)])
-
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    CFLAGS="$ac_save_CFLAGS"
-    LDFLAGS="$ac_save_LDFLAGS"
-  ],[
-    # This allows 'make clean' in the ruby directory to work when
-    # ruby isn't available
-    RUBY=
-    RUBY_INCLUDES=
-    LIBRUBYARG_SHARED=
-    RUBY_LIB=
-    RUBY_DIR=
-    RUBY_LIBDIR=
-    RUBY_ARCH_DIR=
-    with_ruby="no"
-  ])
-
-  AC_SUBST(RUBY_INCLUDES)
-  AC_SUBST(LIBRUBYARG_SHARED)
-  AC_SUBST(RUBY_LIB)
-  AC_SUBST(RUBY_DIR)
-  AC_SUBST(RUBY_LIBDIR)
-  AC_SUBST(RUBY_ARCH_DIR)
-
-  AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"])
-  AM_CONDITIONAL(BUILD_RUBY, test "$with_ruby" = "yes")
-])
@@ -1,157 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# 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.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-		
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$PKG_CONFIG"; then
-    if test -n "$$1"; then
-        pkg_cv_[]$1="$$1"
-    else
-        PKG_CHECK_EXISTS([$3],
-                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-			 [pkg_failed=yes])
-    fi
-else
-	pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
@@ -1,449 +0,0 @@
-# po.m4 serial 15 (gettext-0.17)
-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ(2.50)
-
-dnl Checks for all prerequisites of the po subdirectory.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
-  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-  AC_REQUIRE([AC_PROG_INSTALL])dnl
-  AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
-  AC_REQUIRE([AM_NLS])dnl
-
-  dnl Release version of the gettext macros. This is used to ensure that
-  dnl the gettext macros and po/Makefile.in.in are in sync.
-  AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
-
-  dnl Perform the following tests also if --disable-nls has been given,
-  dnl because they are needed for "make dist" to work.
-
-  dnl Search for GNU msgfmt in the PATH.
-  dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
-  dnl The second test excludes FreeBSD msgfmt.
-  AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-    [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
-     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-    :)
-  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-  dnl Test whether it is GNU msgfmt >= 0.15.
-changequote(,)dnl
-  case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
-    *) MSGFMT_015=$MSGFMT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([MSGFMT_015])
-changequote(,)dnl
-  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
-    *) GMSGFMT_015=$GMSGFMT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([GMSGFMT_015])
-
-  dnl Search for GNU xgettext 0.12 or newer in the PATH.
-  dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
-  dnl The second test excludes FreeBSD xgettext.
-  AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-    [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
-     (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-    :)
-  dnl Remove leftover from FreeBSD xgettext call.
-  rm -f messages.po
-
-  dnl Test whether it is GNU xgettext >= 0.15.
-changequote(,)dnl
-  case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
-    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
-    *) XGETTEXT_015=$XGETTEXT ;;
-  esac
-changequote([,])dnl
-  AC_SUBST([XGETTEXT_015])
-
-  dnl Search for GNU msgmerge 0.11 or newer in the PATH.
-  AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
-    [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
-
-  dnl Installation directories.
-  dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
-  dnl have to define it here, so that it can be used in po/Makefile.
-  test -n "$localedir" || localedir='${datadir}/locale'
-  AC_SUBST([localedir])
-
-  dnl Support for AM_XGETTEXT_OPTION.
-  test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
-  AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
-
-  AC_CONFIG_COMMANDS([po-directories], [[
-    for ac_file in $CONFIG_FILES; do
-      # Support "outfile[:infile[:infile...]]"
-      case "$ac_file" in
-        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-      esac
-      # PO directories have a Makefile.in generated from Makefile.in.in.
-      case "$ac_file" in */Makefile.in)
-        # Adjust a relative srcdir.
-        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-        # In autoconf-2.13 it is called $ac_given_srcdir.
-        # In autoconf-2.50 it is called $srcdir.
-        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-        case "$ac_given_srcdir" in
-          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-          /*) top_srcdir="$ac_given_srcdir" ;;
-          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
-        esac
-        # Treat a directory as a PO directory if and only if it has a
-        # POTFILES.in file. This allows packages to have multiple PO
-        # directories under different names or in different locations.
-        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
-          rm -f "$ac_dir/POTFILES"
-          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
-          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
-          POMAKEFILEDEPS="POTFILES.in"
-          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
-          # on $ac_dir but don't depend on user-specified configuration
-          # parameters.
-          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-            # The LINGUAS file contains the set of available languages.
-            if test -n "$OBSOLETE_ALL_LINGUAS"; then
-              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-            fi
-            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
-            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-          else
-            # The set of available languages was given in configure.in.
-            # Hide the ALL_LINGUAS assigment from automake < 1.5.
-            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
-          fi
-          # Compute POFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-          # Compute UPDATEPOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-          # Compute DUMMYPOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-          # Compute GMOFILES
-          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-          case "$ac_given_srcdir" in
-            .) srcdirpre= ;;
-            *) srcdirpre='$(srcdir)/' ;;
-          esac
-          POFILES=
-          UPDATEPOFILES=
-          DUMMYPOFILES=
-          GMOFILES=
-          for lang in $ALL_LINGUAS; do
-            POFILES="$POFILES $srcdirpre$lang.po"
-            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-          done
-          # CATALOGS depends on both $ac_dir and the user's LINGUAS
-          # environment variable.
-          INST_LINGUAS=
-          if test -n "$ALL_LINGUAS"; then
-            for presentlang in $ALL_LINGUAS; do
-              useit=no
-              if test "%UNSET%" != "$LINGUAS"; then
-                desiredlanguages="$LINGUAS"
-              else
-                desiredlanguages="$ALL_LINGUAS"
-              fi
-              for desiredlang in $desiredlanguages; do
-                # Use the presentlang catalog if desiredlang is
-                #   a. equal to presentlang, or
-                #   b. a variant of presentlang (because in this case,
-                #      presentlang can be used as a fallback for messages
-                #      which are not translated in the desiredlang catalog).
-                case "$desiredlang" in
-                  "$presentlang"*) useit=yes;;
-                esac
-              done
-              if test $useit = yes; then
-                INST_LINGUAS="$INST_LINGUAS $presentlang"
-              fi
-            done
-          fi
-          CATALOGS=
-          if test -n "$INST_LINGUAS"; then
-            for lang in $INST_LINGUAS; do
-              CATALOGS="$CATALOGS $lang.gmo"
-            done
-          fi
-          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
-          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
-          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
-            if test -f "$f"; then
-              case "$f" in
-                *.orig | *.bak | *~) ;;
-                *) cat "$f" >> "$ac_dir/Makefile" ;;
-              esac
-            fi
-          done
-        fi
-        ;;
-      esac
-    done]],
-   [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
-    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
-    # from automake < 1.5.
-    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
-    # Capture the value of LINGUAS because we need it to compute CATALOGS.
-    LINGUAS="${LINGUAS-%UNSET%}"
-   ])
-])
-
-dnl Postprocesses a Makefile in a directory containing PO files.
-AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
-[
-  # When this code is run, in config.status, two variables have already been
-  # set:
-  # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
-  # - LINGUAS is the value of the environment variable LINGUAS at configure
-  #   time.
-
-changequote(,)dnl
-  # Adjust a relative srcdir.
-  ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
-  ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
-  ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
-  # In autoconf-2.13 it is called $ac_given_srcdir.
-  # In autoconf-2.50 it is called $srcdir.
-  test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-  case "$ac_given_srcdir" in
-    .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
-    /*) top_srcdir="$ac_given_srcdir" ;;
-    *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  # Find a way to echo strings without interpreting backslash.
-  if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
-    gt_echo='echo'
-  else
-    if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
-      gt_echo='printf %s\n'
-    else
-      echo_func () {
-        cat <<EOT
-$*
-EOT
-      }
-      gt_echo='echo_func'
-    fi
-  fi
-
-  # A sed script that extracts the value of VARIABLE from a Makefile.
-  sed_x_variable='
-# Test if the hold space is empty.
-x
-s/P/P/
-x
-ta
-# Yes it was empty. Look if we have the expected variable definition.
-/^[	 ]*VARIABLE[	 ]*=/{
-  # Seen the first line of the variable definition.
-  s/^[	 ]*VARIABLE[	 ]*=//
-  ba
-}
-bd
-:a
-# Here we are processing a line from the variable definition.
-# Remove comment, more precisely replace it with a space.
-s/#.*$/ /
-# See if the line ends in a backslash.
-tb
-:b
-s/\\$//
-# Print the line, without the trailing backslash.
-p
-tc
-# There was no trailing backslash. The end of the variable definition is
-# reached. Clear the hold space.
-s/^.*$//
-x
-bd
-:c
-# A trailing backslash means that the variable definition continues in the
-# next line. Put a nonempty string into the hold space to indicate this.
-s/^.*$/P/
-x
-:d
-'
-changequote([,])dnl
-
-  # Set POTFILES to the value of the Makefile variable POTFILES.
-  sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
-  POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
-  # Compute POTFILES_DEPS as
-  #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
-  POTFILES_DEPS=
-  for file in $POTFILES; do
-    POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
-  done
-  POMAKEFILEDEPS=""
-
-  if test -n "$OBSOLETE_ALL_LINGUAS"; then
-    test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
-  fi
-  if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
-    # The LINGUAS file contains the set of available languages.
-    ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
-    POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
-  else
-    # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
-    sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
-    ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
-  fi
-  # Hide the ALL_LINGUAS assigment from automake < 1.5.
-  eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
-  # Compute POFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
-  # Compute UPDATEPOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
-  # Compute DUMMYPOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
-  # Compute GMOFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
-  # Compute PROPERTIESFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
-  # Compute CLASSFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
-  # Compute QMFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
-  # Compute MSGFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
-  # Compute RESOURCESDLLFILES
-  # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
-  case "$ac_given_srcdir" in
-    .) srcdirpre= ;;
-    *) srcdirpre='$(srcdir)/' ;;
-  esac
-  POFILES=
-  UPDATEPOFILES=
-  DUMMYPOFILES=
-  GMOFILES=
-  PROPERTIESFILES=
-  CLASSFILES=
-  QMFILES=
-  MSGFILES=
-  RESOURCESDLLFILES=
-  for lang in $ALL_LINGUAS; do
-    POFILES="$POFILES $srcdirpre$lang.po"
-    UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-    DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-    GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-    PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
-    CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
-    QMFILES="$QMFILES $srcdirpre$lang.qm"
-    frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-    MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
-    frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-    RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
-  done
-  # CATALOGS depends on both $ac_dir and the user's LINGUAS
-  # environment variable.
-  INST_LINGUAS=
-  if test -n "$ALL_LINGUAS"; then
-    for presentlang in $ALL_LINGUAS; do
-      useit=no
-      if test "%UNSET%" != "$LINGUAS"; then
-        desiredlanguages="$LINGUAS"
-      else
-        desiredlanguages="$ALL_LINGUAS"
-      fi
-      for desiredlang in $desiredlanguages; do
-        # Use the presentlang catalog if desiredlang is
-        #   a. equal to presentlang, or
-        #   b. a variant of presentlang (because in this case,
-        #      presentlang can be used as a fallback for messages
-        #      which are not translated in the desiredlang catalog).
-        case "$desiredlang" in
-          "$presentlang"*) useit=yes;;
-        esac
-      done
-      if test $useit = yes; then
-        INST_LINGUAS="$INST_LINGUAS $presentlang"
-      fi
-    done
-  fi
-  CATALOGS=
-  JAVACATALOGS=
-  QTCATALOGS=
-  TCLCATALOGS=
-  CSHARPCATALOGS=
-  if test -n "$INST_LINGUAS"; then
-    for lang in $INST_LINGUAS; do
-      CATALOGS="$CATALOGS $lang.gmo"
-      JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
-      QTCATALOGS="$QTCATALOGS $lang.qm"
-      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-      TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
-      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-      CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
-    done
-  fi
-
-  sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
-  if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
-    # Add dependencies that cannot be formulated as a simple suffix rule.
-    for lang in $ALL_LINGUAS; do
-      frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-      cat >> "$ac_file.tmp" <<EOF
-$frobbedlang.msg: $lang.po
-	@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
-	\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
-    done
-  fi
-  if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
-    # Add dependencies that cannot be formulated as a simple suffix rule.
-    for lang in $ALL_LINGUAS; do
-      frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
-      cat >> "$ac_file.tmp" <<EOF
-$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
-	@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
-	\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
-    done
-  fi
-  if test -n "$POMAKEFILEDEPS"; then
-    cat >> "$ac_file.tmp" <<EOF
-Makefile: $POMAKEFILEDEPS
-EOF
-  fi
-  mv "$ac_file.tmp" "$ac_file"
-])
-
-dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
-AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
-[
-  XGETTEXT_EXTRA_OPTIONS=
-])
-
-dnl Registers an option to be passed to xgettext in the po subdirectory.
-AC_DEFUN([AM_XGETTEXT_OPTION],
-[
-  AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
-])
@@ -1,7 +0,0 @@
-AC_DEFUN([REQUIRE_POD2MAN],[
-  AC_PATH_PROG([POD2MAN], [pod2man],
-    "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
-  AS_IF([test "x$POD2MAN" = "xno"],
-    AC_MSG_ERROR(["Could not find pod2man anywhere in path"]))
-  AC_SUBST(POD2MAN)
-])
@@ -1,7 +0,0 @@
-AC_DEFUN([REQUIRE_PODCHECKER],[
-  AC_PATH_PROG([PODCHECKER], [podchecker],
-    "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
-  AS_IF([test "x$PODCHECKER" = "xno"],
-    AC_MSG_ERROR(["Could not find podchecker anywhere in path"]))
-  AC_SUBST(PODCHECKER)
-])
@@ -1,92 +0,0 @@
-# progtest.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-AC_PREREQ(2.50)
-
-# Search path for a program which passes the given test.
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
-  ac_executable_p="test -x"
-else
-  ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
-  [[\\/]]* | ?:[[\\/]]*)
-    ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
-    ;;
-  *)
-    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in ifelse([$5], , $PATH, [$5]); do
-      IFS="$ac_save_IFS"
-      test -z "$ac_dir" && ac_dir=.
-      for ac_exec_ext in '' $ac_executable_extensions; do
-        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
-          echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
-          if [$3]; then
-            ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
-            break 2
-          fi
-        fi
-      done
-    done
-    IFS="$ac_save_IFS"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
-    ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
@@ -2,34 +2,28 @@ dnl ---------------------------------------------------------------------------
 dnl Macro: PROTOCOL_BINARY_TEST
 dnl ---------------------------------------------------------------------------
 
-AC_DEFUN([PROTOCOL_BINARY_TEST],
-[
-  AC_CACHE_CHECK([for supported struct padding], [ac_cv_supported_struct_padding], [
-    AC_LANG_PUSH([C])
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -I${srcdir}"
-    AC_TRY_COMPILE([
-#include <inttypes.h>
+AC_DEFUN([PROTOCOL_BINARY_TEST], [
+    AC_LANG_PUSH([C++])
+    AC_CACHE_CHECK([for supported struct padding], [ac_cv_supported_struct_padding], [
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+          [ #include <inttypes.h>
 #include "libmemcached/memcached/protocol_binary.h"
-                   ], [
-      protocol_binary_request_set request;
-      int a = 1;
-      switch (a) {
-      case sizeof(request):
-      case sizeof(request.bytes):
+          ], [ protocol_binary_request_set request;
+          int a = 1;
+          switch (a) {
+          case sizeof(request):
+          case sizeof(request.bytes):
           break;
-      default:
+          default:
           a = 2;
-      }
-                   ],
-                   [ ac_cv_supported_struct_padding=no ],
-                   [ ac_cv_supported_struct_padding=yes ])
-   CFLAGS="$save_CFLAGS"
-   AC_LANG_POP
-  ])
-  AS_IF([test "x$ac_cv_supported_struct_padding" = "xno"],[
-        AC_MSG_ERROR([Unsupported struct padding done by compiler.])])
-])
+          }
+          ])],
+        [ ac_cv_supported_struct_padding=no ],
+        [ ac_cv_supported_struct_padding=yes ])
+      ])
+      AC_LANG_POP
+      AS_IF([test "x$ac_cv_supported_struct_padding" = "xno"],[ AC_MSG_ERROR([Unsupported struct padding done by compiler.])])
+      ])
 
 dnl ---------------------------------------------------------------------------
 dnl End Macro: PROTOCOL_BINARY_TEST
@@ -0,0 +1,47 @@
+# Copyright (C) 2012-2013 Data Differential LLC
+# Copyright (C) 2011 Trond Norbye
+# This file is free software; Trond Norbye and Data Differential
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+# ---------------------------------------------------------------------------
+# Macro: SOCKET_SEND_FLAGS
+# ---------------------------------------------------------------------------
+#
+
+#serial 2
+
+AC_DEFUN([SOCKET_SEND_FLAGS],
+    [AC_CACHE_CHECK([for MSG_NOSIGNAL],[ac_cv_msg_nosignal],
+      [AC_LANG_PUSH([C])
+      AX_SAVE_FLAGS
+      CFLAGS="$CFLAGS -I${srcdir}"
+
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [int flags= MSG_NOSIGNAL])], [ac_cv_msg_nosignal="yes"])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS])
+
+    AC_CACHE_CHECK([for MSG_DONTWAIT],[ac_cv_msg_dontwait],
+      [AC_LANG_PUSH([C])
+      AX_SAVE_FLAGS
+      CFLAGS="$CFLAGS -I${srcdir}"
+
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],[int flags= MSG_DONTWAIT])],[ac_cv_msg_dontwait="yes"])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS])
+
+    AC_CACHE_CHECK([for MSG_MORE],[ac_cv_msg_more],
+      [AC_LANG_PUSH([C])
+      AX_SAVE_FLAGS
+      CFLAGS="$CFLAGS -I${srcdir}"
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [int flags= MSG_MORE])], [ac_cv_msg_more="yes"])
+      AC_LANG_POP
+      AX_RESTORE_FLAGS])
+
+  AS_IF([test "x$ac_cv_msg_nosignal" = "xyes"],[AC_DEFINE([HAVE_MSG_NOSIGNAL],[1],[Define to 1 if you have a MSG_NOSIGNAL])])
+  AS_IF([test "x$ac_cv_msg_dontwait" = "xyes"],[AC_DEFINE([HAVE_MSG_DONTWAIT],[1],[Define to 1 if you have a MSG_DONTWAIT])])
+  AS_IF([test "x$ac_cv_msg_more" = "xyes"],[AC_DEFINE([HAVE_MSG_MORE],[1],[Define to 1 if you have a MSG_MORE])])
+  ])
+
+# ---------------------------------------------------------------------------
+# End Macro: SOCKET_SEND_FLAGS
+# ---------------------------------------------------------------------------
@@ -0,0 +1,77 @@
+# visibility.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl MacOS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+    dnl First, check whether -Werror can be added to the command line, or
+    dnl whether it leads to an error because of some other option that the
+    dnl user has put into $CC $CFLAGS $CPPFLAGS.
+    AC_MSG_CHECKING([whether the -Werror option is usable])
+    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -Werror"
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[]], [[]])],
+        [gl_cv_cc_vis_werror=yes],
+        [gl_cv_cc_vis_werror=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+    dnl Now check whether visibility declarations are supported.
+    AC_MSG_CHECKING([for simple visibility declarations])
+    AC_CACHE_VAL([gl_cv_cc_visibility], [
+      gl_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -fvisibility=hidden"
+      dnl We use the option -Werror and a function dummyfunc, because on some
+      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+      dnl "visibility attribute not supported in this configuration; ignored"
+      dnl at the first function definition in every compilation unit, and we
+      dnl don't want to use the option in this case.
+      if test $gl_cv_cc_vis_werror = yes; then
+        CFLAGS="$CFLAGS -Werror"
+      fi
+      AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[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) {}
+           ]],
+           [[]])],
+        [gl_cv_cc_visibility=yes],
+        [gl_cv_cc_visibility=no])
+      CFLAGS="$gl_save_CFLAGS"])
+    AC_MSG_RESULT([$gl_cv_cc_visibility])
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
+  AC_SUBST([CFLAG_VISIBILITY])
+  AC_SUBST([HAVE_VISIBILITY])
+  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
@@ -0,0 +1,121 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_CLONE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_clone \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B hashkit_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_create(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_clone(\fI\%hashkit_st\fP\fI\ *destination\fP, const \fI\%hashkit_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void hashkit_free(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B bool hashkit_is_allocated(const \fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+The \fI\%hashkit_create()\fP function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The \fI\%hashkit_clone()\fP function initializes a hashkit object much like
+\fI\%hashkit_create()\fP, but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The \fI\%hashkit_free()\fP frees any resources being consumed by the hashkit
+objects that were initialized with \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP\&.
+.sp
+The \fI\%hashkit_is_allocated()\fP reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+\fI\%hashkit_create()\fP and \fI\%hashkit_clone()\fP will return NULL on
+failure or non\-NULL on success.
+.sp
+\fI\%hashkit_is_allocated()\fP returns true if the memory for the hashkit
+object was allocated inside of \fI\%hashkit_create()\fP or
+\fI\%hashkit_clone()\fP, otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_CRC32" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_crc32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,121 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_CREATE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_create \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B hashkit_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_create(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_clone(\fI\%hashkit_st\fP\fI\ *destination\fP, const \fI\%hashkit_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void hashkit_free(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B bool hashkit_is_allocated(const \fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+The \fI\%hashkit_create()\fP function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The \fI\%hashkit_clone()\fP function initializes a hashkit object much like
+\fI\%hashkit_create()\fP, but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The \fI\%hashkit_free()\fP frees any resources being consumed by the hashkit
+objects that were initialized with \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP\&.
+.sp
+The \fI\%hashkit_is_allocated()\fP reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+\fI\%hashkit_create()\fP and \fI\%hashkit_clone()\fP will return NULL on
+failure or non\-NULL on success.
+.sp
+\fI\%hashkit_is_allocated()\fP returns true if the memory for the hashkit
+object was allocated inside of \fI\%hashkit_create()\fP or
+\fI\%hashkit_clone()\fP, otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FNV1_32" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_fnv1_32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FNV1_64" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_fnv1_64 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FNV1A_32" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_fnv1a_32 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FNV1A_64" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_fnv1a_64 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,121 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FREE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_free \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B hashkit_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_create(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_clone(\fI\%hashkit_st\fP\fI\ *destination\fP, const \fI\%hashkit_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void hashkit_free(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B bool hashkit_is_allocated(const \fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+The \fI\%hashkit_create()\fP function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The \fI\%hashkit_clone()\fP function initializes a hashkit object much like
+\fI\%hashkit_create()\fP, but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The \fI\%hashkit_free()\fP frees any resources being consumed by the hashkit
+objects that were initialized with \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP\&.
+.sp
+The \fI\%hashkit_is_allocated()\fP reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+\fI\%hashkit_create()\fP and \fI\%hashkit_clone()\fP will return NULL on
+failure or non\-NULL on success.
+.sp
+\fI\%hashkit_is_allocated()\fP returns true if the memory for the hashkit
+object was allocated inside of \fI\%hashkit_create()\fP or
+\fI\%hashkit_clone()\fP, otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_FUNCTIONS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_functions \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_HSIEH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_hsieh \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,121 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_IS_ALLOCATED" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_is_allocated \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B hashkit_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_create(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%hashkit_st\fP *hashkit_clone(\fI\%hashkit_st\fP\fI\ *destination\fP, const \fI\%hashkit_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void hashkit_free(\fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B bool hashkit_is_allocated(const \fI\%hashkit_st\fP\fI\ *hash\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+The \fI\%hashkit_create()\fP function initializes a hashkit object for use. If
+you pass a NULL argument for hash, then the memory for the object is
+allocated. If you specify a pre\-allocated piece of memory, that is
+initialized for use.
+.sp
+The \fI\%hashkit_clone()\fP function initializes a hashkit object much like
+\fI\%hashkit_create()\fP, but instead of using default settings it will use
+the settings of the ptr hashkit object.
+.sp
+The \fI\%hashkit_free()\fP frees any resources being consumed by the hashkit
+objects that were initialized with \fI\%hashkit_create()\fP or \fI\%hashkit_clone()\fP\&.
+.sp
+The \fI\%hashkit_is_allocated()\fP reports where the memory was allocated
+for a hashkit object.
+.SH RETURN VALUE
+.sp
+\fI\%hashkit_create()\fP and \fI\%hashkit_clone()\fP will return NULL on
+failure or non\-NULL on success.
+.sp
+\fI\%hashkit_is_allocated()\fP returns true if the memory for the hashkit
+object was allocated inside of \fI\%hashkit_create()\fP or
+\fI\%hashkit_clone()\fP, otherwise it is false and was user\-supplied memory.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_JENKINS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_jenkins \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_MD5" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_md5 \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,130 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_MURMUR" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_murmur \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Various hash functions to use for calculating values for keys
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_default(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_64(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_fnv1a_32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_crc32(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_hsieh(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_murmur(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_jenkins(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_md5(const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+These functions generate hash values from a key using a variety of
+algorithms. These functions can be used standalone, or as arguments
+to hashkit_set_hash_fn(3) or hashkit_set_continuum_hash_fn(3).
+.sp
+The hashkit_hsieh is only available if the library is built with
+the appropriate flag enabled.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_value(3)\fP \fIhashkit_set_hash_fn(3)\fP \fIhashkit_set_continuum_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,92 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "HASHKIT_VALUE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+hashkit_value \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Generate a value for the given key
+.SH SYNOPSIS
+.sp
+#include <libhashkit/hashkit.h>
+.INDENT 0.0
+.TP
+.B uint32_t hashkit_value(hashkit_st\fI\ *hash\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.sp
+Compile and link with \-lhashkit
+.SH DESCRIPTION
+.sp
+The \fI\%hashkit_value()\fP function generates a 32\-bit hash value from the
+given key and key_length. The hash argument is an initialized hashkit
+object, and distribution type and hash function is used from this
+object while generating the value.
+.SH RETURN VALUE
+.sp
+A 32\-bit hash value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIhashkit_create(3)\fP \fIhashkit_set_distribution(3)\fP \fIhashkit_set_hash_fn(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,128 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+# Build rule for documentation
+$(dist_man_MANS): $(top_srcdir)/configure.ac
+	$(MAKE) $(AM_MAKEFLAGS) man
+
+.NOTPARALLEL: $(dist_man_MANS)
+
+dist_man_MANS+= man/memaslap.1
+dist_man_MANS+= man/memcapable.1
+dist_man_MANS+= man/memcat.1
+dist_man_MANS+= man/memcp.1
+dist_man_MANS+= man/memdump.1
+dist_man_MANS+= man/memerror.1
+dist_man_MANS+= man/memexist.1
+dist_man_MANS+= man/memflush.1
+dist_man_MANS+= man/memparse.1
+dist_man_MANS+= man/memping.1
+dist_man_MANS+= man/memrm.1
+dist_man_MANS+= man/memslap.1
+dist_man_MANS+= man/memstat.1
+dist_man_MANS+= man/memtouch.1
+
+dist_man_MANS+= man/hashkit_clone.3
+dist_man_MANS+= man/hashkit_crc32.3
+dist_man_MANS+= man/hashkit_create.3
+dist_man_MANS+= man/hashkit_fnv1_32.3
+dist_man_MANS+= man/hashkit_fnv1_64.3
+dist_man_MANS+= man/hashkit_fnv1a_32.3
+dist_man_MANS+= man/hashkit_fnv1a_64.3
+dist_man_MANS+= man/hashkit_free.3
+dist_man_MANS+= man/hashkit_functions.3
+dist_man_MANS+= man/hashkit_hsieh.3
+dist_man_MANS+= man/hashkit_is_allocated.3
+dist_man_MANS+= man/hashkit_jenkins.3
+dist_man_MANS+= man/hashkit_md5.3
+dist_man_MANS+= man/hashkit_murmur.3
+dist_man_MANS+= man/hashkit_value.3
+dist_man_MANS+= man/libhashkit.3
+dist_man_MANS+= man/libmemcached.3
+dist_man_MANS+= man/libmemcached_check_configuration.3
+dist_man_MANS+= man/libmemcached_configuration.3
+dist_man_MANS+= man/libmemcached_examples.3
+dist_man_MANS+= man/libmemcachedutil.3
+dist_man_MANS+= man/memcached.3
+dist_man_MANS+= man/memcached_add.3
+dist_man_MANS+= man/memcached_add_by_key.3
+dist_man_MANS+= man/memcached_analyze.3
+dist_man_MANS+= man/memcached_append.3
+dist_man_MANS+= man/memcached_append_by_key.3
+dist_man_MANS+= man/memcached_behavior_get.3
+dist_man_MANS+= man/memcached_behavior_set.3
+dist_man_MANS+= man/memcached_callback_get.3
+dist_man_MANS+= man/memcached_callback_set.3
+dist_man_MANS+= man/memcached_cas.3
+dist_man_MANS+= man/memcached_cas_by_key.3
+dist_man_MANS+= man/memcached_clone.3
+dist_man_MANS+= man/memcached_create.3
+dist_man_MANS+= man/memcached_decrement.3
+dist_man_MANS+= man/memcached_decrement_with_initial.3
+dist_man_MANS+= man/memcached_delete.3
+dist_man_MANS+= man/memcached_delete_by_key.3
+dist_man_MANS+= man/memcached_destroy_sasl_auth_data.3
+dist_man_MANS+= man/memcached_dump.3
+dist_man_MANS+= man/memcached_exist.3
+dist_man_MANS+= man/memcached_exist_by_key.3
+dist_man_MANS+= man/memcached_fetch.3
+dist_man_MANS+= man/memcached_fetch_execute.3
+dist_man_MANS+= man/memcached_fetch_result.3
+dist_man_MANS+= man/memcached_flush_buffers.3
+dist_man_MANS+= man/memcached_free.3
+dist_man_MANS+= man/memcached_generate_hash.3
+dist_man_MANS+= man/memcached_generate_hash_value.3
+dist_man_MANS+= man/memcached_get.3
+dist_man_MANS+= man/memcached_get_by_key.3
+dist_man_MANS+= man/memcached_get_memory_allocators.3
+dist_man_MANS+= man/memcached_get_sasl_callbacks.3
+dist_man_MANS+= man/memcached_get_user_data.3
+dist_man_MANS+= man/memcached_increment.3
+dist_man_MANS+= man/memcached_increment_with_initial.3
+dist_man_MANS+= man/memcached_last_error_message.3
+dist_man_MANS+= man/memcached_lib_version.3
+dist_man_MANS+= man/memcached_mget.3
+dist_man_MANS+= man/memcached_mget_by_key.3
+dist_man_MANS+= man/memcached_mget_execute.3 
+dist_man_MANS+= man/memcached_mget_execute_by_key.3 
+dist_man_MANS+= man/memcached_pool.3
+dist_man_MANS+= man/memcached_pool_behavior_get.3
+dist_man_MANS+= man/memcached_pool_behavior_set.3
+dist_man_MANS+= man/memcached_pool_create.3
+dist_man_MANS+= man/memcached_pool_destroy.3
+dist_man_MANS+= man/memcached_pool_fetch.3
+dist_man_MANS+= man/memcached_pool_pop.3
+dist_man_MANS+= man/memcached_pool_push.3
+dist_man_MANS+= man/memcached_pool_release.3
+dist_man_MANS+= man/memcached_pool_st.3
+dist_man_MANS+= man/memcached_prepend.3
+dist_man_MANS+= man/memcached_prepend_by_key.3
+dist_man_MANS+= man/memcached_quit.3
+dist_man_MANS+= man/memcached_replace.3
+dist_man_MANS+= man/memcached_replace_by_key.3
+dist_man_MANS+= man/memcached_sasl_set_auth_data.3
+dist_man_MANS+= man/memcached_server_add.3
+dist_man_MANS+= man/memcached_server_count.3
+dist_man_MANS+= man/memcached_server_cursor.3
+dist_man_MANS+= man/memcached_server_list.3
+dist_man_MANS+= man/memcached_server_list_append.3
+dist_man_MANS+= man/memcached_server_list_count.3
+dist_man_MANS+= man/memcached_server_list_free.3
+dist_man_MANS+= man/memcached_server_push.3
+dist_man_MANS+= man/memcached_servers_parse.3
+dist_man_MANS+= man/memcached_set.3
+dist_man_MANS+= man/memcached_set_by_key.3
+dist_man_MANS+= man/memcached_set_memory_allocators.3
+dist_man_MANS+= man/memcached_set_sasl_callbacks.3
+dist_man_MANS+= man/memcached_set_user_data.3
+dist_man_MANS+= man/memcached_stat.3
+dist_man_MANS+= man/memcached_stat_execute.3
+dist_man_MANS+= man/memcached_stat_get_keys.3
+dist_man_MANS+= man/memcached_stat_get_value.3
+dist_man_MANS+= man/memcached_stat_servername.3
+dist_man_MANS+= man/memcached_strerror.3
+dist_man_MANS+= man/memcached_touch.3
+dist_man_MANS+= man/memcached_touch_by_key.3
+dist_man_MANS+= man/memcached_verbosity.3
+dist_man_MANS+= man/memcached_version.3
@@ -0,0 +1,87 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBHASHKIT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libhashkit \- libhashkit Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+cc [ flag ... ] file ... \-lhashkit
+
+#include <libhashkit/hashkit.h>
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH DESCRIPTION
+.sp
+libhashkit  is a small and thread\-safe client library that provides a collection of useful hashing algorithm. libhashkit is distributed with libmemcached.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIlibhashkit(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,232 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBMEMCACHED" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libmemcached \- Introducing the C Client Library for memcached
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.sp
+Compile and link with \-lmemcached
+
+.sp
+.ce
+----
+
+.ce 0
+.sp
+.sp
+libMemcached is an open source C/C++ client library and tools for the memcached server (\fI\%http://memcached.org/\fP). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.
+.sp
+libMemcached was designed to provide the greatest number of options to use Memcached. Some of the features provided:
+.INDENT 0.0
+.IP 1. 3
+Asynchronous and Synchronous Transport Support.
+.IP 2. 3
+Consistent Hashing and Distribution.
+.IP 3. 3
+Tunable Hashing algorithm to match keys.
+.IP 4. 3
+Access to large object support.
+.IP 5. 3
+Local replication.
+.IP 6. 3
+A complete reference guide and documentation to the API.
+.IP 7. 3
+Tools to Manage your Memcached networks.
+.UNINDENT
+.SH DESCRIPTION
+.sp
+"Memcached is a high\-performance, distributed memory object caching
+system, generic in nature, but intended for use in speeding up dynamic web
+applications by alleviating database load." \fI\%http://memcached.org/\fP
+.sp
+\fBlibmemcached\fP is a small, thread\-safe client library for the
+memcached protocol. The code has all been written to allow
+for both web and embedded usage. It handles the work behind routing
+individual keys to specific servers specified by the developer (and values are
+matched based on server order as supplied by the user). It implements
+a modular and consistent method of object distribution.
+.sp
+There are multiple implemented routing and hashing methods. See the
+\fBmemcached_behavior_set()\fP manpage for more information.
+.sp
+All operations are performed against a \fBmemcached_st\fP structure.
+These structures can either be dynamically allocated or statically
+allocated and then initialized by \fBmemcached_create()\fP\&. Functions have
+been written in order to encapsulate the \fBmemcached_st\fP\&. It is not
+recommended that you operate directly against the structure.
+.sp
+Nearly all functions return a \fBmemcached_return_t\fP value.
+This value can be translated to a printable string with
+\fBmemcached_strerror\fP\&.
+.sp
+Objects are stored on servers by hashing keys. The hash value maps the key to a particular server. All clients understand how this hashing works, so it is possibly to reliably both push data to a server and retrieve data from a server.
+.sp
+Group keys can be optionally used to group sets of objects with servers.
+.sp
+Namespaces are supported, and can be used to partition caches so that multiple applications can use the same memcached servers.
+.sp
+\fBmemcached_st\fP structures are thread\-safe, but each thread must
+contain its own structure (that is, if you want to share these among
+threads you must provide your own locking). No global variables are
+used in this library.
+.sp
+If you are working with GNU autotools you will want to add the following to
+your COPYING to properly include libmemcached in your application.
+.sp
+PKG_CHECK_MODULES(DEPS, libmemcached >= 0.8.0)
+AC_SUBST(DEPS_CFLAGS)
+AC_SUBST(DEPS_LIBS)
+.sp
+Some features of the library must be enabled through \fBmemcached_behavior_set()\fP\&.
+.sp
+Hope you enjoy it!
+.SH CONSTANTS
+.sp
+A number of constants have been provided for in the library.
+.INDENT 0.0
+.TP
+.B MEMCACHED_DEFAULT_PORT
+The default port used by memcached(3).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_KEY
+Default maximum size of a key (which includes the null pointer). Master keys
+have no limit, this only applies to keys used for storage.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_KEY
+Default size of key (which includes the null pointer).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_STRIDE
+This is the "stride" used in the consistent hash used between replicas.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_MAX_HOST_LENGTH
+Maximum allowed size of the hostname.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED_VERSION_STRING
+String value of libmemcached version such as "1.23.4"
+.UNINDENT
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED_VERSION_HEX
+Hex value of the version number. "0x00048000" This can be used for comparing versions based on number.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_PREFIX_KEY_MAX_SIZE
+Maximum length allowed for namespacing of a key.
+.UNINDENT
+.SH THREADS AND PROCESSES
+.sp
+When using threads or forked processes it is important to keep one instance
+of \fBmemcached_st\fP per process or thread. Without creating your own
+locking structures you can not share a single \fBmemcached_st\fP\&. However,
+you can call \fBmemcached_quit()\fP on a \fBmemcached_st\fP and then use the resulting cloned structure.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached_examples(3)\fP
+\fIlibmemcached(1)\fP \fImemcat(1)\fP \fImemcp(1)\fP
+\fImemflush(1)\fP \fImemrm(1)\fP \fImemslap(1)\fP
+\fImemstat(1)\fP \fImemcached_fetch(3)\fP
+\fImemcached_replace(3)\fP \fImemcached_server_list_free(3)\fP
+\fIlibmemcached_examples(3)\fP \fImemcached_clone(3)\fP
+\fImemcached_free(3)\fP \fImemcached_server_add(3)\fP
+\fImemcached_server_push(3)\fP \fImemcached_add(3)\fP
+\fImemcached_get(3)\fP \fImemcached_server_count(3)\fP
+\fImemcached_create(3)\fP \fImemcached_increment(3)\fP
+\fImemcached_server_list(3)\fP \fImemcached_set(3)\fP
+\fImemcached_decrement(3)\fP \fImemcached_mget(3)\fP
+\fImemcached_server_list_append(3)\fP \fImemcached_strerror(3)\fP
+\fImemcached_delete(3)\fP \fImemcached_quit(3)\fP
+\fImemcached_server_list_count(3)\fP \fImemcached_verbosity(3)\fP
+\fImemcached_server_add_unix_socket(3)\fP
+\fImemcached_result_create(3)\fP  \fImemcached_result_free(3)\fP
+\fImemcached_result_key_value(3)\fP
+\fImemcached_result_key_length(3)\fP
+\fImemcached_result_value(3)\fP  \fImemcached_result_length(3)\fP
+\fImemcached_result_flags(3)\fP  \fImemcached_result_cas(3)\fP
+\fImemcached_result_st(3)\fP \fImemcached_append(3)\fP
+\fImemcached_prepend(3)\fP \fImemcached_fetch_result(3)\fP
+\fImemerror(1)\fP \fImemcached_get_by_key(3)\fP
+\fImemcached_mget_by_key(3)\fP \fImemcached_delete_by_key(3)\fP
+\fImemcached_fetch_execute(3)\fP \fImemcached_callback_get(3)\fP
+\fImemcached_callback_set(3)\fP \fImemcached_version(3)\fP
+\fImemcached_lib_version(3)\fP \fImemcached_result_set_value(3)\fP
+\fImemcached_dump(3)\fP \fImemdump(1)\fP
+\fImemcached_set_memory_allocators(3)\fP
+\fImemcached_get_memory_allocators(3)\fP
+\fImemcached_get_user_data(3)\fP \fImemcached_set_user_data(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,333 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBMEMCACHED_CHECK_CONFIGURATION" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libmemcached_check_configuration \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached\-1.0/memcached.h>
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a \fBmemcached_st\fP object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-SOCKET="<filepath>/?<optional_weight>"
+.UNINDENT
+.sp
+Provide a filepath to a UNIX socket file. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior \fBMEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_BUFFER_REQUESTS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_CONNECT_TIMEOUT\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-NAMESPACE
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining which
+server to store the data in.
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.sp
+Enable "no reply" for all calls that support this. It is highly recommended
+that you use this option with the binary protocol only.
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_SUPPORT_CAS\fP
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_USE_UDP\fP
+.INDENT 0.0
+.TP
+.B \-\-NAMESPACE=
+.UNINDENT
+.sp
+A namespace is a container that provides context for keys, only other
+requests that know the namespace can access these values. This is
+accomplished by prepending the namespace value to all keys.
+.SS Mecached Pool Options:
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MIN
+.UNINDENT
+.sp
+Initial size of pool.
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MAX
+.UNINDENT
+.sp
+Maximize size of the pool.
+.SS I/O Options:
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.sp
+That sets the value of the timeout used by :manpage: \fIpoll()\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.SS Other:
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+\fI\%memcached()\fP returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,333 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBMEMCACHED_CONFIGURATION" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libmemcached_configuration \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached\-1.0/memcached.h>
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a \fBmemcached_st\fP object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-SOCKET="<filepath>/?<optional_weight>"
+.UNINDENT
+.sp
+Provide a filepath to a UNIX socket file. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior \fBMEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_BUFFER_REQUESTS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_CONNECT_TIMEOUT\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-NAMESPACE
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining which
+server to store the data in.
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.sp
+Enable "no reply" for all calls that support this. It is highly recommended
+that you use this option with the binary protocol only.
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_SUPPORT_CAS\fP
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_USE_UDP\fP
+.INDENT 0.0
+.TP
+.B \-\-NAMESPACE=
+.UNINDENT
+.sp
+A namespace is a container that provides context for keys, only other
+requests that know the namespace can access these values. This is
+accomplished by prepending the namespace value to all keys.
+.SS Mecached Pool Options:
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MIN
+.UNINDENT
+.sp
+Initial size of pool.
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MAX
+.UNINDENT
+.sp
+Maximize size of the pool.
+.SS I/O Options:
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.sp
+That sets the value of the timeout used by :manpage: \fIpoll()\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.SS Other:
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+\fI\%memcached()\fP returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,211 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBMEMCACHED_EXAMPLES" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libmemcached_examples \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Examples for libmemcached
+.SH DESCRIPTION
+.sp
+For full examples, test cases are found in tests/*.c in the main
+distribution. These are always up to date, and are used for each test run of
+the library.
+.SH CONNECTING TO SERVERS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached(config_string, strlen(config_string);
+{
+\&...
+}
+ memcached_free(memc);
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+In the above code you create a \fBmemcached_st\fP object with three server
+by making use of \fBmemcached_create()\fP\&.
+.SH CREATING A POOL OF SERVERS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Creating a pool of Servers:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com";
+
+memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string));
+
+memcached_return_t rc;
+
+memcached_st *memc= memcached_pool_pop(pool, false, &rc);
+
+\&.... do work
+
+/*
+  Release the memc_ptr that was pulled from the pool
+*/
+memcached_pool_push(pool, memc);
+
+/*
+  Destroy the pool.
+*/
+memcached_pool_destroy(pool);
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+In the above code you create a \fBmemcached_pool_st\fP object with three
+server by making use of \fBmemcached_pool()\fP\&.
+.sp
+When \fBmemcached_pool_destroy()\fP all memory will be released that is associated
+with the pool.
+.SH ADDING A VALUE TO THE SERVER
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Adding a value to the Server:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+char *key= "foo";
+char *value= "value";
+
+memcached_return_t rc= memcached_set(memc, key, strlen(key), value, value_length, (time_t)0, (uint32_t)0);
+
+if (rc != MEMCACHED_SUCCESS)
+{
+\&... // handle failure
+}
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+It is best practice to always look at the return value of any operation.
+.SH FETCHING MULTIPLE VALUES
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+memcached_return_t rc;
+char *keys[]= {"fudge", "son", "food"};
+size_t key_length[]= {5, 3, 4};
+unsigned int x;
+uint32_t flags;
+
+char return_key[MEMCACHED_MAX_KEY];
+size_t return_key_length;
+char *return_value;
+size_t return_value_length;
+
+rc= memcached_mget(memc, keys, key_length, 3);
+
+x= 0;
+while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                      &return_value_length, &flags, &rc)))
+{
+  free(return_value);
+  x++;
+}
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+Notice that you freed values returned from memcached_fetch(). The define
+\fBMEMCACHED_MAX_KEY\fP is provided for usage.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,97 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "LIBMEMCACHEDUTIL" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+libmemcachedutil \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Utility library for libmemcached
+.SH SYNOPSIS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+cc [ flag ... ] file ... \-lmemcachedutil
+
+#include <libmemcached/memcached_util.h>
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fBlibmemcachedutil\fP  is a small and thread\-safe client library that
+provides extra functionality built on top of \fBlibmemcached\fP\&.
+.SH THREADS
+.sp
+Do not try to access an instance of \fBmemcached_st\fP from multiple threads
+at the same time. If you want to access memcached from multiple threads
+you should either clone the \fBmemcached_st\fP, or use the memcached pool
+implementation. see \fBmemcached_pool_create()\fP\&.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fIlibmemcached(3)\fP \fImemcached_pool_create(3)\fP \fImemcached_pool_destroy(3)\fP \fImemcached_pool_pop(3)\fP \fImemcached_pool_push(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,1191 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMASLAP" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memaslap \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memaslap [options]
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_SERVERS
+.UNINDENT
+.SH DESCRIPTION
+.sp
+\fBmemaslap\fP is a load generation and benchmark tool for memcached
+servers. It generates configurable workload such as threads, concurrencies,
+connections, run time, overwrite, miss rate, key size, value size, get/set
+proportion, expected throughput, and so on. Furthermore, it also testss data
+verification, expire\-time verification, UDP, binary protocol, facebook test,
+replication test, multi\-get and reconnection, etc.
+.sp
+Memaslap manages network connections like memcached with
+libevent. Each thread of memaslap is bound with a CPU core, all
+the threads don\(aqt communicate with each other, and there are several socket
+connections in each thread. Each connection keeps key size distribution,
+value size distribution, and command distribution by itself.
+.sp
+You can specify servers via the \fImemslap \-\-servers\fP option or via the
+environment variable \fI\%MEMCACHED_SERVERS\fP\&.
+.SH FEATURES
+.sp
+Memslap is developed to for the following purposes:
+.sp
+Manages network connections with libevent asynchronously.
+.sp
+Set both TCP and UDP up to use non\-blocking IO.
+.sp
+Improves parallelism: higher performance in multi\-threads environments.
+.sp
+Improves time efficiency: faster processing speed.
+.sp
+Generates key and value more efficiently; key size distribution and value size distribution are configurable.
+.sp
+Supports get, multi\-get, and set commands; command distribution is configurable.
+.sp
+Supports controllable miss rate and overwrite rate.
+.sp
+Supports data and expire\-time verification.
+.sp
+Supports dumping statistic information periodically.
+.sp
+Supports thousands of TCP connections.
+.sp
+Supports binary protocol.
+.sp
+Supports facebook test (set with TCP and multi\-get with UDP) and replication test.
+.SH DETAILS
+.SS Effective implementation of network.
+.sp
+For memaslap, both TCP and UDP use non\-blocking network IO. All
+the network events are managed by libevent as memcached. The network module
+of memaslap is similar to memcached. Libevent can ensure
+memaslap can handle network very efficiently.
+.SS Effective implementation of multi\-threads and concurrency
+.sp
+Memslap has the similar implementation of multi\-threads to
+memcached. Memslap creates one or more self\-governed threads;
+each thread is bound with one CPU core if the system testss setting CPU
+core affinity.
+.sp
+In addition, each thread has a libevent to manage the events of the network;
+each thread has one or more self\-governed concurrencies; and 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.
+.sp
+Memslap can create thousands of socket connections, and each
+concurrency has tens of socket connections. Each concurrency randomly or
+sequentially selects one socket connection from its socket connection pool
+to run, so memaslap can ensure each concurrency handles one
+socket connection at any given time. Users can specify the number of
+concurrency and socket connections of each concurrency according to their
+expected workload.
+.SS Effective implementation of generating key and value
+.sp
+In order to improve time efficiency and space efficiency,
+memaslap creates a random characters table with 10M characters. All the
+suffixes of keys and values are generated from this random characters table.
+.sp
+Memslap uses the offset in the character table and the length
+of the string to identify a string. It can save much memory.
+Each key contains two parts, a prefix and a suffix. The prefix is an
+uint64_t, 8 bytes. In order to verify the data set before,
+memaslap need to ensure each key is unique, so it uses the prefix to identify
+a key. The prefix cannot include illegal characters, such as ‘r’, ‘n’,
+‘0’ and ‘ ‘. And memaslap has an algorithm to ensure that.
+.sp
+Memslap doesn’t generate all the objects (key\-value pairs) at
+the beginning. It only generates enough objects to fill the task window
+(default 10K objects) of each concurrency. Each object has the following
+basic information, key prefix, key suffix offset in the character table, key
+length, value offset in the character table, and value length.
+.sp
+In the work process, each concurrency sequentially or randomly selects an
+object from the window to do set operation or get operation. At the same
+time, each concurrency kicks objects out of its window and adds new object
+into it.
+.SS Simple but useful task scheduling
+.sp
+Memslap uses libevent to schedule all the concurrencies of
+threads, and each concurrency schedules tasks based on the local task
+window. Memslap assumes that if each concurrency keeps the same
+key distribution, value distribution and commands distribution, from
+outside, memaslap keeps all the distribution as a whole.
+Each task window includes a lot of objects, each object stores its basic
+information, such as key, value, expire time, and so on. At any time, all
+the objects in the window keep the same and fixed key and value
+distribution. If an object is overwritten, the value of the object will be
+updated. Memslap verifies the data or expire\-time according to
+the object information stored in the task window.
+.sp
+Libevent selects which concurrency to handle based on a specific network
+event. Then the concurrency selects which command (get or set) to operate
+based on the command distribution. If it needs to kick out an old object and
+add a new object, in order to keep the same key and value distribution, the
+new object must have the same key length and value length.
+.sp
+If memcached server has two cache layers (memory and SSD), running
+memaslap with different window sizes can get different cache
+miss rates. If memaslap adds enough objects into the windows at
+the beginning, and the cache of memcached cannot store all the objects
+initialized, then memaslap will get some objects from the second
+cache layer. It causes the first cache layer to miss. So the user can
+specify the window size to get the expected miss rate of the first cache
+layer.
+.SS Useful implementation of multi\-servers , UDP, TCP, multi\-get and binary protocol
+.sp
+Because each thread is self\-governed, memaslap can assign
+different threads to handle different memcached servers. This is just one of
+the ways in which memaslap tests multiple servers. The only
+limitation is that the number of servers cannot be greater than the number
+of threads. The other way to test multiple servers is for replication
+test. Each concurrency has one socket connection to each memcached server.
+For the implementation, memaslap can set some objects to one
+memcached server, and get these objects from the other servers.
+.sp
+By default, Memslap does single get. If the user specifies
+multi\-get option, memaslap will collect enough get commands and
+pack and send the commands together.
+.sp
+Memslap testss both the ASCII protocol and binary protocol,
+but it runs on the ASCII protocol by default.
+Memslap by default runs on the TCP protocol, but it also
+tests UDP. Because UDP is unreliable, dropped packages and out\-of\-order
+packages may occur. Memslap creates a memory buffer to handle
+these problems. Memslap tries to read all the response data of
+one command from the server and reorders the response data. If some packages
+get lost, the waiting timeout mechanism can ensure half\-baked packages will
+be discarded and the next command will be sent.
+.SH USAGE
+.sp
+Below are some usage samples:
+.sp
+memaslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memaslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m \-p 2
+.sp
+The user must specify one server at least to run memaslap. The
+rest of the parameters have default values, as shown below:
+.sp
+Thread number = 1                    Concurrency = 16
+.sp
+Run time = 600 seconds                Configuration file = NULL
+.sp
+Key size = 64                         Value size = 1024
+.sp
+Get/set = 9:1                         Window size = 10k
+.sp
+Execute number = 0                   Single get = true
+.sp
+Multi\-get = false                      Number of sockets of each concurrency = 1
+.sp
+Reconnect = false                     Data verification = false
+.sp
+Expire\-time verification = false           ASCII protocol = true
+.sp
+Binary protocol = false                 Dumping statistic information
+.sp
+periodically = false
+.sp
+Overwrite proportion = 0%             UDP = false
+.sp
+TCP = true                           Limit throughput = false
+.sp
+Facebook test = false                  Replication test = false
+.SS Key size, value size and command distribution.
+.sp
+All the distributions are read from the configuration file specified by user
+with “—cfg_cmd” option. If the user does not specify a configuration file,
+memaslap will run with the default distribution (key size = 64,
+value size = 1024, get/set = 9:1). For information on how to edit the
+configuration file, refer to the “Configuration File” section.
+.sp
+The minimum key size is 16 bytes; the maximum key size is 250 bytes. The
+precision of proportion is 0.001. The proportion of distribution will be
+rounded to 3 decimal places.
+.sp
+The minimum value size is 1 bytes; the maximum value size is 1M bytes. The
+precision of proportion is 0.001. The proportion of distribution will be
+rounded to 3 decimal places.
+Currently, memaslap only testss set and get commands. And it
+testss 100% set and 100% get. For 100% get, it will preset some objects to
+the server.
+.SS Multi\-thread and concurrency
+.sp
+The high performance of memaslap benefits from the special
+schedule of thread and concurrency. It’s important to specify the proper
+number of them. The default number of threads is 1; the default number of
+concurrency is 16. The user can use “—threads” and “\-\-concurrency” to
+specify these variables.
+.sp
+If the system tests setting CPU affinity and the number of threads
+specified by the user is greater than 1, memaslap will try to
+bind each thread to a different CPU core. So if you want to get the best
+performance memaslap, it is better to specify the number of
+thread equal to the number of CPU cores. The number of threads specified by
+the user can also be less or greater than the number of CPU cores. Because
+of the limitation of implementation, the number of concurrencies could be
+the multiple of the number of threads.
+.INDENT 0.0
+.IP 1. 3
+For 8 CPU cores system
+.UNINDENT
+.sp
+For example:
+.sp
+\-\-threads=2 \-\-concurrency=128
+.sp
+\-\-threads=8 \-\-concurrency=128
+.sp
+\-\-threads=8 \-\-concurrency=256
+.sp
+\-\-threads=12 \-\-concurrency=144
+.INDENT 0.0
+.IP 2. 3
+For 16 CPU cores system
+.UNINDENT
+.sp
+For example:
+.sp
+\-\-threads=8 \-\-concurrency=128
+.sp
+\-\-threads=16 \-\-concurrency=256
+.sp
+\-\-threads=16 \-\-concurrency=512
+.sp
+\-\-threads=24 \-\-concurrency=288
+.sp
+The memaslap performs very well, when
+used to test the performance of memcached servers.
+Most of the time, the bottleneck is the network or
+the server. If for some reason the user wants to
+limit the performance of memaslap, there
+are two ways to do this:
+.sp
+Decrease the number of threads and concurrencies.
+Use the option “\-\-tps” that memaslap
+provides to limit the throughput. This option allows
+the user to get the expected throughput. For
+example, assume that the maximum throughput is 50
+kops/s for a specific configuration, you can specify
+the throughput equal to or less than the maximum
+throughput using “\-\-tps” option.
+.SS Window size
+.sp
+Most of the time, the user does not need to specify the window size. The
+default window size is 10k. For Schooner Memcached, the user can specify
+different window sizes to get different cache miss rates based on the test
+case. Memslap testss cache miss rate between 0% and 100%.
+If you use this utility to test the performance of Schooner Memcached, you
+can specify a proper window size to get the expected cache miss rate. The
+formula for calculating window size is as follows:
+.sp
+Assume that the key size is 128 bytes, and the value size is 2048 bytes, and
+concurrency=128.
+.sp
+1. Small cache cache_size=1M, 100% cache miss (all data get from SSD).
+win_size=10k
+.INDENT 0.0
+.IP 2. 3
+cache_size=4G
+.UNINDENT
+.sp
+(1). cache miss rate 0%
+.sp
+win_size=8k
+.sp
+(2). cache miss rate 5%
+.sp
+win_size=11k
+.INDENT 0.0
+.IP 3. 3
+cache_size=16G
+.UNINDENT
+.sp
+(1). cache miss rate 0%
+.sp
+win_size=32k
+.sp
+(2). cache miss
+.sp
+rate 5%
+.sp
+win_size=46k
+.sp
+The formula for calculating window size for cache miss rate 0%:
+.sp
+cache_size / concurrency / (key_size + value_size) * 0.5
+.sp
+The formula for calculating window size for cache miss rate 5%:
+.sp
+cache_size / concurrency / (key_size + value_size) * 0.7
+.SS Verification
+.sp
+Memslap testss both data verification and expire\-time
+verification. The user can use "\-\-verify=" or "\-v" to specify the proportion
+of data verification. In theory, it testss 100% data verification. The
+user can use "\-\-exp_verify=" or "\-e" to specify the proportion of
+expire\-time verification. In theory, it testss 100% expire\-time
+verification. Specify the "\-\-verbose" options to get more detailed error
+information.
+.sp
+For example: \-\-exp_verify=0.01 –verify=0.1 , it means that 1% of the objects
+set with expire\-time, 10% of the objects gotten will be verified. If the
+objects are gotten, memaslap will verify the expire\-time and
+value.
+.SS multi\-servers and multi\-config
+.sp
+Memslap testss multi\-servers based on self\-governed thread.
+There is a limitation that the number of servers cannot be greater than the
+number of threads. Memslap assigns one thread to handle one
+server at least. The user can use the "\-\-servers=" or "\-s" option to specify
+multi\-servers.
+.sp
+For example:
+.sp
+\-\-servers=10.1.1.1:11211,10.1.1.2:11212,10.1.1.3:11213 \-\-threads=6 \-\-concurrency=36
+.sp
+The above command means that there are 6 threads, with each thread having 6
+concurrencies and that threads 0 and 3 handle server 0 (10.1.1.1); threads 1
+and 4 handle server 1 (10.1.1.2); and thread 2 and 5 handle server 2
+(10.1.1.3).
+.sp
+All the threads and concurrencies in memaslap are self\-governed.
+.sp
+So is memaslap. The user can start up several
+memaslap instances. The user can run memaslap on different client
+machines to communicate with the same memcached server at the same. It is
+recommended that the user start different memaslap on different
+machines using the same configuration.
+.SS Run with execute number mode or time mode
+.sp
+The default memaslap runs with time mode. The default run time
+is 10 minutes. If it times out, memaslap will exit. Do not
+specify both execute number mode and time mode at the same time; just
+specify one instead.
+.sp
+For example:
+.sp
+\-\-time=30s (It means the test will run 30 seconds.)
+.sp
+\-\-execute_number=100000 (It means that after running 100000 commands, the test will exit.)
+.SS Dump statistic information periodically.
+.sp
+The user can use "\-\-stat_freq=" or "\-S" to specify the frequency.
+.sp
+For example:
+.sp
+\-\-stat_freq=20s
+.sp
+Memslap will dump the statistics of the commands (get and set) at the frequency of every 20
+seconds.
+.sp
+For more information on the format of dumping statistic information, refer to “Format of Output” section.
+.SS Multi\-get
+.sp
+The user can use "\-\-division=" or "\-d" to specify multi\-get keys count.
+Memslap by default does single get with TCP. Memslap also testss data
+verification and expire\-time verification for multi\-get.
+.sp
+Memslap testss multi\-get with both TCP and UDP. Because of
+the different implementation of the ASCII protocol and binary protocol,
+there are some differences between the two. For the ASCII protocol,
+memaslap sends one “multi\-get” to the server once. For the
+binary protocol, memaslap sends several single get commands
+together as “multi\-get” to the server.
+.SS UDP and TCP
+.sp
+Memslap testss both UDP and TCP. For TCP,
+memaslap does not reconnect the memcached server if socket connections are
+lost. If all the socket connections are lost or memcached server crashes,
+memaslap will exit. If the user specifies the “\-\-reconnect”
+option when socket connections are lost, it will reconnect them.
+.sp
+User can use “\-\-udp” to enable the UDP feature, but UDP comes with some
+limitations:
+.sp
+UDP cannot set data more than 1400 bytes.
+.sp
+UDP is not testsed by the binary protocol because the binary protocol of
+memcached does not tests that.
+.sp
+UDP doesn’t tests reconnection.
+.SS Facebook test
+.sp
+Set data with TCP and multi\-get with UDP. Specify the following options:
+.sp
+"\-\-facebook \-\-division=50"
+.sp
+If you want to create thousands of TCP connections, specify the
+.sp
+"\-\-conn_sock=" option.
+.sp
+For example: \-\-facebook \-\-division=50 \-\-conn_sock=200
+.sp
+The above command means that memaslap will do facebook test,
+each concurrency has 200 socket TCP connections and one UDP socket.
+.sp
+Memslap sets objects with the TCP socket, and multi\-gets 50
+objects once with the UDP socket.
+.sp
+If you specify "\-\-division=50", the key size must be less that 25 bytes
+because the UDP packet size is 1400 bytes.
+.SS Replication test
+.sp
+For replication test, the user must specify at least two memcached servers.
+The user can use “—rep_write=” option to enable feature.
+.sp
+For example:
+.sp
+\-\-servers=10.1.1.1:11211,10.1.1.2:11212 –rep_write=2
+.sp
+The above command means that there are 2 replication memcached servers,
+memaslap will set objects to both server 0 and server 1, get
+objects which are set to server 0 before from server 1, and also get objects
+which are set to server 1 before from server 0. If server 0 crashes,
+memaslap will only get objects from server 1. If server 0 comes
+back to life again, memaslap will reconnect server 0. If both
+server 0 and server 1 crash, memaslap will exit.
+.SS Supports thousands of TCP connections
+.sp
+Start memaslap with "\-\-conn_sock=" or "\-n" to enable this
+feature. Make sure that your system can tests opening thousands of files
+and creating thousands of sockets. However, this feature does not tests
+reconnection if sockets disconnect.
+.sp
+For example:
+.sp
+\-\-threads=8 \-\-concurrency=128 \-\-conn_sock=128
+.sp
+The above command means that memaslap starts up 8 threads, each
+thread has 16 concurrencies, each concurrency has 128 TCP socket
+connections, and the total number of TCP socket connections is 128 * 128 =
+16384.
+.SS Supports binary protocol
+.sp
+Start memaslap with "\-\-binary" or "\-B" options to enable this
+feature. It testss all the above features except UDP, because the latest
+memcached 1.3.3 does not implement binary UDP protocol.
+.sp
+For example:
+.sp
+\-\-binary
+.sp
+Since memcached 1.3.3 doesn\(aqt implement binary UDP protocol,
+memaslap does not tests UDP. In addition, memcached 1.3.3 does not tests
+multi\-get. If you specify "\-\-division=50" option, it just sends 50 get
+commands together as “mulit\-get” to the server.
+.SH CONFIGURATION FILE
+.sp
+This section describes the format of the configuration file.  By default
+when no configuration file is specified memaslap reads the default
+one located at ~/.memaslap.cnf.
+.sp
+Below is a sample configuration file:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+#comments should start with \(aq#\(aq
+#key
+#start_len end_len proportion
+#
+#key length range from start_len to end_len
+#start_len must be equal to or greater than 16
+#end_len must be equal to or less than 250
+#start_len must be equal to or greater than end_len
+#memaslap will generate keys according to the key range
+#proportion: indicates keys generated from one range accounts for the total
+generated keys
+#
+#example1: key range 16~100 accounts for 80%
+#          key range 101~200 accounts for 10%
+#          key range 201~250 accounts for 10%
+#          total should be 1 (0.8+0.1+0.1 = 1)
+#
+#          16 100 0.8
+#          101 200 0.1
+#          201 249 0.1
+#
+#example2: all keys length are 128 bytes
+#
+#          128 128 1
+key
+128 128 1
+#value
+#start_len end_len proportion
+#
+#value length range from start_len to end_len
+#start_len must be equal to or greater than 1
+#end_len must be equal to or less than 1M
+#start_len must be equal to or greater than end_len
+#memaslap will generate values according to the value range
+#proportion: indicates values generated from one range accounts for the
+total generated values
+#
+#example1: value range 1~1000 accounts for 80%
+#          value range 1001~10000 accounts for 10%
+#          value range 10001~100000 accounts for 10%
+#          total should be 1 (0.8+0.1+0.1 = 1)
+#
+#          1 1000 0.8
+#          1001 10000 0.1
+#          10001 100000 0.1
+#
+#example2: all value length are 128 bytes
+#
+#          128 128 1
+value
+2048 2048 1
+#cmd
+#cmd_type cmd_proportion
+#
+#currently memaslap only testss get and set command.
+#
+#cmd_type
+#set     0
+#get     1
+#
+#example: set command accounts for 50%
+#         get command accounts for 50%
+#         total should be 1 (0.5+0.5 = 1)
+#
+#         cmd
+#         0    0.5
+#         1    0.5
+cmd
+0    0.1
+1.0 0.9
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH FORMAT OF OUTPUT
+.sp
+At the beginning, memaslap displays some configuration information as follows:
+.sp
+servers : 127.0.0.1:11211
+.sp
+threads count: 1
+.sp
+concurrency: 16
+.sp
+run time: 20s
+.sp
+windows size: 10k
+.sp
+set proportion: set_prop=0.10
+.sp
+get proportion: get_prop=0.90
+.SS Where
+.sp
+servers : "servers"
+.INDENT 0.0
+.INDENT 3.5
+The servers used by memaslap.
+.UNINDENT
+.UNINDENT
+.sp
+threads count
+.INDENT 0.0
+.INDENT 3.5
+The number of threads memaslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+concurrency
+.INDENT 0.0
+.INDENT 3.5
+The number of concurrencies memaslap runs with.
+.UNINDENT
+.UNINDENT
+.sp
+run time
+.INDENT 0.0
+.INDENT 3.5
+How long to run memaslap.
+.UNINDENT
+.UNINDENT
+.sp
+windows size
+.INDENT 0.0
+.INDENT 3.5
+The task window size of each concurrency.
+.UNINDENT
+.UNINDENT
+.sp
+set proportion
+.INDENT 0.0
+.INDENT 3.5
+The proportion of set command.
+.UNINDENT
+.UNINDENT
+.sp
+get proportion
+.INDENT 0.0
+.INDENT 3.5
+The proportion of get command.
+.UNINDENT
+.UNINDENT
+.sp
+The output of dynamic statistics is something like this:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+Get Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5   345826  69165     65.3      0         27      2198     203
+95.43      177.29
+Global  20  1257935  62896     71.8      0         26      3791     224
+117.79     192.60
+
+
+Set Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5    38425   7685      7.3       0         42      628     240
+88.05      220.21
+Global   20   139780  6989      8.0       0         37      3790    253
+117.93     224.83
+
+
+Total Statistics
+Type  Time(s)  Ops   TPS(ops/s)  Net(M/s)  Get_miss  Min(us)  Max(us)
+Avg(us)  Std_dev    Geo_dist
+Period   5   384252   76850     72.5      0        27      2198     207
+94.72      181.18
+Global  20  1397720   69886     79.7      0        26      3791     227
+117.93     195.60
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SS Where
+.sp
+Get Statistics
+.INDENT 0.0
+.INDENT 3.5
+Statistics information of get command
+.UNINDENT
+.UNINDENT
+.sp
+Set Statistics
+.INDENT 0.0
+.INDENT 3.5
+Statistics information of set command
+.UNINDENT
+.UNINDENT
+.sp
+Total Statistics
+.INDENT 0.0
+.INDENT 3.5
+Statistics information of both get and set command
+.UNINDENT
+.UNINDENT
+.sp
+Period
+.INDENT 0.0
+.INDENT 3.5
+Result within a period
+.UNINDENT
+.UNINDENT
+.sp
+Global
+.INDENT 0.0
+.INDENT 3.5
+Accumulated results
+.UNINDENT
+.UNINDENT
+.sp
+Ops
+.INDENT 0.0
+.INDENT 3.5
+Total operations
+.UNINDENT
+.UNINDENT
+.sp
+TPS
+.INDENT 0.0
+.INDENT 3.5
+Throughput, operations/second
+.UNINDENT
+.UNINDENT
+.sp
+Net
+.INDENT 0.0
+.INDENT 3.5
+The rate of network
+.UNINDENT
+.UNINDENT
+.sp
+Get_miss
+.INDENT 0.0
+.INDENT 3.5
+How many objects can’t be gotten
+.UNINDENT
+.UNINDENT
+.sp
+Min
+.INDENT 0.0
+.INDENT 3.5
+The minimum response time
+.UNINDENT
+.UNINDENT
+.sp
+Max
+.INDENT 0.0
+.INDENT 3.5
+The maximum response time
+.UNINDENT
+.UNINDENT
+.sp
+Avg:
+.INDENT 0.0
+.INDENT 3.5
+The average response time
+.UNINDENT
+.UNINDENT
+.sp
+Std_dev
+.INDENT 0.0
+.INDENT 3.5
+Standard deviation of response time
+.UNINDENT
+.UNINDENT
+.sp
+Geo_dist
+.INDENT 0.0
+.INDENT 3.5
+Geometric distribution based on natural exponential function
+.UNINDENT
+.UNINDENT
+.sp
+At the end, memaslap will output something like this:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+Get Statistics (1257956 events)
+  Min:        26
+  Max:      3791
+  Avg:       224
+  Geo:    192.60
+  Std:    116.23
+                  Log2 Dist:
+                    4:        0       10    84490   215345
+                    8:   484890   459823    12543      824
+                   12:       31
+
+ Set Statistics (139782 events)
+    Min:        37
+    Max:      3790
+    Avg:       253
+    Geo:    224.84
+    Std:    116.83
+    Log2 Dist:
+      4:        0        0     4200 16988
+      8:    50784    65574 2064      167
+      12:        5
+
+  Total Statistics (1397738 events)
+      Min:        26
+      Max:      3791
+      Avg:       227
+      Geo:    195.60
+      Std:    116.60
+      Log2 Dist:
+        4:        0       10    88690   232333
+        8:   535674   525397    14607      991
+        12:       36
+
+cmd_get: 1257969
+cmd_set: 139785
+get_misses: 0
+verify_misses: 0
+verify_failed: 0
+expired_get: 0
+unexpired_unget: 0
+written_bytes: 242516030
+read_bytes: 1003702556
+object_bytes: 152086080
+packet_disorder: 0
+packet_drop: 0
+udp_timeout: 0
+
+Run time: 20.0s Ops: 1397754 TPS: 69817 Net_rate: 59.4M/s
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SS Where
+.sp
+Get Statistics
+.INDENT 0.0
+.INDENT 3.5
+Get statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Set Statistics
+.INDENT 0.0
+.INDENT 3.5
+Set statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Total Statistics
+.INDENT 0.0
+.INDENT 3.5
+Both get and set statistics of response time
+.UNINDENT
+.UNINDENT
+.sp
+Min
+.INDENT 0.0
+.INDENT 3.5
+The accumulated and minimum response time
+.UNINDENT
+.UNINDENT
+.sp
+Max
+.INDENT 0.0
+.INDENT 3.5
+The accumulated and maximum response time
+.UNINDENT
+.UNINDENT
+.sp
+Avg
+.INDENT 0.0
+.INDENT 3.5
+The accumulated and average response time
+.UNINDENT
+.UNINDENT
+.sp
+Std
+.INDENT 0.0
+.INDENT 3.5
+Standard deviation of response time
+.UNINDENT
+.UNINDENT
+.sp
+Log2 Dist
+.INDENT 0.0
+.INDENT 3.5
+Geometric distribution based on logarithm 2
+.UNINDENT
+.UNINDENT
+.sp
+cmd_get
+.INDENT 0.0
+.INDENT 3.5
+Total get commands done
+.UNINDENT
+.UNINDENT
+.sp
+cmd_set
+.INDENT 0.0
+.INDENT 3.5
+Total set commands done
+.UNINDENT
+.UNINDENT
+.sp
+get_misses
+.INDENT 0.0
+.INDENT 3.5
+How many objects can’t be gotten from server
+.UNINDENT
+.UNINDENT
+.sp
+verify_misses
+.INDENT 0.0
+.INDENT 3.5
+How many objects need to verify but can’t get them
+.UNINDENT
+.UNINDENT
+.sp
+verify_failed
+.INDENT 0.0
+.INDENT 3.5
+How many objects with insistent value
+.UNINDENT
+.UNINDENT
+.sp
+expired_get
+.INDENT 0.0
+.INDENT 3.5
+How many objects are expired but we get them
+.UNINDENT
+.UNINDENT
+.sp
+unexpired_unget
+.INDENT 0.0
+.INDENT 3.5
+How many objects are unexpired but we can’t get them
+.UNINDENT
+.UNINDENT
+.sp
+written_bytes
+.INDENT 0.0
+.INDENT 3.5
+Total written bytes
+.UNINDENT
+.UNINDENT
+.sp
+read_bytes
+.INDENT 0.0
+.INDENT 3.5
+Total read bytes
+.UNINDENT
+.UNINDENT
+.sp
+object_bytes
+.INDENT 0.0
+.INDENT 3.5
+Total object bytes
+.UNINDENT
+.UNINDENT
+.sp
+packet_disorder
+.INDENT 0.0
+.INDENT 3.5
+How many UDP packages are disorder
+.UNINDENT
+.UNINDENT
+.sp
+packet_drop
+.INDENT 0.0
+.INDENT 3.5
+How many UDP packages are lost
+.UNINDENT
+.UNINDENT
+.sp
+udp_timeout
+.INDENT 0.0
+.INDENT 3.5
+How many times UDP time out happen
+.UNINDENT
+.UNINDENT
+.sp
+Run time
+.INDENT 0.0
+.INDENT 3.5
+Total run time
+.UNINDENT
+.UNINDENT
+.sp
+Ops
+.INDENT 0.0
+.INDENT 3.5
+Total operations
+.UNINDENT
+.UNINDENT
+.sp
+TPS
+.INDENT 0.0
+.INDENT 3.5
+Throughput, operations/second
+.UNINDENT
+.UNINDENT
+.sp
+Net_rate
+.INDENT 0.0
+.INDENT 3.5
+The average rate of network
+.UNINDENT
+.UNINDENT
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-s, \-\-servers=
+List one or more servers to connect. Servers count must be less than
+threads count. e.g.: \-\-servers=localhost:1234,localhost:11211
+.TP
+.B \-T, \-\-threads=
+Number of threads to startup, better equal to CPU numbers. Default 8.
+.TP
+.B \-c, \-\-concurrency=
+Number of concurrency to simulate with load. Default 128.
+.TP
+.B \-n, \-\-conn_sock=
+Number of TCP socks per concurrency. Default 1.
+.TP
+.B \-x, \-\-execute_number=
+Number of operations(get and set) to execute for the
+given test. Default 1000000.
+.TP
+.B \-t, \-\-time=
+How long the test to run, suffix: s\-seconds, m\-minutes, h\-hours,
+d\-days e.g.: \-\-time=2h.
+.TP
+.B \-F, \-\-cfg_cmd=
+Load the configure file to get command,key and value distribution list.
+.TP
+.B \-w, \-\-win_size=
+Task window size of each concurrency, suffix: K, M e.g.: \-\-win_size=10k.
+Default 10k.
+.TP
+.B \-X, \-\-fixed_size=
+Fixed length of value.
+.TP
+.B \-v, \-\-verify=
+The proportion of date verification, e.g.: \-\-verify=0.01
+.TP
+.B \-d, \-\-division=
+Number of keys to multi\-get once. Default 1, means single get.
+.TP
+.B \-S, \-\-stat_freq=
+Frequency of dumping statistic information. suffix: s\-seconds,
+m\-minutes, e.g.: \-\-resp_freq=10s.
+.TP
+.B \-e, \-\-exp_verify=
+The proportion of objects with expire time, e.g.: \-\-exp_verify=0.01.
+Default no object with expire time
+.TP
+.B \-o, \-\-overwrite=
+The proportion of objects need overwrite, e.g.: \-\-overwrite=0.01.
+Default never overwrite object.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-R\fP,\fB  \-\-reconnect
+Reconnect tests, when connection is closed it will be reconnected.
+.TP
+.B \-U\fP,\fB  \-\-udp
+UDP tests, default memaslap uses TCP, TCP port and UDP port of
+server must be same.
+.TP
+.B \-a\fP,\fB  \-\-facebook
+Whether it enables facebook test feature, set with TCP and multi\-get with UDP.
+.TP
+.B \-B\fP,\fB  \-\-binary
+Whether it enables binary protocol. Default with ASCII protocol.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-P, \-\-tps=
+Expected throughput, suffix: K, e.g.: \-\-tps=10k.
+.TP
+.B \-p, \-\-rep_write=
+The first nth servers can write data, e.g.: \-\-rep_write=2.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-b\fP,\fB  \-\-verbose
+Whether it outputs detailed information when verification fails.
+.TP
+.B \-h\fP,\fB  \-\-help
+Display this message and then exit.
+.TP
+.B \-V\fP,\fB  \-\-version
+Display the version of the application and then exit.
+.UNINDENT
+.SH EXAMPLES
+.sp
+memaslap \-s 127.0.0.1:11211 \-S 5s
+.sp
+memaslap \-s 127.0.0.1:11211 \-t 2m \-v 0.2 \-e 0.05 \-b
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-w 40k \-S 20s \-o 0.2
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-T 4 \-c 128 \-d 20 \-P 40k
+.sp
+memaslap \-s 127.0.0.1:11211 \-F config \-t 2m \-d 50 \-a \-n 40
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m
+.sp
+memaslap \-s 127.0.0.1:11211,127.0.0.1:11212 \-F config \-t 2m \-p 2
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHORS
+.sp
+Mingqiang Zhuang <\fI\%mingqiangzhuang@hengtiansoft.com\fP> (Schooner Technolgy)
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,333 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached\-1.0/memcached.h>
+.INDENT 0.0
+.TP
+.B LIBMEMCACHED
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st *memcached(const char\fI\ *string\fP, size_t\fI\ string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t libmemcached_check_configuration(const char\fI\ *option_string\fP, size_t\fI\ length\fP, char\fI\ *error_buffer\fP, size_t\fI\ error_buffer_size\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+Libmemcached implements a custom language for configuring and modifying
+servers. By passing in an option string you can generate a \fBmemcached_st\fP object
+that you can use in your application directly.
+.INDENT 0.0
+.TP
+.B \-\-SERVER=<servername>:<optional_port>/?<optional_weight>
+.UNINDENT
+.sp
+Provide a servername to be used by the client. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-SOCKET="<filepath>/?<optional_weight>"
+.UNINDENT
+.sp
+Provide a filepath to a UNIX socket file. Providing a weight will cause weighting to occur with all hosts with each server getting a default weight of 1.
+.INDENT 0.0
+.TP
+.B \-\-VERIFY\-KEY
+.UNINDENT
+.sp
+Verify that keys that are being used fit within the design of the protocol being used.
+.INDENT 0.0
+.TP
+.B \-\-REMOVE_FAILED_SERVERS
+.UNINDENT
+.sp
+Enable the behavior \fBMEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-BINARY\-PROTOCOL
+.UNINDENT
+.sp
+Force all connections to use the binary protocol.
+.INDENT 0.0
+.TP
+.B \-\-BUFFER\-REQUESTS
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_BUFFER_REQUESTS\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-CONFIGURE\-FILE=
+.UNINDENT
+.sp
+Provide a configuration file to be used to load requests. Beware that by using a configuration file libmemcached will reset memcached_st based on information only contained in the file.
+.INDENT 0.0
+.TP
+.B \-\-CONNECT\-TIMEOUT=
+.UNINDENT
+.sp
+Please see \fBMEMCACHED_BEHAVIOR_CONNECT_TIMEOUT\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-DISTRIBUTION=
+.UNINDENT
+.sp
+Set the distribution model used by the client.  See :manpage:\(ga\(ga for more details.
+.INDENT 0.0
+.TP
+.B \-\-HASH=
+.UNINDENT
+.sp
+Set the hashing alogrthm used for placing keys on servers.
+.INDENT 0.0
+.TP
+.B \-\-HASH\-WITH\-NAMESPACE
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining which
+server to store the data in.
+.INDENT 0.0
+.TP
+.B \-\-NOREPLY
+.UNINDENT
+.sp
+Enable "no reply" for all calls that support this. It is highly recommended
+that you use this option with the binary protocol only.
+.INDENT 0.0
+.TP
+.B \-\-NUMBER\-OF\-REPLICAS=
+.UNINDENT
+.sp
+Set the nummber of servers that keys will be replicated to.
+.INDENT 0.0
+.TP
+.B \-\-RANDOMIZE\-REPLICA\-READ
+.UNINDENT
+.sp
+Select randomly the server within the replication pool to read from.
+.INDENT 0.0
+.TP
+.B \-\-SORT\-HOSTS
+.UNINDENT
+.sp
+When adding new servers always calculate their distribution based on sorted naming order.
+.INDENT 0.0
+.TP
+.B \-\-SUPPORT\-CAS
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_SUPPORT_CAS\fP
+.INDENT 0.0
+.TP
+.B \-\-USE\-UDP
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for \fBMEMCACHED_BEHAVIOR_USE_UDP\fP
+.INDENT 0.0
+.TP
+.B \-\-NAMESPACE=
+.UNINDENT
+.sp
+A namespace is a container that provides context for keys, only other
+requests that know the namespace can access these values. This is
+accomplished by prepending the namespace value to all keys.
+.SS Mecached Pool Options:
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MIN
+.UNINDENT
+.sp
+Initial size of pool.
+.INDENT 0.0
+.TP
+.B \-\-POOL\-MAX
+.UNINDENT
+.sp
+Maximize size of the pool.
+.SS I/O Options:
+.INDENT 0.0
+.TP
+.B \-\-TCP\-NODELAY
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_NODELAY
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPALIVE
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_TCP_KEEPALIVE
+.INDENT 0.0
+.TP
+.B \-\-RETRY\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SERVER\-FAILURE\-LIMIT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.INDENT 0.0
+.TP
+.B \-\-SND\-TIMEOUT=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-RECV\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.INDENT 0.0
+.TP
+.B \-\-SOCKET\-SEND\-SIZE=
+.UNINDENT
+.sp
+See \fImemcached_behavior_set(3)\fP for MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.INDENT 0.0
+.TP
+.B \-\-POLL\-TIMEOUT=
+.UNINDENT
+.sp
+That sets the value of the timeout used by :manpage: \fIpoll()\fP\&.
+.INDENT 0.0
+.TP
+.B \-\-IO\-BYTES\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-KEY\-PREFETCH=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-IO\-MSG\-WATERMARK=
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-TCP\-KEEPIDLE
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-RCV\-TIMEOUT=
+.UNINDENT
+.SS Other:
+.INDENT 0.0
+.TP
+.B INCLUDE
+.UNINDENT
+.sp
+Include a file in configuration. Unlike \-\-CONFIGURE\-FILE= this will not reset memcached_st
+.INDENT 0.0
+.TP
+.B RESET
+.UNINDENT
+.sp
+Reset memcached_st and continue to process.
+.INDENT 0.0
+.TP
+.B END
+.UNINDENT
+.sp
+End configutation processing.
+.INDENT 0.0
+.TP
+.B ERROR
+.UNINDENT
+.sp
+End configutation processing and throw an error.
+.SH RETURN
+.sp
+\fI\%memcached()\fP returns a pointer to the memcached_st that was
+created (or initialized).  On an allocation failure, it returns NULL.
+.SH EXAMPLE
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+const char *config_string= "\-\-SERVER=host10.example.com \-\-SERVER=host11.example.com \-\-SERVER=host10.example.com"
+memcached_st *memc= memcached(config_string, strlen(config_string);
+{
+ ...
+}
+memcached_free(memc);
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_ADD" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_add \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_ADD_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_add_by_key \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,107 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_ANALYZE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_analyze \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Analyze server information
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_analysis_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_analysis_st\fP * memcached_analyze(memcached_st\fI\ *ptr\fP, memcached_stat_st\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP has the ability to query a memcached server (or
+collection of servers) for their current state. Queries to find state return a
+\fI\%memcached_analysis_st\fP structure. You are responsible for freeing this structure.
+.sp
+\fI\%memcached_analyze()\fP analyzes useful information based on the
+provided servers and sets the result to the \fI\%memcached_analysis_st\fP
+structure. The return value must be freed by the calling application.
+.sp
+A command line tool, \fBmemstat\fP with the option \fImemstat \-\-analyze\fP,
+is provided so that you do not have to write an application to use this method.
+.SH RETURN
+.sp
+A pointer to the allocated \fI\%memcached_analysis_st\fP structure on
+success and a NULL pointer on failure. You may inspect the error detail by
+checking the \fBmemcached_return_t\fP value.
+.sp
+Any method returning a \fI\%memcached_analysis_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,145 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_APPEND" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_append \- Appending to or Prepending to data on the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Appending or Prepending to data on the server
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_prepend()\fP and memcached_append are used to
+modify information on a server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters when using
+either a version of memcached which is 1.4 or below, or when using the text
+protocol. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap). "flags" is a 4byte space that is stored
+alongside of the main value. Many sub libraries make use of this field,
+so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_prepend()\fP places a segment of data before the last piece
+of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_append()\fP places a segment of data at the end of the last
+piece of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_prepend_by_key()\fP and
+\fI\%memcached_append_by_key()\fP methods both behave in a similar
+method as the non key methods. The difference is that they use their
+group_key parameter to map objects to particular servers.
+.sp
+If you are looking for performance, \fBmemcached_set()\fP with non\-blocking
+IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using
+these operations with this behavior on, there are limits to the size of the
+payload being sent to the server.  The reason for these limits is that the
+Memcached Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations
+there are at least 1318 bytes available to split among the key, key_prefix
+and value. If the total size of the command, including overhead, exceeds
+1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_add(3)\fP \fImemcached_cas(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,145 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_APPEND_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_append_by_key \- Appending to or Prepending to data on the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Appending or Prepending to data on the server
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_prepend()\fP and memcached_append are used to
+modify information on a server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters when using
+either a version of memcached which is 1.4 or below, or when using the text
+protocol. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap). "flags" is a 4byte space that is stored
+alongside of the main value. Many sub libraries make use of this field,
+so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_prepend()\fP places a segment of data before the last piece
+of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_append()\fP places a segment of data at the end of the last
+piece of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_prepend_by_key()\fP and
+\fI\%memcached_append_by_key()\fP methods both behave in a similar
+method as the non key methods. The difference is that they use their
+group_key parameter to map objects to particular servers.
+.sp
+If you are looking for performance, \fBmemcached_set()\fP with non\-blocking
+IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using
+these operations with this behavior on, there are limits to the size of the
+payload being sent to the server.  The reason for these limits is that the
+Memcached Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations
+there are at least 1318 bytes available to split among the key, key_prefix
+and value. If the total size of the command, including overhead, exceeds
+1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_add(3)\fP \fImemcached_cas(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,378 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_BEHAVIOR_GET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_behavior_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manipulate the behavior of a memcached_st structure.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_behavior_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint64_t memcached_behavior_get(memcached_st\fI\ *ptr\fP, \fI\%memcached_behavior_t\fP\fI\ flag\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_behavior_set(memcached_st\fI\ *ptr\fP, \fI\%memcached_behavior_t\fP\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fIlibmemcached(3)\fP behavior can be modified by using \fI\%memcached_behavior_set()\fP\&. Default behavior is the library strives to be quick and
+accurate. Some behavior, while being faster, can also result in not entirely
+accurate behavior (for instance, \fBmemcached_set()\fP will always respond
+with \fBMEMCACHED_SUCCESS\fP).
+.sp
+\fI\%memcached_behavior_get()\fP takes a behavior flag and returns whether or not that behavior is currently enabled in the client.
+.sp
+\fI\%memcached_behavior_set()\fP changes the value of a particular option
+of the client. It takes both a flag (listed below) and a value. For simple
+on or off options you just need to pass in a value of 1. Calls to
+\fI\%memcached_behavior_set()\fP will flush and reset all connections.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USE_UDP
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+when this behavior is enababled. The following operations will return
+\fBMEMCACHED_NOT_SUPPORTED\fP when executed with the
+\fI\%MEMCACHED_BEHAVIOR_USE_UDP\fP enabled: \fBmemcached_version()\fP,
+\fBmemcached_stat()\fP, \fBmemcached_get()\fP,
+\fBmemcached_get_by_key()\fP, \fBmemcached_mget()\fP,
+\fBmemcached_mget_by_key()\fP, \fBmemcached_fetch()\fP,
+\fBmemcached_fetch_result()\fP, \fBmemcached_fetch_execute()\fP\&.
+.sp
+All other operations are testsed but are executed in a \(aqfire\-and\-forget\(aq
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+.sp
+\fIlibmemcached(3)\fP does not allow TCP and UDP servers to be shared
+within the same libmemached(3) client \(aqinstance\(aq. An attempt to add a TCP
+server when this behavior is enabled will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP, as will attempting to add a UDP server when this behavior has
+not been enabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NO_BLOCK
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use asychronous IO. This is the fastest
+transport available for storage functions.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.  In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the sending of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+.sp
+In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the reading of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_TCP_NODELAY
+.UNINDENT
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH
+.UNINDENT
+.sp
+Makes the default hashing algorithm for keys use MD5. The value can be set to either \fBMEMCACHED_HASH_DEFAULT\fP, \fBMEMCACHED_HASH_MD5\fP, \fBMEMCACHED_HASH_CRC\fP, \fBMEMCACHED_HASH_FNV1_64\fP, \fBMEMCACHED_HASH_FNV1A_64\fP, \fBMEMCACHED_HASH_FNV1_32\fP, \fBMEMCACHED_HASH_FNV1A_32\fP, \fBMEMCACHED_HASH_JENKINS\fP, \fBMEMCACHED_HASH_HSIEH\fP, and \fBMEMCACHED_HASH_MURMUR\fP\&.
+.sp
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt
+care, just go with the default.
+.sp
+Support for \fBMEMCACHED_HASH_HSIEH\fP is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_DISTRIBUTION
+.UNINDENT
+.sp
+Using this you can enable different means of distributing values to servers.
+.sp
+The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.  Consistent hashing delivers better distribution and allows servers to be added to the cluster with minimal cache losses. Currently MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.UNINDENT
+.sp
+Deprecated since version 0.46(?): DNS lookups are now always cached until an error occurs with the server.
+.sp
+Memcached can cache named lookups so that DNS lookups are made only once.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.UNINDENT
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and
+the hash to \fBMEMCACHED_HASH_MD5\fP\&.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_HASH
+.UNINDENT
+.sp
+Sets the hashing algorithm for host mapping on continuum. The value can be set
+to either \fBMEMCACHED_HASH_DEFAULT\fP, \fBMEMCACHED_HASH_MD5\fP,
+\fBMEMCACHED_HASH_CRC\fP, \fBMEMCACHED_HASH_FNV1_64\fP,
+\fBMEMCACHED_HASH_FNV1A_64\fP, \fBMEMCACHED_HASH_FNV1_32\fP, and
+\fBMEMCACHED_HASH_FNV1A_32\fP\&.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.UNINDENT
+.sp
+Sets the compatibility mode. The value can be set to either MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client for Java.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.UNINDENT
+.sp
+Modify the timeout value that is used by poll. The default value is \-1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USER_DATA
+.UNINDENT
+.sp
+Deprecated since version <: 0.30
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.UNINDENT
+.sp
+Enabling buffered IO causes commands to "buffer" instead of being sent. Any action that gets data causes this buffer to be be sent to the remote connection. Quiting the connection or closing down the connection will also cause the buffered data to be pushed to the remote connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_VERIFY_KEY
+.UNINDENT
+.sp
+Enabling this will cause \fIlibmemcached(3)\fP to test all keys to verify that they are valid keys.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SORT_HOSTS
+.UNINDENT
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.UNINDENT
+.sp
+In non\-blocking mode this changes the value of the timeout during socket connection in milliseconds. Specifying \-1 means an infinite time‐out.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.UNINDENT
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.UNINDENT
+.sp
+Set this value to tune the number of messages that may be sent before libmemcached should start to automatically drain the input queue. Setting this value to high, may cause libmemcached to deadlock (trying to send data, but the send will block because the input buffer in the kernel is full).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.UNINDENT
+.sp
+Set this value to tune the number of bytes that may be sent before libmemcached should start to automatically drain the input queue (need at least 10 IO requests sent without reading the input buffer). Setting this value to high, may cause libmemcached to deadlock (trying to send data, but the send will block because the input buffer in the kernel is full).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.UNINDENT
+.sp
+The binary protocol works a bit different than the textual protocol in that a multiget is implemented as a pipe of single get\-operations which are sent to the server in a chunk. If you are using large multigets from your application, you may improve the latency of the gets by setting this value so you send out the first chunk of requests when you hit the specified limit.  It allows the servers to start processing the requests to send the data back while the rest of the requests are created and sent to the server.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NOREPLY
+.UNINDENT
+.sp
+Set this value to specify that you really don\(aqt care about the result from your storage commands (set, add, replace, append, prepend).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.UNINDENT
+.sp
+If you just want "a poor mans HA", you may specify the numbers of replicas libmemcached should store of each item (on different servers).  This replication does not dedicate certain memcached servers to store the replicas in, but instead it will store the replicas together with all of the other objects (on the \(aqn\(aq next servers specified in your server list).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.UNINDENT
+.sp
+Allows randomizing the replica reads starting point. Normally the read is done from primary server and in case of miss the read is done from primary + 1, then primary + 2 all the way to \(aqn\(aq replicas. If this option is set on the starting point of the replica reads is randomized between the servers.  This allows distributing read load to multiple servers with the expense of more write traffic.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CORK
+.UNINDENT
+.sp
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE
+.UNINDENT
+.sp
+Enable TCP_KEEPALIVE behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.UNINDENT
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.UNINDENT
+.sp
+Find the current size of SO_SNDBUF. A value of 0 means either an error occured or no hosts were available. It is safe to assume system default if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.UNINDENT
+.sp
+Find the current size of SO_RCVBUF. A value of 0 means either an error occured or no hosts were available. It is safe to assume system default if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Deprecated since version 0.48: See \fI\%MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP
+.sp
+This number of times a host can have an error before it is disabled.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.UNINDENT
+.sp
+Deprecated since version 0.48: See \fI\%MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP
+.sp
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure. This must be used in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.UNINDENT
+.sp
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior. The value is in seconds.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining server
+by hash. See \fBMEMCACHED_CALLBACK_NAMESPACE\fP for additional
+information.
+.SH RETURN
+.sp
+memcached_behavior_get returns either the current value of the get, or 0
+or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set
+returns failure or success.
+.SH NOTES
+.sp
+memcached_behavior_set in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,378 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_BEHAVIOR_SET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_behavior_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manipulate the behavior of a memcached_st structure.
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_behavior_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint64_t memcached_behavior_get(memcached_st\fI\ *ptr\fP, \fI\%memcached_behavior_t\fP\fI\ flag\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_behavior_set(memcached_st\fI\ *ptr\fP, \fI\%memcached_behavior_t\fP\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fIlibmemcached(3)\fP behavior can be modified by using \fI\%memcached_behavior_set()\fP\&. Default behavior is the library strives to be quick and
+accurate. Some behavior, while being faster, can also result in not entirely
+accurate behavior (for instance, \fBmemcached_set()\fP will always respond
+with \fBMEMCACHED_SUCCESS\fP).
+.sp
+\fI\%memcached_behavior_get()\fP takes a behavior flag and returns whether or not that behavior is currently enabled in the client.
+.sp
+\fI\%memcached_behavior_set()\fP changes the value of a particular option
+of the client. It takes both a flag (listed below) and a value. For simple
+on or off options you just need to pass in a value of 1. Calls to
+\fI\%memcached_behavior_set()\fP will flush and reset all connections.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USE_UDP
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are testsed
+when this behavior is enababled. The following operations will return
+\fBMEMCACHED_NOT_SUPPORTED\fP when executed with the
+\fI\%MEMCACHED_BEHAVIOR_USE_UDP\fP enabled: \fBmemcached_version()\fP,
+\fBmemcached_stat()\fP, \fBmemcached_get()\fP,
+\fBmemcached_get_by_key()\fP, \fBmemcached_mget()\fP,
+\fBmemcached_mget_by_key()\fP, \fBmemcached_fetch()\fP,
+\fBmemcached_fetch_result()\fP, \fBmemcached_fetch_execute()\fP\&.
+.sp
+All other operations are testsed but are executed in a \(aqfire\-and\-forget\(aq
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+.sp
+\fIlibmemcached(3)\fP does not allow TCP and UDP servers to be shared
+within the same libmemached(3) client \(aqinstance\(aq. An attempt to add a TCP
+server when this behavior is enabled will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP, as will attempting to add a UDP server when this behavior has
+not been enabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NO_BLOCK
+.UNINDENT
+.sp
+Causes \fIlibmemcached(3)\fP to use asychronous IO. This is the fastest
+transport available for storage functions.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SND_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_SNDTIMEO flag.  In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the sending of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RCV_TIMEOUT
+.UNINDENT
+.sp
+This sets the microsecond behavior of the socket against the SO_RCVTIMEO flag.
+.sp
+In cases where you cannot use non\-blocking IO this will allow you to still have timeouts on the reading of data.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_TCP_NODELAY
+.UNINDENT
+.sp
+Turns on the no\-delay feature for connecting sockets (may be faster in some
+environments).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH
+.UNINDENT
+.sp
+Makes the default hashing algorithm for keys use MD5. The value can be set to either \fBMEMCACHED_HASH_DEFAULT\fP, \fBMEMCACHED_HASH_MD5\fP, \fBMEMCACHED_HASH_CRC\fP, \fBMEMCACHED_HASH_FNV1_64\fP, \fBMEMCACHED_HASH_FNV1A_64\fP, \fBMEMCACHED_HASH_FNV1_32\fP, \fBMEMCACHED_HASH_FNV1A_32\fP, \fBMEMCACHED_HASH_JENKINS\fP, \fBMEMCACHED_HASH_HSIEH\fP, and \fBMEMCACHED_HASH_MURMUR\fP\&.
+.sp
+Each hash has it\(aqs advantages and it\(aqs weaknesses. If you don\(aqt know or don\(aqt
+care, just go with the default.
+.sp
+Support for \fBMEMCACHED_HASH_HSIEH\fP is a compile time option that is disabled by default. To enable tests for this hashing algorithm, configure and build libmemcached with the \-\-enable\-hash_hsieh.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_DISTRIBUTION
+.UNINDENT
+.sp
+Using this you can enable different means of distributing values to servers.
+.sp
+The default method is MEMCACHED_DISTRIBUTION_MODULA. You can enable consistent hashing by setting MEMCACHED_DISTRIBUTION_CONSISTENT.  Consistent hashing delivers better distribution and allows servers to be added to the cluster with minimal cache losses. Currently MEMCACHED_DISTRIBUTION_CONSISTENT is an alias for the value MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CACHE_LOOKUPS
+.UNINDENT
+.sp
+Deprecated since version 0.46(?): DNS lookups are now always cached until an error occurs with the server.
+.sp
+Memcached can cache named lookups so that DNS lookups are made only once.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SUPPORT_CAS
+.UNINDENT
+.sp
+Support CAS operations (this is not enabled by default at this point in the server since it imposes a slight performance penalty).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA
+.UNINDENT
+.sp
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA and
+the hash to \fBMEMCACHED_HASH_MD5\fP\&.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED
+Sets the default distribution to MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA with the weighted tests.  and the hash to MEMCACHED_HASH_MD5.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_HASH
+.UNINDENT
+.sp
+Sets the hashing algorithm for host mapping on continuum. The value can be set
+to either \fBMEMCACHED_HASH_DEFAULT\fP, \fBMEMCACHED_HASH_MD5\fP,
+\fBMEMCACHED_HASH_CRC\fP, \fBMEMCACHED_HASH_FNV1_64\fP,
+\fBMEMCACHED_HASH_FNV1A_64\fP, \fBMEMCACHED_HASH_FNV1_32\fP, and
+\fBMEMCACHED_HASH_FNV1A_32\fP\&.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KETAMA_COMPAT
+.UNINDENT
+.sp
+Sets the compatibility mode. The value can be set to either MEMCACHED_KETAMA_COMPAT_LIBMEMCACHED (this is the default) or MEMCACHED_KETAMA_COMPAT_SPY to be compatible with the SPY Memcached client for Java.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_POLL_TIMEOUT
+.UNINDENT
+.sp
+Modify the timeout value that is used by poll. The default value is \-1. An signed int must be passed to memcached_behavior_set to change this value (this requires casting). For memcached_behavior_get a signed int value will be cast and returned as the unsigned long long.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_USER_DATA
+.UNINDENT
+.sp
+Deprecated since version <: 0.30
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BUFFER_REQUESTS
+.UNINDENT
+.sp
+Enabling buffered IO causes commands to "buffer" instead of being sent. Any action that gets data causes this buffer to be be sent to the remote connection. Quiting the connection or closing down the connection will also cause the buffered data to be pushed to the remote connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_VERIFY_KEY
+.UNINDENT
+.sp
+Enabling this will cause \fIlibmemcached(3)\fP to test all keys to verify that they are valid keys.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SORT_HOSTS
+.UNINDENT
+.sp
+Enabling this will cause hosts that are added to be placed in the host list in sorted order. This will defeat consisten hashing.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT
+.UNINDENT
+.sp
+In non\-blocking mode this changes the value of the timeout during socket connection in milliseconds. Specifying \-1 means an infinite time‐out.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_BINARY_PROTOCOL
+.UNINDENT
+.sp
+Enable the use of the binary protocol. Please note that you cannot toggle this flag on an open connection.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Set this value to enable the server be removed after continuous MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT times connection failure.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK
+.UNINDENT
+.sp
+Set this value to tune the number of messages that may be sent before libmemcached should start to automatically drain the input queue. Setting this value to high, may cause libmemcached to deadlock (trying to send data, but the send will block because the input buffer in the kernel is full).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK
+.UNINDENT
+.sp
+Set this value to tune the number of bytes that may be sent before libmemcached should start to automatically drain the input queue (need at least 10 IO requests sent without reading the input buffer). Setting this value to high, may cause libmemcached to deadlock (trying to send data, but the send will block because the input buffer in the kernel is full).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH
+.UNINDENT
+.sp
+The binary protocol works a bit different than the textual protocol in that a multiget is implemented as a pipe of single get\-operations which are sent to the server in a chunk. If you are using large multigets from your application, you may improve the latency of the gets by setting this value so you send out the first chunk of requests when you hit the specified limit.  It allows the servers to start processing the requests to send the data back while the rest of the requests are created and sent to the server.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NOREPLY
+.UNINDENT
+.sp
+Set this value to specify that you really don\(aqt care about the result from your storage commands (set, add, replace, append, prepend).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS
+.UNINDENT
+.sp
+If you just want "a poor mans HA", you may specify the numbers of replicas libmemcached should store of each item (on different servers).  This replication does not dedicate certain memcached servers to store the replicas in, but instead it will store the replicas together with all of the other objects (on the \(aqn\(aq next servers specified in your server list).
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ
+.UNINDENT
+.sp
+Allows randomizing the replica reads starting point. Normally the read is done from primary server and in case of miss the read is done from primary + 1, then primary + 2 all the way to \(aqn\(aq replicas. If this option is set on the starting point of the replica reads is randomized between the servers.  This allows distributing read load to multiple servers with the expense of more write traffic.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_CORK
+.UNINDENT
+.sp
+This open has been deprecated with the behavior now built and used appropriately on selected platforms.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE
+.UNINDENT
+.sp
+Enable TCP_KEEPALIVE behavior.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_KEEPALIVE_IDLE
+.UNINDENT
+.sp
+Specify time, in seconds, to mark a connection as idle. This is only available as an option Linux.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE
+.UNINDENT
+.sp
+Find the current size of SO_SNDBUF. A value of 0 means either an error occured or no hosts were available. It is safe to assume system default if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE
+.UNINDENT
+.sp
+Find the current size of SO_RCVBUF. A value of 0 means either an error occured or no hosts were available. It is safe to assume system default if this occurs. If an error occurs you can checked the last cached errno statement to find the specific error.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT
+.UNINDENT
+.sp
+Deprecated since version 0.48: See \fI\%MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP
+.sp
+This number of times a host can have an error before it is disabled.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS
+.UNINDENT
+.sp
+Deprecated since version 0.48: See \fI\%MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS\fP
+.sp
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure. This must be used in combination with MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT.
+
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS
+If enabled any hosts which have been flagged as disabled will be removed from the list of servers in the memcached_st structure.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_RETRY_TIMEOUT
+.UNINDENT
+.sp
+When enabled a host which is problematic will only be checked for usage based on the amount of time set by this behavior. The value is in seconds.
+.INDENT 0.0
+.TP
+.B MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY
+.UNINDENT
+.sp
+When enabled the prefix key will be added to the key when determining server
+by hash. See \fBMEMCACHED_CALLBACK_NAMESPACE\fP for additional
+information.
+.SH RETURN
+.sp
+memcached_behavior_get returns either the current value of the get, or 0
+or 1 on simple flag behaviors (1 being enabled). memcached_behavior_set
+returns failure or success.
+.SH NOTES
+.sp
+memcached_behavior_set in version .17 was changed from taking a pointer
+to data value, to taking a uin64_t.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,209 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CALLBACK_GET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_callback_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get and set a callback
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_callback_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_callback_set(memcached_st\fI\ *ptr\fP, \fI\%memcached_callback_t\fP\fI\ flag\fP, const void\fI\ *data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_callback_get(memcached_st\fI\ *ptr\fP, \fI\%memcached_callback_t\fP\fI\ flag\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) can have callbacks set key execution points. These either
+provide function calls at points in the code, or return pointers to
+structures for particular usages.
+.sp
+\fI\%memcached_callback_get()\fP takes a callback flag and returns the
+structure or function set by \fI\%memcached_callback_set()\fP\&.
+.sp
+\fI\%memcached_callback_set()\fP changes the function/structure assigned by a
+callback flag. No connections are reset.
+.sp
+You can use \fI\%MEMCACHED_CALLBACK_USER_DATA\fP to provide custom context
+if required for any of the callbacks.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.UNINDENT
+.sp
+When \fBmemcached_delete()\fP is called this function will be excuted. At
+the point of its execution all connections are closed.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLONE_FUNCTION
+.UNINDENT
+.sp
+When \fBmemcached_delete()\fP is called this function will be excuted.
+At the point of its execution all connections are closed.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_PREFIX_KEY
+See \fI\%MEMCACHED_CALLBACK_NAMESPACE\fP
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_NAMESPACE
+.UNINDENT
+.sp
+You can set a value which will be used to create a domain for your keys.
+The value specified here will be prefixed to each of your keys. The value can
+not be greater then \fBMEMCACHED_PREFIX_KEY_MAX_SIZE\fP \- 1 and will
+reduce \fBMEMCACHED_MAX_KEY\fP by the value of your key.
+.sp
+The prefix key is only applied to the primary key, not the master key.
+\fBMEMCACHED_FAILURE\fP will be returned if no key is set. In the case of
+a key which is too long, \fBMEMCACHED_BAD_KEY_PROVIDED\fP will be returned.
+.sp
+If you set a value with the value being NULL then the prefix key is disabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_USER_DATA
+.UNINDENT
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of \fBmemcached_fetch_execute()\fP\&. Cloning a
+\fBmemcached_st\fP will copy the pointer to the clone.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_FREE_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_GET_FAILURE
+.UNINDENT
+.sp
+This function implements the read through cache behavior. On failure of retrieval this callback will be called.
+.sp
+You are responsible for populating the result object provided. This result object will then be stored in the server and returned to the calling process.
+.sp
+You must clone the \fBmemcached_st\fP in order to
+make use of it. The value will be stored only if you return
+\fBMEMCACHED_SUCCESS\fP or \fBMEMCACHED_BUFFERED\fP\&. Returning
+\fBMEMCACHED_BUFFERED\fP will cause the object to be buffered and not sent
+immediatly (if this is the default behavior based on your connection setup
+this will happen automatically).
+.sp
+The prototype for this is:
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_DELETE_TRIGGER
+.UNINDENT
+.sp
+This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned in order to make use of it.
+.sp
+The prototype for this is:
+.INDENT 0.0
+.TP
+.B typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
+.UNINDENT
+.SH RETURN
+.sp
+\fI\%memcached_callback_get()\fP return the function or structure that was
+provided. Upon error, nothing is set, null is returned, and the
+\fBmemcached_return_t\fP argument is set to \fBMEMCACHED_FAILURE\fP\&.
+.sp
+\fI\%memcached_callback_set()\fP returns \fBMEMCACHED_SUCCESS\fP upon
+successful setting, otherwise \fBMEMCACHED_FAILURE\fP on error.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,209 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CALLBACK_SET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_callback_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get and set a callback
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_callback_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_callback_set(memcached_st\fI\ *ptr\fP, \fI\%memcached_callback_t\fP\fI\ flag\fP, const void\fI\ *data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_callback_get(memcached_st\fI\ *ptr\fP, \fI\%memcached_callback_t\fP\fI\ flag\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) can have callbacks set key execution points. These either
+provide function calls at points in the code, or return pointers to
+structures for particular usages.
+.sp
+\fI\%memcached_callback_get()\fP takes a callback flag and returns the
+structure or function set by \fI\%memcached_callback_set()\fP\&.
+.sp
+\fI\%memcached_callback_set()\fP changes the function/structure assigned by a
+callback flag. No connections are reset.
+.sp
+You can use \fI\%MEMCACHED_CALLBACK_USER_DATA\fP to provide custom context
+if required for any of the callbacks.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLEANUP_FUNCTION
+.UNINDENT
+.sp
+When \fBmemcached_delete()\fP is called this function will be excuted. At
+the point of its execution all connections are closed.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_CLONE_FUNCTION
+.UNINDENT
+.sp
+When \fBmemcached_delete()\fP is called this function will be excuted.
+At the point of its execution all connections are closed.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_PREFIX_KEY
+See \fI\%MEMCACHED_CALLBACK_NAMESPACE\fP
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_NAMESPACE
+.UNINDENT
+.sp
+You can set a value which will be used to create a domain for your keys.
+The value specified here will be prefixed to each of your keys. The value can
+not be greater then \fBMEMCACHED_PREFIX_KEY_MAX_SIZE\fP \- 1 and will
+reduce \fBMEMCACHED_MAX_KEY\fP by the value of your key.
+.sp
+The prefix key is only applied to the primary key, not the master key.
+\fBMEMCACHED_FAILURE\fP will be returned if no key is set. In the case of
+a key which is too long, \fBMEMCACHED_BAD_KEY_PROVIDED\fP will be returned.
+.sp
+If you set a value with the value being NULL then the prefix key is disabled.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_USER_DATA
+.UNINDENT
+.sp
+This allows you to store a pointer to a specifc piece of data. This can be
+retrieved from inside of \fBmemcached_fetch_execute()\fP\&. Cloning a
+\fBmemcached_st\fP will copy the pointer to the clone.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_MALLOC_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_REALLOC_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_FREE_FUNCTION
+.UNINDENT
+.sp
+Deprecated since version <0.32: Use \fBmemcached_set_memory_allocators\fP instead.
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_GET_FAILURE
+.UNINDENT
+.sp
+This function implements the read through cache behavior. On failure of retrieval this callback will be called.
+.sp
+You are responsible for populating the result object provided. This result object will then be stored in the server and returned to the calling process.
+.sp
+You must clone the \fBmemcached_st\fP in order to
+make use of it. The value will be stored only if you return
+\fBMEMCACHED_SUCCESS\fP or \fBMEMCACHED_BUFFERED\fP\&. Returning
+\fBMEMCACHED_BUFFERED\fP will cause the object to be buffered and not sent
+immediatly (if this is the default behavior based on your connection setup
+this will happen automatically).
+.sp
+The prototype for this is:
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_trigger_key)(memcached_st *ptr, char *key, size_t key_length, memcached_result_st *result);
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_CALLBACK_DELETE_TRIGGER
+.UNINDENT
+.sp
+This function implements a trigger upon successful deletion of a key. The memcached_st structure will need to be cloned in order to make use of it.
+.sp
+The prototype for this is:
+.INDENT 0.0
+.TP
+.B typedef memcached_return_t (*memcached_trigger_delete_key)(memcached_st *ptr, char *key, size_t key_length);
+.UNINDENT
+.SH RETURN
+.sp
+\fI\%memcached_callback_get()\fP return the function or structure that was
+provided. Upon error, nothing is set, null is returned, and the
+\fBmemcached_return_t\fP argument is set to \fBMEMCACHED_FAILURE\fP\&.
+.sp
+\fI\%memcached_callback_set()\fP returns \fBMEMCACHED_SUCCESS\fP upon
+successful setting, otherwise \fBMEMCACHED_FAILURE\fP on error.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,117 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CAS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_cas \- Working with data on the server in an atomic fashion
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_cas(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP, uint64_t\fI\ cas\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_cas_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP, uint64_t\fI\ cas\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result
+by calling \fBmemcached_result_cas()\fP on a memcached_result_st(3)
+structure. At the point that this note was written cas is still buggy in memached. Turning on tests for it in libmemcached(3) is optional. Please see
+\fBmemcached_set()\fP for information on how to do this.
+.sp
+\fI\%memcached_cas_by_key()\fP method behaves in a similar method as the non
+key methods. The difference is that it uses the group_key parameter
+to map objects to particular servers.
+.sp
+\fI\%memcached_cas()\fP is testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.  The
+reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user
+supplied data is less than 1400 bytes and depends on the protocol in use as,
+well as the operation being executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available to
+split among the key, key_prefix, and value; for cas ASCII operations there
+are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_append(3)\fP \fImemcached_add(3)\fP \fImemcached_prepend(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,117 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CAS_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_cas_by_key \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_cas(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP, uint64_t\fI\ cas\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_cas_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP, uint64_t\fI\ cas\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result
+by calling \fBmemcached_result_cas()\fP on a memcached_result_st(3)
+structure. At the point that this note was written cas is still buggy in memached. Turning on tests for it in libmemcached(3) is optional. Please see
+\fBmemcached_set()\fP for information on how to do this.
+.sp
+\fI\%memcached_cas_by_key()\fP method behaves in a similar method as the non
+key methods. The difference is that it uses the group_key parameter
+to map objects to particular servers.
+.sp
+\fI\%memcached_cas()\fP is testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.  The
+reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user
+supplied data is less than 1400 bytes and depends on the protocol in use as,
+well as the operation being executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available to
+split among the key, key_prefix, and value; for cas ASCII operations there
+are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead, exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_append(3)\fP \fImemcached_add(3)\fP \fImemcached_prepend(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,133 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CLONE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_clone \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(\fI\%memcached_st\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
+structure that will then be used by other libmemcached(3) functions to
+communicate with the server. You should either pass a statically declared
+\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+Please note, when you write new application use
+\fBmemcached()\fP over \fI\%memcached_create()\fP\&.
+.sp
+\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
+it copies the defaults and list of servers from the source
+\fI\%memcached_st\fP\&. If you pass a null as the argument for the source
+to clone, it is the same as a call to \fI\%memcached_create()\fP\&.
+If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
+for you.
+.sp
+\fI\%memcached_servers_reset()\fP allows you to zero out the list of
+servers that the \fI\%memcached_st\fP has.
+.sp
+To clean up memory associated with a \fI\%memcached_st\fP structure you
+should pass it to \fI\%memcached_free()\fP when you are finished using it.
+\fI\%memcached_free()\fP is the only way to make sure all memory is
+deallocated when you finish using the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.sp
+\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,133 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_CREATE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_create \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(\fI\%memcached_st\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
+structure that will then be used by other libmemcached(3) functions to
+communicate with the server. You should either pass a statically declared
+\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+Please note, when you write new application use
+\fBmemcached()\fP over \fI\%memcached_create()\fP\&.
+.sp
+\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
+it copies the defaults and list of servers from the source
+\fI\%memcached_st\fP\&. If you pass a null as the argument for the source
+to clone, it is the same as a call to \fI\%memcached_create()\fP\&.
+If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
+for you.
+.sp
+\fI\%memcached_servers_reset()\fP allows you to zero out the list of
+servers that the \fI\%memcached_st\fP has.
+.sp
+To clean up memory associated with a \fI\%memcached_st\fP structure you
+should pass it to \fI\%memcached_free()\fP when you are finished using it.
+\fI\%memcached_free()\fP is the only way to make sure all memory is
+deallocated when you finish using the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.sp
+\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,151 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DECREMENT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_decrement \- Incrementing and Decrementing Values
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_decrement takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_increment_with_initial is only available
+when using the binary protocol.
+.sp
+memcached_decrement_with_initial takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_decrement_with_initial is only available
+when using the binary protocol.
+.sp
+\fI\%memcached_increment_by_key()\fP, \fI\%memcached_decrement_by_key()\fP,
+\fI\%memcached_increment_with_initial_by_key()\fP, and
+\fI\%memcached_decrement_with_initial_by_key()\fP are master key equivalents of the above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP  is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use memcached_strerror to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,151 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DECREMENT_WITH_INITIAL" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_decrement_with_initial \- Incrementing and Decrementing Values
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_decrement takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_increment_with_initial is only available
+when using the binary protocol.
+.sp
+memcached_decrement_with_initial takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_decrement_with_initial is only available
+when using the binary protocol.
+.sp
+\fI\%memcached_increment_by_key()\fP, \fI\%memcached_decrement_by_key()\fP,
+\fI\%memcached_increment_with_initial_by_key()\fP, and
+\fI\%memcached_decrement_with_initial_by_key()\fP are master key equivalents of the above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP  is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use memcached_strerror to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,110 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DELETE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_delete \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_delete()\fP is used to delete a particular key.
+\fI\%memcached_delete_by_key()\fP works the same, but it takes a master key
+to find the given value.
+.sp
+Expiration works by placing the item into a delete queue, which means that
+it won\(aqt be possible to retrieve it by the "get" command. The "add" and
+"replace" commands with this key will also fail (the "set" command will
+succeed, however). After the time passes, the item is finally deleted from server memory.
+.sp
+Please note the the Danga memcached server removed tests for expiration in
+the 1.4 version.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.sp
+If you are using the non\-blocking mode of the library, success only
+means that the message was queued for delivery.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,110 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DELETE_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_delete_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_delete_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_delete()\fP is used to delete a particular key.
+\fI\%memcached_delete_by_key()\fP works the same, but it takes a master key
+to find the given value.
+.sp
+Expiration works by placing the item into a delete queue, which means that
+it won\(aqt be possible to retrieve it by the "get" command. The "add" and
+"replace" commands with this key will also fail (the "set" command will
+succeed, however). After the time passes, the item is finally deleted from server memory.
+.sp
+Please note the the Danga memcached server removed tests for expiration in
+the 1.4 version.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.sp
+If you are using the non\-blocking mode of the library, success only
+means that the message was queued for delivery.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,118 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DESTROY_SASL_AUTH_DATA" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_destroy_sasl_auth_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+\fI\%memcached_set_sasl_auth_data()\fP is a helper function defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+\fI\%memcached_destroy_sasl_auth_data\fP before calling
+\fBmemcached_free\fP to avoid a memory leak. You should NOT call
+\fI\%memcached_destroy_sasl_auth_data\fP if you specify your own callback
+function with \fI\%memcached_set_sasl_callbacks()\fP\&.
+.SH RETURN
+.sp
+\fI\%memcached_get_sasl_callbacks()\fP returns the callbacks currently used by
+this memcached handle. \fI\%memcached_set_sasl_auth_data()\fP returns
+\fBMEMCACHED_SUCCESS\fP upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,104 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_DUMP" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_dump \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get a list of keys found on memcached servers
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_dump(memcached_st\fI\ *ptr\fP, \fI\%memcached_dump_fn\fP\fI\ *function\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_dump_fn)(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_dump()\fP is used to get a list of keys found in memcached(1)
+servers. Because memcached(1) does not guarentee to dump all keys you can not
+assume you have fetched all keys from the server. The function takes an array
+of callbacks that it will use to execute on keys as they are found.
+.sp
+Currently the binary protocol is not testsed.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,94 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_EXIST" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_exist \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_exist(memcached_st\fI\ *ptr\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_exist_by_key(memcached_st\fI\ *ptr\fP, char\fI\ *group_key\fP, size_t\fI\ *group_key_length\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP)
+New in version 0.53.
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_exist()\fP can be used to check to see if a key exists. No value is returned if the key exists, or does not exist, on the server.
+.SH RETURN
+.sp
+\fI\%memcached_exist()\fP sets error to
+to \fBMEMCACHED_SUCCESS\fP upon finding that the key exists.
+\fBMEMCACHED_NOTFOUND\fP will be return if the key is not found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,94 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_EXIST_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_exist_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_exist(memcached_st\fI\ *ptr\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_exist_by_key(memcached_st\fI\ *ptr\fP, char\fI\ *group_key\fP, size_t\fI\ *group_key_length\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP)
+New in version 0.53.
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_exist()\fP can be used to check to see if a key exists. No value is returned if the key exists, or does not exist, on the server.
+.SH RETURN
+.sp
+\fI\%memcached_exist()\fP sets error to
+to \fBMEMCACHED_SUCCESS\fP upon finding that the key exists.
+\fBMEMCACHED_NOTFOUND\fP will be return if the key is not found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,105 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_FETCH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_fetch \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B char *memcached_fetch(memcached_st\fI\ *ptr\fP, char\fI\ *key\fP, size_t\fI\ *key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+Deprecated since version 0.50: Use \fBmemcached_fetch_result()\fP instead.
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_fetch()\fP is used to fetch an individual value from the server. \fBmemcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+Values returned by \fI\%memcached_fetch()\fP must be freed by the caller.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+\fI\%memcached_fetch()\fP sets error to
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.sp
+\fBMEMCACHED_KEY_TOO_BIG\fP is set to error whenever \fI\%memcached_fetch()\fP was used
+and the key was set larger then \fBMEMCACHED_MAX_KEY\fP, which was the largest
+key allowed for the original memcached ascii server.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_fetch_result(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_FETCH_EXECUTE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_fetch_execute \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_FETCH_RESULT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_fetch_result \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,98 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_FLUSH_BUFFERS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_flush_buffers \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Flush and senf buffered commands
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_flush_buffers(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_flush_buffers()\fP is used in conjunction with
+\fBMEMCACHED_BEHAVIOR_BUFFER_REQUESTS\fP (see memcached_behavior(3)) to flush all buffers by sending the buffered commands to the server for processing.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,133 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_FREE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_free \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_create(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_free(\fI\%memcached_st\fP\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_st\fP* memcached_clone(\fI\%memcached_st\fP\fI\ *destination\fP, \fI\%memcached_st\fP\fI\ *source\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_servers_reset(\fI\%memcached_st\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_create()\fP is used to create a \fI\%memcached_st\fP
+structure that will then be used by other libmemcached(3) functions to
+communicate with the server. You should either pass a statically declared
+\fI\%memcached_st\fP to \fI\%memcached_create()\fP or
+a NULL. If a NULL passed in then a structure is allocated for you.
+.sp
+Please note, when you write new application use
+\fBmemcached()\fP over \fI\%memcached_create()\fP\&.
+.sp
+\fI\%memcached_clone()\fP is similar to \fI\%memcached_create()\fP but
+it copies the defaults and list of servers from the source
+\fI\%memcached_st\fP\&. If you pass a null as the argument for the source
+to clone, it is the same as a call to \fI\%memcached_create()\fP\&.
+If the destination argument is NULL a \fI\%memcached_st\fP will be allocated
+for you.
+.sp
+\fI\%memcached_servers_reset()\fP allows you to zero out the list of
+servers that the \fI\%memcached_st\fP has.
+.sp
+To clean up memory associated with a \fI\%memcached_st\fP structure you
+should pass it to \fI\%memcached_free()\fP when you are finished using it.
+\fI\%memcached_free()\fP is the only way to make sure all memory is
+deallocated when you finish using the structure.
+.sp
+You may wish to avoid using memcached_create(3) or memcached_clone(3) with a
+stack based allocation. The most common issues related to ABI safety involve
+heap allocated structures.
+.SH RETURN
+.sp
+\fI\%memcached_create()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.sp
+\fI\%memcached_clone()\fP returns a pointer to the \fI\%memcached_st\fP
+that was created (or initialized). On an allocation failure, it returns NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,159 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GENERATE_HASH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_generate_hash \- Generating hash values directly
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Hash a key value
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_hash_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash_value(const char\fI\ *key\fP, size_t\fI\ key_length\fP, \fI\%memcached_hash_t\fP\fI\ hash_algorithm\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_DEFAULT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MD5
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_CRC
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1_64
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1A_64
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1_32
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1A_32
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_JENKINS
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MURMUR
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_HSIEH
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MURMUR3
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_generate_hash_value()\fP allows you to hash a key using one of
+the hash functions defined in the library. This method is provided for
+the convenience of higher\-level language bindings and is not necessary
+for normal memcache operations.
+.sp
+The allowed hash algorithm constants are listed in the manpage for
+\fBmemcached_behavior_set()\fP\&.
+.sp
+\fI\%memcached_generate_hash()\fP takes a \fBmemcached_st\fP struture
+and produces the hash value that would have been generated based on the
+defaults of \fBmemcached_st\fP\&.
+.sp
+As of version 0.36 all hash methods have been placed into the library
+libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
+.SH RETURN
+.sp
+A 32\-bit integer which is the result of hashing the given key.
+For 64\-bit hash algorithms, only the least\-significant 32 bits are
+returned.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,159 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GENERATE_HASH_VALUE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_generate_hash_value \- Generating hash values directly
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Hash a key value
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_hash_t
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash_value(const char\fI\ *key\fP, size_t\fI\ key_length\fP, \fI\%memcached_hash_t\fP\fI\ hash_algorithm\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_generate_hash(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_DEFAULT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MD5
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_CRC
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1_64
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1A_64
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1_32
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_FNV1A_32
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_JENKINS
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MURMUR
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_HSIEH
+.UNINDENT
+.INDENT 0.0
+.TP
+.B MEMCACHED_HASH_MURMUR3
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_generate_hash_value()\fP allows you to hash a key using one of
+the hash functions defined in the library. This method is provided for
+the convenience of higher\-level language bindings and is not necessary
+for normal memcache operations.
+.sp
+The allowed hash algorithm constants are listed in the manpage for
+\fBmemcached_behavior_set()\fP\&.
+.sp
+\fI\%memcached_generate_hash()\fP takes a \fBmemcached_st\fP struture
+and produces the hash value that would have been generated based on the
+defaults of \fBmemcached_st\fP\&.
+.sp
+As of version 0.36 all hash methods have been placed into the library
+libhashkit(3) which is linked with libmemcached(3). For more information please see its documentation.
+.SH RETURN
+.sp
+A 32\-bit integer which is the result of hashing the given key.
+For 64\-bit hash algorithms, only the least\-significant 32 bits are
+returned.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_get \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GET_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_get_by_key \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,138 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GET_MEMORY_ALLOCATORS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_get_memory_allocators \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manage memory allocator functions
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_memory_allocators(memcached_st\fI\ *ptr\fP, \fI\%memcached_malloc_fn\fP\fI\ mem_malloc\fP, \fI\%memcached_free_fn\fP\fI\ mem_free\fP, \fI\%memcached_realloc_fn\fP\fI\ mem_realloc\fP, \fI\%memcached_calloc_fn\fP\fI\ mem_calloc\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_get_memory_allocators(memcached_st\fI\ *ptr\fP, \fI\%memcached_malloc_fn\fP\fI\ *mem_malloc\fP, \fI\%memcached_free_fn\fP\fI\ *mem_free\fP, \fI\%memcached_realloc_fn\fP\fI\ *mem_realloc\fP, \fI\%memcached_calloc_fn\fP\fI\ *mem_calloc\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_get_memory_allocators_context(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_malloc_fn)(memcached_st\fI\ *ptr\fP, const size_t\fI\ size\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_realloc_fn)(memcached_st\fI\ *ptr\fP, void\fI\ *mem\fP, const size_t\fI\ size\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void (*memcached_free_fn)(memcached_st\fI\ *ptr\fP, void\fI\ *mem\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_calloc_fn)(memcached_st\fI\ *ptr\fP, size_t\fI\ nelem\fP, const size_t\fI\ elsize\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators, optimized
+for your application. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.sp
+\fI\%memcached_set_memory_allocators()\fP is used to set the memory
+allocators used by the memcached instance specified by ptr. Please note that
+you cannot override only one of the memory allocators, you have to specify a
+complete new set if you want to override one of them. All of the memory
+allocation functions should behave as specified in the C99 standard. Specify
+NULL as all functions to reset them to the default values.
+.sp
+\fI\%memcached_get_memory_allocators()\fP is used to get the currently used
+memory allocators by a mamcached handle.
+.sp
+\fI\%memcached_get_memory_allocators_context()\fP returns the void * that
+was passed in during the call to \fI\%memcached_set_memory_allocators()\fP\&.
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+\fI\%memcached_set_memory_allocators()\fP return \fBMEMCACHED_SUCCESS\fP
+upon success, and \fBMEMCACHED_FAILURE\fP if you don\(aqt pass a complete set
+of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,118 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GET_SASL_CALLBACKS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_get_sasl_callbacks \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+\fI\%memcached_set_sasl_auth_data()\fP is a helper function defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+\fI\%memcached_destroy_sasl_auth_data\fP before calling
+\fBmemcached_free\fP to avoid a memory leak. You should NOT call
+\fI\%memcached_destroy_sasl_auth_data\fP if you specify your own callback
+function with \fI\%memcached_set_sasl_callbacks()\fP\&.
+.SH RETURN
+.sp
+\fI\%memcached_get_sasl_callbacks()\fP returns the callbacks currently used by
+this memcached handle. \fI\%memcached_set_sasl_auth_data()\fP returns
+\fBMEMCACHED_SUCCESS\fP upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,114 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_GET_USER_DATA" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_get_user_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manage user specific data
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B void *memcached_get_user_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void *memcached_set_user_data(memcached_st\fI\ *ptr\fP, void\fI\ *data\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+.sp
+\fI\%memcached_set_user_data()\fP is used to set the user specific data in the
+\fBmemcached_st\fP structure.
+.sp
+\fI\%memcached_get_user_data()\fP is used to retrieve the user specific data in the \fBmemcached_st\fP structure.
+.SH RETURN
+.sp
+\fI\%memcached_set_user_data()\fP returns the previous value of the user specific data.
+.sp
+\fI\%memcached_get_user_data()\fP returns the current value uf the user specific data.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,151 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_INCREMENT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_increment \- Incrementing and Decrementing Values
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_decrement takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_increment_with_initial is only available
+when using the binary protocol.
+.sp
+memcached_decrement_with_initial takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_decrement_with_initial is only available
+when using the binary protocol.
+.sp
+\fI\%memcached_increment_by_key()\fP, \fI\%memcached_decrement_by_key()\fP,
+\fI\%memcached_increment_with_initial_by_key()\fP, and
+\fI\%memcached_decrement_with_initial_by_key()\fP are master key equivalents of the above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP  is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use memcached_strerror to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,151 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_INCREMENT_WITH_INITIAL" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_increment_with_initial \- Incrementing and Decrementing Values
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint32_t\fI\ offset\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_increment_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_decrement_with_initial_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, uint64_t\fI\ offset\fP, uint64_t\fI\ initial\fP, time_t\fI\ expiration\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fImemcached(1)\fP servers have the ability to increment and decrement keys
+(overflow and underflow are not detected). This gives you the ability to use
+memcached to generate shared sequences of values.
+.sp
+memcached_increment takes a key and keylength and increments the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_decrement takes a key and keylength and decrements the value by
+the offset passed to it. The value is then returned via the uint32_t
+value pointer you pass to it.
+.sp
+memcached_increment_with_initial takes a key and keylength and increments
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_increment_with_initial is only available
+when using the binary protocol.
+.sp
+memcached_decrement_with_initial takes a key and keylength and decrements
+the value by the offset passed to it. If the object specified by key does
+not exist, one of two things may happen: If the expiration value is
+MEMCACHED_EXPIRATION_NOT_ADD, the operation will fail. For all other
+expiration values, the operation will succeed by seeding the value for that
+key with a initial value to expire with the provided expiration time. The
+flags will be set to zero.The value is then returned via the uint32_t
+value pointer you pass to it. memcached_decrement_with_initial is only available
+when using the binary protocol.
+.sp
+\fI\%memcached_increment_by_key()\fP, \fI\%memcached_decrement_by_key()\fP,
+\fI\%memcached_increment_with_initial_by_key()\fP, and
+\fI\%memcached_decrement_with_initial_by_key()\fP are master key equivalents of the above.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP  is returned.
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use memcached_strerror to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,90 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_LAST_ERROR_MESSAGE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_last_error_message \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const char *memcached_last_error_message(memcached_st\fI\ *\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_last_error_message()\fP is used to return the last error
+message that the server responded too. If this error came from a specific
+server, its hostname and port will be provided in the error message.
+.SH RETURN
+.sp
+memcached_last_error_message returns a const char* which does not need to be
+de\-allocated. If no error has occurred then it will return NULL.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,102 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_LIB_VERSION" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_lib_version \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const char * memcached_lib_version(void)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_version(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_lib_version()\fP is used to return a simple version string representing the libmemcached version (client library version, not server version)
+.sp
+\fI\%memcached_version()\fP is used to set the major, minor, and micro versions of each memcached server being used by the memcached_st connection structure. It returns the memcached server return code.
+.SH RETURN
+.sp
+\fI\%memcached_lib_version()\fP returns a string with the version of the libmemcached driver.
+.sp
+A value of \fBmemcached_return_t\fP is returned from :c:func:\(aqmemcached_version\(aq
+.sp
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+.sp
+If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP()\fP behavior set, the value \fBMEMCACHED_NOT_SUPPORTED\fP will be returned.
+.sp
+Use \fBmemcached_strerror()\fP to translate this value to
+a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_MGET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_mget \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_MGET_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_mget_by_key \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_MGET_EXECUTE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_mget_execute \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,187 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_MGET_EXECUTE_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_mget_execute_by_key \- Retrieving data from the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_result_st * memcached_fetch_result(memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_get_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, size_t\fI\ *value_length\fP, uint32_t\fI\ *flags\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_fetch_execute(memcached_st\fI\ *ptr\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute(memcached_st\fI\ *ptr\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_mget_execute_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char * const\fI\ *keys\fP, const size_t\fI\ *key_length\fP, size_t\fI\ number_of_keys\fP, \fI\%memcached_execute_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_execute_fn)(const memcached_st\fI\ *ptr\fP, memcached_result_st\fI\ *result\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_get()\fP is used to fetch an individual value from the server.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of
+the object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. Any
+object returned by \fI\%memcached_get()\fP must be released by the caller
+application.
+.sp
+\fI\%memcached_mget()\fP is used to select multiple keys at once. For
+multiple key operations it is always faster to use this function. This function always works asynchronously.
+.sp
+To retrieve data after a successful execution of \fI\%memcached_mget()\fP, you will need to
+call \fI\%memcached_fetch_result()\fP\&.  You should continue to call this function until
+it returns a NULL (i.e. no more values). If you need to quit in the middle of a
+\fI\%memcached_mget()\fP call, you can execute a \fBmemcached_quit()\fP, those this is not required.
+.sp
+\fI\%memcached_fetch_result()\fP is used to fetch an individual value from the server. \fI\%memcached_mget()\fP must always be called before using this method.
+You must pass in a key and its length to fetch the object. You must supply
+three pointer variables which will give you the state of the returned
+object.  A \fBuint32_t\fP pointer to contain whatever flags you stored with the value, a \fBsize_t\fP pointer which will be filled with size of of the
+object, and a \fBmemcached_return_t\fP pointer to hold any error. The
+object will be returned upon success and NULL will be returned on failure. \fBMEMCACHED_END\fP is returned by the *error value when all objects that have been found are returned. The final value upon \fBMEMCACHED_END\fP is null.
+.sp
+\fI\%memcached_fetch_result()\fP is used to return a \fBmemcached_result_st\fP structure from a memcached server. The result object is forward compatible
+with changes to the server. For more information please refer to the
+\fBmemcached_result_st\fP help. This function will dynamically allocate a
+result structure for you if you do not pass one to the function.
+.sp
+\fI\%memcached_fetch_execute()\fP is a callback function for result sets.
+Instead of returning the results to you for processing, it passes each of the
+result sets to the list of functions you provide. It passes to the function
+a \fBmemcached_st\fP that can be cloned for use in the called
+function (it can not be used directly). It also passes a result set which does
+not need to be freed. Finally it passes a "context". This is just a pointer to
+a memory reference you supply the calling function. Currently only one value
+is being passed to each function call. In the future there will be an option
+to allow this to be an array.
+.sp
+\fI\%memcached_mget_execute()\fP and \fI\%memcached_mget_execute_by_key()\fP
+is similar to \fI\%memcached_mget()\fP, but it may trigger the supplied
+callbacks with result sets while sending out the queries. If you try to
+perform a really large multiget with \fI\%memcached_mget()\fP you may
+encounter a deadlock in the OS kernel (it will fail to write data to the
+socket because the input buffer is full). \fI\%memcached_mget_execute()\fP
+solves this problem by processing some of the results before continuing
+sending out requests. Please note that this function is only available in
+the binary protocol.
+.sp
+\fI\%memcached_get_by_key()\fP and \fI\%memcached_mget_by_key()\fP behave
+in a similar nature as \fI\%memcached_get()\fP and \fI\%memcached_mget()\fP\&.
+The difference is that they take a master key that is used for determining
+which server an object was stored if key partitioning was used for storage.
+.sp
+All of the above functions are not tested when the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP has been set. Executing any of these
+functions with this behavior on will result in \fBMEMCACHED_NOT_SUPPORTED\fP being returned, or for those functions which do not return a \fBmemcached_return_t\fP, the error function parameter will be set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.SH RETURN
+.sp
+All objects retrieved via \fI\%memcached_get()\fP or \fI\%memcached_get_by_key()\fP must be freed with \fIfree(3)\fP\&.
+.sp
+\fI\%memcached_get()\fP will return NULL on
+error. You must look at the value of error to determine what the actual error
+was.
+.sp
+\fI\%memcached_fetch_execute()\fP return \fBMEMCACHED_SUCCESS\fP if
+all keys were successful. \fBMEMCACHED_NOTFOUND\fP will be return if no
+keys at all were found.
+.sp
+\fI\%memcached_fetch_result()\fP sets error
+to \fBMEMCACHED_END\fP upon successful conclusion.
+\fBMEMCACHED_NOTFOUND\fP will be return if no keys at all were found.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_BEHAVIOR_GET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_behavior_get \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_BEHAVIOR_SET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_behavior_set \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_CREATE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_create \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_DESTROY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_destroy \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_FETCH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_fetch \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_POP" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_pop \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_PUSH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_push \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_RELEASE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_release \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,166 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_POOL_ST" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_pool_st \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B memcached_pool_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool(const char\fI\ *option_string\fP, size_t\fI\ option_string_length\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_pool_st\fP* memcached_pool_create(memcached_st*\fI\ mmc\fP, int\fI\ initial\fP, int\fI\ max\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.46: Use \fI\%memcached_pool()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_destroy(\fI\%memcached_pool_st\fP*\fI\ pool\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_pop(\fI\%memcached_pool_st\fP*\fI\ pool\fP, bool\fI\ block\fP, memcached_return_t\fI\ *rc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_fetch()\fP
+.INDENT 0.0
+.TP
+.B memcached_st* memcached_pool_fetch(\fI\%memcached_pool_st\fP*, struct timespec*\fI\ relative_time\fP, memcached_return_t*\fI\ rc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_pop
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_push(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st\fI\ *mmc\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.53: Use \fI\%memcached_pool_push()\fP
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_release(\fI\%memcached_pool_st\fP*\fI\ pool\fP, memcached_st*\fI\ mmc\fP)
+.UNINDENT
+.sp
+New in version 0.53: Synonym for memcached_pool_push.
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_set(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ data\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_pool_behavior_get(\fI\%memcached_pool_st\fP\fI\ *pool\fP, memcached_behavior_t\fI\ flag\fP, uint64_t\fI\ *value\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcachedutil \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_pool()\fP is used to create a connection pool of objects you
+may use to remove the overhead of using memcached_clone for short lived
+\fBmemcached_st\fP objects. Please see \fBlibmemcached_configuration\fP for details on the format of the configuration string.
+.sp
+\fI\%memcached_pool_destroy()\fP is used to destroy the connection pool
+created with \fI\%memcached_pool_create()\fP and release all allocated
+resources. It will return the pointer to the \fBmemcached_st\fP structure
+passed as an argument to \fI\%memcached_pool_create()\fP, and returns the ownership of the pointer to the caller when created with \fI\%memcached_pool_create()\fP, otherwise NULL is returned..
+.sp
+\fI\%memcached_pool_fetch()\fP is used to fetch a connection structure from the
+connection pool. The relative_time argument specifies if the function should
+block and wait for a connection structure to be available if we try
+to exceed the maximum size. You need to specify time in relative time.
+.sp
+\fI\%memcached_pool_release()\fP is used to return a connection structure back to the pool.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_set()\fP is used to get/set behavior flags on all connections in the pool.
+.sp
+Both \fI\%memcached_pool_release()\fP and \fI\%memcached_pool_fetch()\fP are thread safe.
+.SH RETURN
+.sp
+\fI\%memcached_pool_destroy()\fP returns the pointer (and ownership) to the \fBmemcached_st\fP structure used to create the pool. If connections are in use it returns NULL.
+.sp
+\fI\%memcached_pool_pop()\fP returns a pointer to a \fBmemcached_st\fP structure from the pool (or NULL if an allocation cannot be satisfied).
+.sp
+\fI\%memcached_pool_release()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+\fI\%memcached_pool_behavior_get()\fP and \fI\%memcached_pool_behavior_get()\fP returns \fBMEMCACHED_SUCCESS\fP upon success.
+.sp
+If any methods returns MEMCACHED_IN_PROGRESS then a lock on the pool could not be obtained. If any of the parameters passed to any of these functions is invalid, MEMCACHED_INVALID_ARGUMENTS will be returned.
+.sp
+memcached_pool_fetch may return MEMCACHED_TIMEOUT if a timeout occurs while waiting for a free memcached_st. MEMCACHED_NOTFOUND if no memcached_st was available.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP \fIlibmemcached_configuration(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,145 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_PREPEND" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_prepend \- Appending to or Prepending to data on the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Appending or Prepending to data on the server
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_prepend()\fP and memcached_append are used to
+modify information on a server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters when using
+either a version of memcached which is 1.4 or below, or when using the text
+protocol. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap). "flags" is a 4byte space that is stored
+alongside of the main value. Many sub libraries make use of this field,
+so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_prepend()\fP places a segment of data before the last piece
+of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_append()\fP places a segment of data at the end of the last
+piece of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_prepend_by_key()\fP and
+\fI\%memcached_append_by_key()\fP methods both behave in a similar
+method as the non key methods. The difference is that they use their
+group_key parameter to map objects to particular servers.
+.sp
+If you are looking for performance, \fBmemcached_set()\fP with non\-blocking
+IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using
+these operations with this behavior on, there are limits to the size of the
+payload being sent to the server.  The reason for these limits is that the
+Memcached Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations
+there are at least 1318 bytes available to split among the key, key_prefix
+and value. If the total size of the command, including overhead, exceeds
+1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_add(3)\fP \fImemcached_cas(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,145 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_PREPEND_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_prepend_by_key \- Appending to or Prepending to data on the server
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Appending or Prepending to data on the server
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_prepend_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_append_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_prepend()\fP and memcached_append are used to
+modify information on a server. All methods take a key, and its length to
+store the object. Keys are currently limited to 250 characters when using
+either a version of memcached which is 1.4 or below, or when using the text
+protocol. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is
+meant to be used as a bitmap). "flags" is a 4byte space that is stored
+alongside of the main value. Many sub libraries make use of this field,
+so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_prepend()\fP places a segment of data before the last piece
+of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_append()\fP places a segment of data at the end of the last
+piece of data stored. Currently expiration and key are not used in the server.
+.sp
+\fI\%memcached_prepend_by_key()\fP and
+\fI\%memcached_append_by_key()\fP methods both behave in a similar
+method as the non key methods. The difference is that they use their
+group_key parameter to map objects to particular servers.
+.sp
+If you are looking for performance, \fBmemcached_set()\fP with non\-blocking
+IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the
+\fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using
+these operations with this behavior on, there are limits to the size of the
+payload being sent to the server.  The reason for these limits is that the
+Memcached Server does not allow multi\-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol,
+\fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value,
+flags and expiry combined may not exceed 1368 bytes. When running with the
+ASCII protocol, the exact limit fluctuates depending on which function is
+being executed and whether the function is a cas operation or not. For
+non\-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations
+there are at least 1318 bytes available to split among the key, key_prefix
+and value. If the total size of the command, including overhead, exceeds
+1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_set(3)\fP \fImemcached_add(3)\fP \fImemcached_cas(3)\fP \fImemcached_replace(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,99 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_QUIT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_quit \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B void memcached_quit(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_quit()\fP will disconnect you from all currently connected
+servers. It will also reset the state of the connection (ie, any \fBmemcached_fetch()\fP you are in the middle of will be terminated). This function is
+called automatically when you call \fBmemcached_free()\fP on the \fBmemcached_st\fP structure.
+.sp
+You do not need to call this on your own. All operations to change server
+hashes and parameters will handle connections to the server for you. This
+function is provided mainly so that you can timeout your connections or
+reset connections during the middle of a \fBmemcached_fetch()\fP\&.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned On success that value
+will be \fBMEMCACHED_SUCCESS\fP\&.  Use \fBmemcached_strerror()\fP to
+translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_REPLACE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_replace \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_REPLACE_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_replace_by_key \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,118 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SASL_SET_AUTH_DATA" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_sasl_set_auth_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+\fI\%memcached_set_sasl_auth_data()\fP is a helper function defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+\fI\%memcached_destroy_sasl_auth_data\fP before calling
+\fBmemcached_free\fP to avoid a memory leak. You should NOT call
+\fI\%memcached_destroy_sasl_auth_data\fP if you specify your own callback
+function with \fI\%memcached_set_sasl_callbacks()\fP\&.
+.SH RETURN
+.sp
+\fI\%memcached_get_sasl_callbacks()\fP returns the callbacks currently used by
+this memcached handle. \fI\%memcached_set_sasl_auth_data()\fP returns
+\fBMEMCACHED_SUCCESS\fP upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,157 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_ADD" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_add \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_server_fn
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_count(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_udp(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_unix_socket(memcached_st\fI\ *ptr\fP, const char\fI\ *socket\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_push(memcached_st\fI\ *ptr\fP, const memcached_server_st\fI\ *list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_cursor(const memcached_st\fI\ *ptr\fP, const \fI\%memcached_server_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.sp
+compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP performs operations on a list of hosts. The order of
+these hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+\fI\%memcached_server_count()\fP provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_add()\fP pushes a single TCP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate servers
+are allowed, so duplication is not checked. Executing this function with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.UNINDENT
+.sp
+\fI\%memcached_server_add_udp()\fP pushes a single UDP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate
+servers are allowed, so duplication is not checked. Executing this function with out setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.sp
+\fI\%memcached_server_add_unix_socket()\fP pushes a single UNIX socket into the \fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less than \fBMEMCACHED_MAX_HOST_LENGTH\fP\&.
+.sp
+\fI\%memcached_server_push()\fP pushes an array of \fBmemcached_server_st\fP into the \fBmemcached_st\fP structure. These servers will be placed at
+the end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+\fI\%memcached_server_by_key()\fP allows you to provide a key and retrieve the
+server which would be used for assignment.
+.sp
+\fI\%memcached_server_get_last_disconnect()\fP returns a pointer to the last
+server for which there was a connection problem. It does not mean this
+particular server is currently dead but if the library is reporting a server
+is, the returned server is a very good candidate.
+.sp
+\fI\%memcached_server_cursor()\fP takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. \fI\%memcached_server_cursor()\fP is passed the original caller \fBmemcached_st\fP in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,157 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_COUNT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_count \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_server_fn
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_count(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_udp(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_unix_socket(memcached_st\fI\ *ptr\fP, const char\fI\ *socket\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_push(memcached_st\fI\ *ptr\fP, const memcached_server_st\fI\ *list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_cursor(const memcached_st\fI\ *ptr\fP, const \fI\%memcached_server_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.sp
+compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP performs operations on a list of hosts. The order of
+these hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+\fI\%memcached_server_count()\fP provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_add()\fP pushes a single TCP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate servers
+are allowed, so duplication is not checked. Executing this function with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.UNINDENT
+.sp
+\fI\%memcached_server_add_udp()\fP pushes a single UDP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate
+servers are allowed, so duplication is not checked. Executing this function with out setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.sp
+\fI\%memcached_server_add_unix_socket()\fP pushes a single UNIX socket into the \fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less than \fBMEMCACHED_MAX_HOST_LENGTH\fP\&.
+.sp
+\fI\%memcached_server_push()\fP pushes an array of \fBmemcached_server_st\fP into the \fBmemcached_st\fP structure. These servers will be placed at
+the end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+\fI\%memcached_server_by_key()\fP allows you to provide a key and retrieve the
+server which would be used for assignment.
+.sp
+\fI\%memcached_server_get_last_disconnect()\fP returns a pointer to the last
+server for which there was a connection problem. It does not mean this
+particular server is currently dead but if the library is reporting a server
+is, the returned server is a very good candidate.
+.sp
+\fI\%memcached_server_cursor()\fP takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. \fI\%memcached_server_cursor()\fP is passed the original caller \fBmemcached_st\fP in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,157 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_CURSOR" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_cursor \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_server_fn
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_count(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_udp(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_unix_socket(memcached_st\fI\ *ptr\fP, const char\fI\ *socket\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_push(memcached_st\fI\ *ptr\fP, const memcached_server_st\fI\ *list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_cursor(const memcached_st\fI\ *ptr\fP, const \fI\%memcached_server_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.sp
+compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP performs operations on a list of hosts. The order of
+these hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+\fI\%memcached_server_count()\fP provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_add()\fP pushes a single TCP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate servers
+are allowed, so duplication is not checked. Executing this function with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.UNINDENT
+.sp
+\fI\%memcached_server_add_udp()\fP pushes a single UDP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate
+servers are allowed, so duplication is not checked. Executing this function with out setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.sp
+\fI\%memcached_server_add_unix_socket()\fP pushes a single UNIX socket into the \fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less than \fBMEMCACHED_MAX_HOST_LENGTH\fP\&.
+.sp
+\fI\%memcached_server_push()\fP pushes an array of \fBmemcached_server_st\fP into the \fBmemcached_st\fP structure. These servers will be placed at
+the end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+\fI\%memcached_server_by_key()\fP allows you to provide a key and retrieve the
+server which would be used for assignment.
+.sp
+\fI\%memcached_server_get_last_disconnect()\fP returns a pointer to the last
+server for which there was a connection problem. It does not mean this
+particular server is currently dead but if the library is reporting a server
+is, the returned server is a very good candidate.
+.sp
+\fI\%memcached_server_cursor()\fP takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. \fI\%memcached_server_cursor()\fP is passed the original caller \fBmemcached_st\fP in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,157 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_LIST" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_list \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_server_fn
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_count(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_udp(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_unix_socket(memcached_st\fI\ *ptr\fP, const char\fI\ *socket\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_push(memcached_st\fI\ *ptr\fP, const memcached_server_st\fI\ *list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_cursor(const memcached_st\fI\ *ptr\fP, const \fI\%memcached_server_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.sp
+compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP performs operations on a list of hosts. The order of
+these hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+\fI\%memcached_server_count()\fP provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_add()\fP pushes a single TCP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate servers
+are allowed, so duplication is not checked. Executing this function with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.UNINDENT
+.sp
+\fI\%memcached_server_add_udp()\fP pushes a single UDP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate
+servers are allowed, so duplication is not checked. Executing this function with out setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.sp
+\fI\%memcached_server_add_unix_socket()\fP pushes a single UNIX socket into the \fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less than \fBMEMCACHED_MAX_HOST_LENGTH\fP\&.
+.sp
+\fI\%memcached_server_push()\fP pushes an array of \fBmemcached_server_st\fP into the \fBmemcached_st\fP structure. These servers will be placed at
+the end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+\fI\%memcached_server_by_key()\fP allows you to provide a key and retrieve the
+server which would be used for assignment.
+.sp
+\fI\%memcached_server_get_last_disconnect()\fP returns a pointer to the last
+server for which there was a connection problem. It does not mean this
+particular server is currently dead but if the library is reporting a server
+is, the returned server is a very good candidate.
+.sp
+\fI\%memcached_server_cursor()\fP takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. \fI\%memcached_server_cursor()\fP is passed the original caller \fBmemcached_st\fP in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,146 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_LIST_APPEND" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_list_append \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const memcached_instance_st *
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_list_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const const memcached_instance_st * memcached_server_list(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_list_free(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_list_st\fP memcached_server_list_append(\fI\%memcached_server_list_st\fP\fI\ list\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_list_count(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const char *memcached_server_error(const memcached_instance_st *\fI\ instance\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_error_reset(const memcached_instance_st *\fI\ list\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.INDENT 0.0
+.TP
+.B void memcached_servers_parse()
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+\fI\%memcached_server_st\fP structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+\fI\%memcached_server_list()\fP is used to provide an array of all defined hosts. This was incorrectly documented as "requiring free" up till version 0.39.
+.sp
+\fI\%memcached_server_list_free()\fP deallocates all memory associated with the array of \fI\%memcached_server_st\fP that you passed to it.
+.sp
+\fI\%memcached_server_list_append()\fP adds a server to the end of a
+\fI\%memcached_server_st\fP array. On error null will be returned and the
+\fBmemcached_return_t\fP pointer you passed into the function will be set with the appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+DEPRECATED \fI\%memcached_servers_parse()\fP, please see \fBmemcached()\fP
+.sp
+\fI\%memcached_server_error()\fP can be used to look at the text of the last error message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to \fI\%memcached_server_list_st\fP\&. This was done for a style reason to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,146 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_LIST_COUNT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_list_count \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const memcached_instance_st *
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_list_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const const memcached_instance_st * memcached_server_list(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_list_free(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_list_st\fP memcached_server_list_append(\fI\%memcached_server_list_st\fP\fI\ list\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_list_count(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const char *memcached_server_error(const memcached_instance_st *\fI\ instance\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_error_reset(const memcached_instance_st *\fI\ list\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.INDENT 0.0
+.TP
+.B void memcached_servers_parse()
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+\fI\%memcached_server_st\fP structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+\fI\%memcached_server_list()\fP is used to provide an array of all defined hosts. This was incorrectly documented as "requiring free" up till version 0.39.
+.sp
+\fI\%memcached_server_list_free()\fP deallocates all memory associated with the array of \fI\%memcached_server_st\fP that you passed to it.
+.sp
+\fI\%memcached_server_list_append()\fP adds a server to the end of a
+\fI\%memcached_server_st\fP array. On error null will be returned and the
+\fBmemcached_return_t\fP pointer you passed into the function will be set with the appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+DEPRECATED \fI\%memcached_servers_parse()\fP, please see \fBmemcached()\fP
+.sp
+\fI\%memcached_server_error()\fP can be used to look at the text of the last error message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to \fI\%memcached_server_list_st\fP\&. This was done for a style reason to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,146 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_LIST_FREE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_list_free \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const memcached_instance_st *
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_list_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const const memcached_instance_st * memcached_server_list(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_list_free(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_list_st\fP memcached_server_list_append(\fI\%memcached_server_list_st\fP\fI\ list\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_list_count(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const char *memcached_server_error(const memcached_instance_st *\fI\ instance\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_error_reset(const memcached_instance_st *\fI\ list\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.INDENT 0.0
+.TP
+.B void memcached_servers_parse()
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+\fI\%memcached_server_st\fP structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+\fI\%memcached_server_list()\fP is used to provide an array of all defined hosts. This was incorrectly documented as "requiring free" up till version 0.39.
+.sp
+\fI\%memcached_server_list_free()\fP deallocates all memory associated with the array of \fI\%memcached_server_st\fP that you passed to it.
+.sp
+\fI\%memcached_server_list_append()\fP adds a server to the end of a
+\fI\%memcached_server_st\fP array. On error null will be returned and the
+\fBmemcached_return_t\fP pointer you passed into the function will be set with the appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+DEPRECATED \fI\%memcached_servers_parse()\fP, please see \fBmemcached()\fP
+.sp
+\fI\%memcached_server_error()\fP can be used to look at the text of the last error message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to \fI\%memcached_server_list_st\fP\&. This was done for a style reason to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,157 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVER_PUSH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_server_push \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_server_fn
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_count(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_udp(memcached_st\fI\ *ptr\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_add_unix_socket(memcached_st\fI\ *ptr\fP, const char\fI\ *socket\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_push(memcached_st\fI\ *ptr\fP, const memcached_server_st\fI\ *list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_server_cursor(const memcached_st\fI\ *ptr\fP, const \fI\%memcached_server_fn\fP\fI\ *callback\fP, void\fI\ *context\fP, uint32_t\fI\ number_of_callbacks\fP)
+.UNINDENT
+.sp
+compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fBlibmemcached\fP performs operations on a list of hosts. The order of
+these hosts determine routing to keys. Functions are provided to add keys to
+memcached_st structures. To manipulate lists of servers see
+memcached_server_st(3).
+.sp
+\fI\%memcached_server_count()\fP provides you a count of the current number of
+servers being used by a \fBmemcached_st\fP structure.
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_add()\fP pushes a single TCP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate servers
+are allowed, so duplication is not checked. Executing this function with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set will result in a \fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.UNINDENT
+.sp
+\fI\%memcached_server_add_udp()\fP pushes a single UDP server into the \fBmemcached_st\fP structure. This server will be placed at the end. Duplicate
+servers are allowed, so duplication is not checked. Executing this function with out setting the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior will result in a
+\fBMEMCACHED_INVALID_HOST_PROTOCOL\fP\&.
+.sp
+\fI\%memcached_server_add_unix_socket()\fP pushes a single UNIX socket into the \fBmemcached_st\fP structure. This UNIX socket will be placed at the end.
+Duplicate servers are allowed, so duplication is not checked. The length
+of the filename must be one character less than \fBMEMCACHED_MAX_HOST_LENGTH\fP\&.
+.sp
+\fI\%memcached_server_push()\fP pushes an array of \fBmemcached_server_st\fP into the \fBmemcached_st\fP structure. These servers will be placed at
+the end. Duplicate servers are allowed, so duplication is not checked. A
+copy is made of structure so the list provided (and any operations on
+the list) are not saved.
+.sp
+\fI\%memcached_server_by_key()\fP allows you to provide a key and retrieve the
+server which would be used for assignment.
+.sp
+\fI\%memcached_server_get_last_disconnect()\fP returns a pointer to the last
+server for which there was a connection problem. It does not mean this
+particular server is currently dead but if the library is reporting a server
+is, the returned server is a very good candidate.
+.sp
+\fI\%memcached_server_cursor()\fP takes a memcached_st and loops through the
+list of hosts currently in the cursor calling the list of callback
+functions provided. You can optionally pass in a value via
+context which will be provided to each callback function. An error
+return from any callback will terminate the loop. \fI\%memcached_server_cursor()\fP is passed the original caller \fBmemcached_st\fP in its current state.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,146 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SERVERS_PARSE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_servers_parse \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const memcached_instance_st *
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_list_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_server_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const const memcached_instance_st * memcached_server_list(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_list_free(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_server_list_st\fP memcached_server_list_append(\fI\%memcached_server_list_st\fP\fI\ list\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B uint32_t memcached_server_list_count(\fI\%memcached_server_list_st\fP\fI\ list\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const char *memcached_server_error(const memcached_instance_st *\fI\ instance\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_server_error_reset(const memcached_instance_st *\fI\ list\fP)
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.INDENT 0.0
+.TP
+.B void memcached_servers_parse()
+.UNINDENT
+.sp
+Deprecated since version 0.39.
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) operates on a list of hosts which are stored in
+\fI\%memcached_server_st\fP structures. You should not modify these structures
+directly. Functions are provided to modify these structures (and more can be
+added, just ask!).
+.sp
+\fI\%memcached_server_list()\fP is used to provide an array of all defined hosts. This was incorrectly documented as "requiring free" up till version 0.39.
+.sp
+\fI\%memcached_server_list_free()\fP deallocates all memory associated with the array of \fI\%memcached_server_st\fP that you passed to it.
+.sp
+\fI\%memcached_server_list_append()\fP adds a server to the end of a
+\fI\%memcached_server_st\fP array. On error null will be returned and the
+\fBmemcached_return_t\fP pointer you passed into the function will be set with the appropriate error. If the value of port is zero, it is set to the default
+port of a memcached server.
+.sp
+DEPRECATED \fI\%memcached_servers_parse()\fP, please see \fBmemcached()\fP
+.sp
+\fI\%memcached_server_error()\fP can be used to look at the text of the last error message sent by the server to to the client.
+.sp
+Before version 0.39 theses functions used a memcache_server_st *. In 0.39
+memcached_server_st * was aliased to \fI\%memcached_server_list_st\fP\&. This was done for a style reason to help clean up some concepts in the code.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SET" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_set \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,147 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SET_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_set_by_key \- Storing and Replacing Data
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_add_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_replace_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, time_t\fI\ expiration\fP, uint32_t\fI\ flags\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_set()\fP, \fI\%memcached_add()\fP, and \fI\%memcached_replace()\fP are all used to store information on the server. All methods take a key, and its length to store the object. Keys are currently limited to 250 characters when using either a version of memcached(1) which is 1.4 or below, or when using the text protocol. You must supply both a value and a length. Optionally you
+store the object. Keys are currently limited to 250 characters by the
+memcached(1) server. You must supply both a value and a length. Optionally you
+may test an expiration time for the object and a 16 byte value (it is meant to be used as a bitmap). "flags" is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.
+.sp
+\fI\%memcached_set()\fP will write an object to the server. If an object
+already exists it will overwrite what is in the server. If the object does not
+exist it will be written. If you are using the non\-blocking mode this function
+will always return true unless a network error occurs.
+.sp
+\fI\%memcached_replace()\fP replaces an object on the server. If the object is not found on the server an error occurs.
+.sp
+\fI\%memcached_add()\fP adds an object to the server. If the object is found on the server an error occurs, otherwise the value is stored.
+.sp
+\fBmemcached_cas()\fP overwrites data in the server as long as the "cas"
+value is still the same in the server. You can get the cas value of a result by
+calling \fBmemcached_result_cas()\fP on a memcached_result_st(3) structure. At the point
+that this note was written cas is still buggy in memached. Turning on tests
+for it in libmemcached(3) is optional. Please see memcached_set for
+information on how to do this.
+.sp
+\fI\%memcached_set_by_key()\fP, \fI\%memcached_add_by_key()\fP, and \fI\%memcached_replace_by_key()\fP methods all behave in a similar method as the non
+key methods. The difference is that they use their group_key parameter to map
+objects to particular servers.
+.sp
+If you are looking for performance, \fI\%memcached_set()\fP with non\-blocking IO is the fastest way to store data on the server.
+.sp
+All of the above functions are testsed with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior enabled. However, when using these operations with this behavior
+on, there are limits to the size of the payload being sent to the server.
+The reason for these limits is that the Memcached Server does not allow
+multi\-datagram requests and the current server implementation sets a datagram
+size to 1400 bytes. Due to protocol overhead, the actual limit of the user supplied data is less than 1400 bytes and depends on the protocol in use as, well as the operation being
+executed. When running with the binary protocol, \fBMEMCACHED_BEHAVIOR_BINARY_PROTOCOL\fP, the size of the key,value, flags and expiry combined may not
+exceed 1368 bytes. When running with the ASCII protocol, the exact limit fluctuates depending on which function is being executed and whether the function is a cas operation or not. For non\-cas ASCII set operations, there are at least
+1335 bytes available to split among the key, key_prefix, and value; for cas
+ASCII operations there are at least 1318 bytes available to split among the key, key_prefix and value. If the total size of the command, including overhead,
+exceeds 1400 bytes, a \fBMEMCACHED_WRITE_FAILURE\fP will be returned.
+.SH RETURN
+.sp
+All methods return a value of type \fBmemcached_return_t\fP\&.
+On success the value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.sp
+For \fI\%memcached_replace()\fP and \fI\%memcached_add()\fP, \fBMEMCACHED_NOTSTORED\fP is a legitmate error in the case of a collision.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemached(3)\fP \fImemcached_strerror(3)\fP \fImemcached_prepend(3)\fP \fImemcached_cas(3)\fP \fImemcached_append(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,138 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SET_MEMORY_ALLOCATORS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_set_memory_allocators \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manage memory allocator functions
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_memory_allocators(memcached_st\fI\ *ptr\fP, \fI\%memcached_malloc_fn\fP\fI\ mem_malloc\fP, \fI\%memcached_free_fn\fP\fI\ mem_free\fP, \fI\%memcached_realloc_fn\fP\fI\ mem_realloc\fP, \fI\%memcached_calloc_fn\fP\fI\ mem_calloc\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void memcached_get_memory_allocators(memcached_st\fI\ *ptr\fP, \fI\%memcached_malloc_fn\fP\fI\ *mem_malloc\fP, \fI\%memcached_free_fn\fP\fI\ *mem_free\fP, \fI\%memcached_realloc_fn\fP\fI\ *mem_realloc\fP, \fI\%memcached_calloc_fn\fP\fI\ *mem_calloc\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * memcached_get_memory_allocators_context(const memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_malloc_fn)(memcached_st\fI\ *ptr\fP, const size_t\fI\ size\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_realloc_fn)(memcached_st\fI\ *ptr\fP, void\fI\ *mem\fP, const size_t\fI\ size\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void (*memcached_free_fn)(memcached_st\fI\ *ptr\fP, void\fI\ *mem\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void * (*memcached_calloc_fn)(memcached_st\fI\ *ptr\fP, size_t\fI\ nelem\fP, const size_t\fI\ elsize\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to specify your own memory allocators, optimized
+for your application. This enables libmemcached to be used inside of applications that have their own malloc implementation.
+.sp
+\fI\%memcached_set_memory_allocators()\fP is used to set the memory
+allocators used by the memcached instance specified by ptr. Please note that
+you cannot override only one of the memory allocators, you have to specify a
+complete new set if you want to override one of them. All of the memory
+allocation functions should behave as specified in the C99 standard. Specify
+NULL as all functions to reset them to the default values.
+.sp
+\fI\%memcached_get_memory_allocators()\fP is used to get the currently used
+memory allocators by a mamcached handle.
+.sp
+\fI\%memcached_get_memory_allocators_context()\fP returns the void * that
+was passed in during the call to \fI\%memcached_set_memory_allocators()\fP\&.
+.sp
+The first argument to the memory allocator functions is a pointer to a
+memcached structure, the is passed as const and you will need to clone
+it in order to make use of any operation which would modify it.
+.SH NOTES
+.sp
+In version 0.38 all functions were modified to have a context void pointer
+passed to them. This was so that customer allocators could have their
+own space for memory.
+.SH RETURN
+.sp
+\fI\%memcached_set_memory_allocators()\fP return \fBMEMCACHED_SUCCESS\fP
+upon success, and \fBMEMCACHED_FAILURE\fP if you don\(aqt pass a complete set
+of function pointers.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,118 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SET_SASL_CALLBACKS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_set_sasl_callbacks \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached_pool.h>
+.INDENT 0.0
+.TP
+.B void memcached_set_sasl_callbacks(memcached_st\fI\ *ptr\fP, const sasl_callback_t\fI\ *callbacks\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B const sasl_callback_t *memcached_get_sasl_callbacks(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_set_sasl_auth_data(memcached_st\fI\ *ptr\fP, const char\fI\ *username\fP, const char\fI\ *password\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_destroy_sasl_auth_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to plug in your own callbacks function used by
+libsasl to perform SASL authentication.
+.sp
+Please note that SASL requires the memcached binary protocol, and you have
+to specify the callbacks before you connect to the server.
+.sp
+\fI\%memcached_set_sasl_auth_data()\fP is a helper function defining
+the basic functionality for you, but it will store the username and password
+in memory. If you choose to use this method you have to call
+\fI\%memcached_destroy_sasl_auth_data\fP before calling
+\fBmemcached_free\fP to avoid a memory leak. You should NOT call
+\fI\%memcached_destroy_sasl_auth_data\fP if you specify your own callback
+function with \fI\%memcached_set_sasl_callbacks()\fP\&.
+.SH RETURN
+.sp
+\fI\%memcached_get_sasl_callbacks()\fP returns the callbacks currently used by
+this memcached handle. \fI\%memcached_set_sasl_auth_data()\fP returns
+\fBMEMCACHED_SUCCESS\fP upon success.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,114 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_SET_USER_DATA" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_set_user_data \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Manage user specific data
+.SH LIBRARY
+.sp
+C Client Library for memcached (libmemcached, \-lmemcached)
+.SH SYNOPSIS
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B void *memcached_get_user_data(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B void *memcached_set_user_data(memcached_st\fI\ *ptr\fP, void\fI\ *data\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) allows you to store a pointer to a user specific data inside
+the memcached_st structure.
+.sp
+\fI\%memcached_set_user_data()\fP is used to set the user specific data in the
+\fBmemcached_st\fP structure.
+.sp
+\fI\%memcached_get_user_data()\fP is used to retrieve the user specific data in the \fBmemcached_st\fP structure.
+.SH RETURN
+.sp
+\fI\%memcached_set_user_data()\fP returns the previous value of the user specific data.
+.sp
+\fI\%memcached_get_user_data()\fP returns the current value uf the user specific data.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,137 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STAT" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_stat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get memcached statistics
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_stat_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_stat_fn)(const memcached_instance_st *\fI\ server\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_stat_st\fP *memcached_stat(memcached_st\fI\ *ptr\fP, char\fI\ *args\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_servername(\fI\%memcached_stat_st\fP\fI\ *stat\fP, char\fI\ *args\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_stat_get_value(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, const char\fI\ *key\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char ** memcached_stat_get_keys(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_execute(memcached_st\fI\ *memc\fP, const char\fI\ *args\fP, \fI\%memcached_stat_fn\fP\fI\ func\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fI\%memcached_stat_st\fP structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. \fI\%memcached_stat_get_value()\fP has been provided to query the structure.
+.sp
+\fI\%memcached_stat_execute()\fP uses the servers found in \fI\%memcached_stat_st\fP and executes a "stat" command on each server. args is an optional argument that can be passed in to modify the behavior of "stats". You will need to supply a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+\fI\%memcached_stat()\fP fetches an array of \fI\%memcached_stat_st\fP structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, a NULL value is returned and the error parameter is set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.sp
+\fI\%memcached_stat_servername()\fP can be used standalone without a \fBmemcached_st\fP to obtain the state of a particular server.  "args" is used to define a particular state object (a list of these are not provided for by either
+the \fI\%memcached_stat_get_keys()\fP call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+\fI\%memcached_stat_get_value()\fP returns the value of a particular state key. You specify the key you wish to obtain.  The key must be null terminated.
+.sp
+\fI\%memcached_stat_get_keys()\fP returns a list of keys that the server has state objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fI\%memcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,137 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STAT_EXECUTE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_stat_execute \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get memcached statistics
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_stat_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_stat_fn)(const memcached_instance_st *\fI\ server\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_stat_st\fP *memcached_stat(memcached_st\fI\ *ptr\fP, char\fI\ *args\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_servername(\fI\%memcached_stat_st\fP\fI\ *stat\fP, char\fI\ *args\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_stat_get_value(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, const char\fI\ *key\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char ** memcached_stat_get_keys(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_execute(memcached_st\fI\ *memc\fP, const char\fI\ *args\fP, \fI\%memcached_stat_fn\fP\fI\ func\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fI\%memcached_stat_st\fP structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. \fI\%memcached_stat_get_value()\fP has been provided to query the structure.
+.sp
+\fI\%memcached_stat_execute()\fP uses the servers found in \fI\%memcached_stat_st\fP and executes a "stat" command on each server. args is an optional argument that can be passed in to modify the behavior of "stats". You will need to supply a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+\fI\%memcached_stat()\fP fetches an array of \fI\%memcached_stat_st\fP structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, a NULL value is returned and the error parameter is set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.sp
+\fI\%memcached_stat_servername()\fP can be used standalone without a \fBmemcached_st\fP to obtain the state of a particular server.  "args" is used to define a particular state object (a list of these are not provided for by either
+the \fI\%memcached_stat_get_keys()\fP call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+\fI\%memcached_stat_get_value()\fP returns the value of a particular state key. You specify the key you wish to obtain.  The key must be null terminated.
+.sp
+\fI\%memcached_stat_get_keys()\fP returns a list of keys that the server has state objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fI\%memcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,137 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STAT_GET_KEYS" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_stat_get_keys \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get memcached statistics
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_stat_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_stat_fn)(const memcached_instance_st *\fI\ server\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_stat_st\fP *memcached_stat(memcached_st\fI\ *ptr\fP, char\fI\ *args\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_servername(\fI\%memcached_stat_st\fP\fI\ *stat\fP, char\fI\ *args\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_stat_get_value(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, const char\fI\ *key\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char ** memcached_stat_get_keys(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_execute(memcached_st\fI\ *memc\fP, const char\fI\ *args\fP, \fI\%memcached_stat_fn\fP\fI\ func\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fI\%memcached_stat_st\fP structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. \fI\%memcached_stat_get_value()\fP has been provided to query the structure.
+.sp
+\fI\%memcached_stat_execute()\fP uses the servers found in \fI\%memcached_stat_st\fP and executes a "stat" command on each server. args is an optional argument that can be passed in to modify the behavior of "stats". You will need to supply a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+\fI\%memcached_stat()\fP fetches an array of \fI\%memcached_stat_st\fP structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, a NULL value is returned and the error parameter is set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.sp
+\fI\%memcached_stat_servername()\fP can be used standalone without a \fBmemcached_st\fP to obtain the state of a particular server.  "args" is used to define a particular state object (a list of these are not provided for by either
+the \fI\%memcached_stat_get_keys()\fP call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+\fI\%memcached_stat_get_value()\fP returns the value of a particular state key. You specify the key you wish to obtain.  The key must be null terminated.
+.sp
+\fI\%memcached_stat_get_keys()\fP returns a list of keys that the server has state objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fI\%memcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,137 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STAT_GET_VALUE" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_stat_get_value \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get memcached statistics
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_stat_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_stat_fn)(const memcached_instance_st *\fI\ server\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_stat_st\fP *memcached_stat(memcached_st\fI\ *ptr\fP, char\fI\ *args\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_servername(\fI\%memcached_stat_st\fP\fI\ *stat\fP, char\fI\ *args\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_stat_get_value(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, const char\fI\ *key\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char ** memcached_stat_get_keys(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_execute(memcached_st\fI\ *memc\fP, const char\fI\ *args\fP, \fI\%memcached_stat_fn\fP\fI\ func\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fI\%memcached_stat_st\fP structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. \fI\%memcached_stat_get_value()\fP has been provided to query the structure.
+.sp
+\fI\%memcached_stat_execute()\fP uses the servers found in \fI\%memcached_stat_st\fP and executes a "stat" command on each server. args is an optional argument that can be passed in to modify the behavior of "stats". You will need to supply a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+\fI\%memcached_stat()\fP fetches an array of \fI\%memcached_stat_st\fP structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, a NULL value is returned and the error parameter is set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.sp
+\fI\%memcached_stat_servername()\fP can be used standalone without a \fBmemcached_st\fP to obtain the state of a particular server.  "args" is used to define a particular state object (a list of these are not provided for by either
+the \fI\%memcached_stat_get_keys()\fP call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+\fI\%memcached_stat_get_value()\fP returns the value of a particular state key. You specify the key you wish to obtain.  The key must be null terminated.
+.sp
+\fI\%memcached_stat_get_keys()\fP returns a list of keys that the server has state objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fI\%memcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,137 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STAT_SERVERNAME" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_stat_servername \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Get memcached statistics
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_stat_st
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t (*memcached_stat_fn)(const memcached_instance_st *\fI\ server\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, const char\fI\ *value\fP, size_t\fI\ value_length\fP, void\fI\ *context\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \fI\%memcached_stat_st\fP *memcached_stat(memcached_st\fI\ *ptr\fP, char\fI\ *args\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_servername(\fI\%memcached_stat_st\fP\fI\ *stat\fP, char\fI\ *args\fP, const char\fI\ *hostname\fP, in_port_t\fI\ port\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char * memcached_stat_get_value(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, const char\fI\ *key\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B char ** memcached_stat_get_keys(memcached_st\fI\ *ptr\fP, \fI\%memcached_stat_st\fP\fI\ *stat\fP, memcached_return_t\fI\ *error\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_stat_execute(memcached_st\fI\ *memc\fP, const char\fI\ *args\fP, \fI\%memcached_stat_fn\fP\fI\ func\fP, void\fI\ *context\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+libmemcached(3) has the ability to query a memcached server (or collection
+of servers) for their current state. Queries to find state return a
+\fI\%memcached_stat_st\fP structure. You are responsible for freeing this structure. While it is possible to access the structure directly it is not advisable. \fI\%memcached_stat_get_value()\fP has been provided to query the structure.
+.sp
+\fI\%memcached_stat_execute()\fP uses the servers found in \fI\%memcached_stat_st\fP and executes a "stat" command on each server. args is an optional argument that can be passed in to modify the behavior of "stats". You will need to supply a callback function that will be supplied each pair of values returned by
+the memcached server.
+.sp
+\fI\%memcached_stat()\fP fetches an array of \fI\%memcached_stat_st\fP structures containing the state of all available memcached servers. The return value must be freed by the calling application. If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP\fP behavior set, a NULL value is returned and the error parameter is set to \fBMEMCACHED_NOT_SUPPORTED\fP\&.
+.sp
+\fI\%memcached_stat_servername()\fP can be used standalone without a \fBmemcached_st\fP to obtain the state of a particular server.  "args" is used to define a particular state object (a list of these are not provided for by either
+the \fI\%memcached_stat_get_keys()\fP call nor are they defined in the memcached protocol). You must specify the hostname and port of the server you want to
+obtain information on.
+.sp
+\fI\%memcached_stat_get_value()\fP returns the value of a particular state key. You specify the key you wish to obtain.  The key must be null terminated.
+.sp
+\fI\%memcached_stat_get_keys()\fP returns a list of keys that the server has state objects on. You are responsible for freeing this list.
+.sp
+A command line tool, memstat(1), is provided so that you do not have to write
+an application to do this.
+.SH RETURN
+.sp
+Varies, see particular functions.
+.sp
+Any method returning a \fI\%memcached_stat_st\fP expects you to free the
+memory allocated for it.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,93 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_STRERROR" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_strerror \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const char * memcached_strerror(memcached_st\fI\ *ptr\fP, memcached_return_t\fI\ rc\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_strerror()\fP takes a \fBmemcached_return_t\fP value and returns a string describing the error.
+.sp
+This string must not be modified by the application.
+.sp
+\fBmemcached_return_t\fP values are returned from nearly all libmemcached(3) functions.
+.sp
+\fBmemcached_return_t\fP values are of an enum type so that you can set up responses with switch/case and know that you are capturing all possible return values.
+.SH RETURN
+.sp
+\fI\%memcached_strerror()\fP returns a string describing a \fBmemcached_return_t\fP value.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,99 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_TOUCH" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_touch \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_touch(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_touch_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_touch()\fP is used to update the expiration time on an existing key.
+\fI\%memcached_touch_by_key()\fP works the same, but it takes a master key
+to find the given value.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,99 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_TOUCH_BY_KEY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_touch_by_key \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_touch(memcached_st\fI\ *ptr\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_touch_by_key(memcached_st\fI\ *ptr\fP, const char\fI\ *group_key\fP, size_t\fI\ group_key_length\fP, const char\fI\ *key\fP, size_t\fI\ key_length\fP, time_t\fI\ expiration\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_touch()\fP is used to update the expiration time on an existing key.
+\fI\%memcached_touch_by_key()\fP works the same, but it takes a master key
+to find the given value.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+Use \fBmemcached_strerror()\fP to translate this value to a printable
+string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,94 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_VERBOSITY" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_verbosity \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Modifiy verbosity of servers
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_verbosity(memcached_st\fI\ *ptr\fP, uint32_t\fI\ verbosity\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_verbosity()\fP modifies the "verbosity" of the
+memcached(1) servers referenced in the \fBmemcached_st\fP  parameter.
+.SH RETURN
+.sp
+A value of type \fBmemcached_return_t\fP is returned.
+.sp
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+.sp
+Use \fBmemcached_strerror()\fP to translate this value to a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,102 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCACHED_VERSION" "3" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcached_version \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+#include <libmemcached/memcached.h>
+.INDENT 0.0
+.TP
+.B const char * memcached_lib_version(void)
+.UNINDENT
+.INDENT 0.0
+.TP
+.B memcached_return_t memcached_version(memcached_st\fI\ *ptr\fP)
+.UNINDENT
+.sp
+Compile and link with \-lmemcached
+.SH DESCRIPTION
+.sp
+\fI\%memcached_lib_version()\fP is used to return a simple version string representing the libmemcached version (client library version, not server version)
+.sp
+\fI\%memcached_version()\fP is used to set the major, minor, and micro versions of each memcached server being used by the memcached_st connection structure. It returns the memcached server return code.
+.SH RETURN
+.sp
+\fI\%memcached_lib_version()\fP returns a string with the version of the libmemcached driver.
+.sp
+A value of \fBmemcached_return_t\fP is returned from :c:func:\(aqmemcached_version\(aq
+.sp
+On success that value will be \fBMEMCACHED_SUCCESS\fP\&.
+.sp
+If called with the \fBMEMCACHED_BEHAVIOR_USE_UDP()\fP behavior set, the value \fBMEMCACHED_NOT_SUPPORTED\fP will be returned.
+.sp
+Use \fBmemcached_strerror()\fP to translate this value to
+a printable string.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP \fImemcached_strerror(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,117 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCAPABLE" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcapable \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memcapable [options]
+.SH DESCRIPTION
+.sp
+\fBmemcapable\fP connects to the specified memcached server and tries to
+determine its capabilities by running the various commands and verifying
+the response.
+.SH LIMITATIONS
+.sp
+The current version of memcapable will only verify the binary protocol.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-h hostname
+.UNINDENT
+.sp
+Specify the hostname to connect to. The default is \fIlocalhost\fP
+.INDENT 0.0
+.TP
+.B \-p port
+.UNINDENT
+.sp
+Specify the port number to connect to. The default is \fI11211\fP
+.INDENT 0.0
+.TP
+.B \-c
+.UNINDENT
+.sp
+Generate a coredump when it detects an error from the server.
+.INDENT 0.0
+.TP
+.B \-v
+.UNINDENT
+.sp
+Print out the comparison when it detects an error from the server.
+.INDENT 0.0
+.TP
+.B \-t n
+.UNINDENT
+.sp
+Set the timeout from an IO operation to/from the server to \fIn\fP seconds.
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Trond Norbye, <\fI\%trond.norbye@gmail.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,107 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCAT" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memcat [options] key
+.sp
+Copy a set of keys to stdout
+.SH DESCRIPTION
+.sp
+\fBmemcat\fP outputs to stdout the value a single or multiple set of keys
+stored in a memcached(1) server. If any key is not found an error is returned.
+.sp
+It is similar to the standard UNIX cat(1) utility.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,110 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMCP" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memcp \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Copies files to a collection of memcached servers
+.SH SYNOPSIS
+.sp
+memcp [options] [file] [server]
+.SH DESCRIPTION
+.sp
+\fBmemcp\fP copies one or more files into memcached(1) servers.
+It is similar to the standard UNIX cp(1) command.
+.sp
+The key names will be the names of the files,
+without any directory path.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood, <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,92 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMDUMP" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memdump \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Dump a list of keys from a server.
+.SH SYNOPSIS
+.sp
+memdump [options]
+.SH DESCRIPTION
+.sp
+\fBmemdump\fP  dumps a list of "keys" from all servers that
+it is told to fetch from. Because memcached does not guarentee to
+provide all keys it is not possible to get a complete "dump".
+.SH OPTIONS
+.sp
+For a full list of operations run the tool with option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,91 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMERROR" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memerror \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Translates a memcached error code into a string
+.SH SYNOPSIS
+.sp
+memerror [options] [error code]
+.SH DESCRIPTION
+.sp
+\fBmemerror\fP translates an error code from libmemcached(3) into a human
+readable string.
+.SH OPTIONS
+.sp
+For a full list of operations run the tool with option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more infoerroration please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,102 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMEXIST" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memexist \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memexist [options] [key]
+.SH DESCRIPTION
+.sp
+\fBmemexist\fP checks for the existance of a key within a cluster.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,105 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMFLUSH" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memflush \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Reset a server or list of servers
+.SH SYNOPSIS
+.sp
+memflush [options]
+.SH DESCRIPTION
+.sp
+\fBmemflush\fP  resets the contents of memcached(1) servers.
+This means that all data in the specified servers will be deleted.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+For a full list of operations run the tool with option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,90 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMPARSE" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memparse \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+Copies files to a collection of memcached servers
+.SH SYNOPSIS
+.sp
+memparse [options] "option string"
+.SH DESCRIPTION
+.sp
+\fBmemparse\fP can be used to validate an option string.
+.SH OPTIONS
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,102 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMPING" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memping \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memping [options] [server]
+.SH DESCRIPTION
+.sp
+\fBmemping\fP can be used to ping a memcached server to see if it is taking connections.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,104 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMRM" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memrm \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+memrm \- Remove a key(s) from a collection of memcached servers
+.SH SYNOPSIS
+.sp
+memrm [options] [key]
+.SH DESCRIPTION
+.sp
+\fBmemrm\fP  removes items, specified by key, from memcached(1) servers.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+For a full list of operations run the tool with the
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.sp
+Mark Atwood, <\fI\%mark@fallenpegasus.com\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,101 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMSLAP" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memslap \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memslap [options]
+.SH DESCRIPTION
+.sp
+\fBmemslap\fP is a load generation and benchmark tool for memcached(1)
+servers. It generates configurable workload such as threads, concurrencies, connections, run time, overwrite, miss rate, key size, value size, get/set proportion, expected throughput, and so on.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+For a full list of operations run the tool with:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\(aq\fI\%http://libmemcached.org/\fP <\fI\%http://libmemcached.org/\fP>\(aq_
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,106 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMSTAT" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memstat \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.sp
+memstat \- Display the operating status of a single or group of memcached servers
+.SH SYNOPSIS
+.sp
+memstat [options]
+.SH DESCRIPTION
+.sp
+\fBmemstat\fP  dumps the state of memcached(1) servers.
+It displays all data to stdout.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(aqMEMCACHED_SERVERS, \-\-args\(aq
+.UNINDENT
+.sp
+which can be used to specify the "argument" sent to the stats command (ie slab, size, items, etc..).
+.sp
+For a full list of operations run the tool with:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-\-analyze
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,102 @@
+.\" Man page generated from reStructuredText.
+.
+.TH "MEMTOUCH" "1" "February 09, 2014" "1.0.18" "libmemcached"
+.SH NAME
+memtouch \- libmemcached Documentation
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+memtouch [options] key
+.SH DESCRIPTION
+.sp
+\fBmemtouch\fP does a "touch" on the specified key.
+.SH OPTIONS
+.sp
+You can specify servers via the option:
+.INDENT 0.0
+.TP
+.B \-\-servers
+.UNINDENT
+.sp
+or via the environment variable:
+.INDENT 0.0
+.TP
+.B \(gaMEMCACHED_SERVERS\(ga
+.UNINDENT
+.sp
+If you do not specify either these, the final value in the command line list is the name of a server(s).
+.sp
+For a full list of operations run the tool with the option:
+.INDENT 0.0
+.TP
+.B \-\-help
+.UNINDENT
+.SH HOME
+.sp
+To find out more information please check:
+\fI\%http://libmemcached.org/\fP
+.SH AUTHOR
+.sp
+Brian Aker, <\fI\%brian@tangent.org\fP>
+.SH SEE ALSO
+.sp
+\fImemcached(1)\fP \fIlibmemcached(3)\fP
+.SH AUTHOR
+Brian Aker
+.SH COPYRIGHT
+2011-2013, Brian Aker DataDifferential, http://datadifferential.com/
+.\" Generated by docutils manpage writer.
+.
@@ -0,0 +1,657 @@
+/* mem_config.in.  Generated from configure.ac by autoheader.  */
+
+
+#pragma once
+
+/* _SYS_FEATURE_TESTS_H is Solaris, _FEATURES_H is GCC */
+#if defined( _SYS_FEATURE_TESTS_H) || defined(_FEATURES_H)
+#error "You should include mem_config.h as your first include file"
+#endif
+
+
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* the location of <cinttypes> */
+#undef CINTTYPES_H
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* the location of <cstdint> */
+#undef CSTDINT_H
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 to enable debugging code. */
+#undef DEBUG
+
+/* Support for DrizzleD */
+#undef DRIZZLED_BINARY
+
+/* Another magical number */
+#undef EAI_SYSTEM
+
+/* machine is big-endian */
+#undef ENDIAN_BIG
+
+/* machine is little-endian */
+#undef ENDIAN_LITTLE
+
+/* Name of the gearmand binary used in make test */
+#undef GEARMAND_BINARY
+
+/* Support for Gearman Blobslap worker */
+#undef GEARMAND_BLOBSLAP_WORKER
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the `atexit' function. */
+#undef HAVE_ATEXIT
+
+/* Define to 1 if you have the `atomic_add_32' function. */
+#undef HAVE_ATOMIC_ADD_32
+
+/* Define to 1 if you have the `atomic_add_64' function. */
+#undef HAVE_ATOMIC_ADD_64
+
+/* Define to 1 if you have the <atomic.h> header file. */
+#undef HAVE_ATOMIC_H
+
+/* Have clock_gettime */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Support for DrizzleD */
+#undef HAVE_DRIZZLED_BINARY
+
+/* Define this if you have an implementation of drop_privileges() */
+#undef HAVE_DROP_PRIVILEGES
+
+/* Enables DTRACE Support */
+#undef HAVE_DTRACE
+
+/* Define to 1 if you have the `dup2' function. */
+#undef HAVE_DUP2
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <features.h> header file. */
+#undef HAVE_FEATURES_H
+
+/* Define to 1 if you have the `floor' function. */
+#undef HAVE_FLOOR
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#undef HAVE_FNMATCH_H
+
+/* Enables fnv64 hashing support */
+#undef HAVE_FNV64_HASH
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* define if the compiler supports GCC C++ ABI name demangling */
+#undef HAVE_GCC_ABI_DEMANGLE
+
+/* Define to 1 if compiler provides atomic builtins. */
+#undef HAVE_GCC_ATOMIC_BUILTINS
+
+/* If Gearmand binary is available */
+#undef HAVE_GEARMAND_BINARY
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getline' function. */
+#undef HAVE_GETLINE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Enables hsieh hashing support */
+#undef HAVE_HSIEH_HASH
+
+/* Have ntohll */
+#undef HAVE_HTONLL
+
+/* Define to 1 if you have the `inet_ntoa' function. */
+#undef HAVE_INET_NTOA
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if the system has the type `in_port_t'. */
+#undef HAVE_IN_PORT_T
+
+/* Support for libcurl */
+#undef HAVE_LIBCURL
+
+/* Support for libdrizzle */
+#undef HAVE_LIBDRIZZLE
+
+/* Define if event_init is present in event.h. */
+#undef HAVE_LIBEVENT
+
+/* Define to 1 to compile in libgearman support */
+#undef HAVE_LIBGEARMAN
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Enables libmemcached Support */
+#undef HAVE_LIBMEMCACHED
+
+/* Define to 1 if MySQL libraries are available */
+#undef HAVE_LIBMYSQL_BUILD
+
+/* Support for Postgres */
+#undef HAVE_LIBPQ
+
+/* Define to 1 if LIBSASL is found */
+#undef HAVE_LIBSASL
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+#undef HAVE_MACH_MACH_H
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if MCHECK is found */
+#undef HAVE_MCHECK
+
+/* If Memcached binary is available */
+#undef HAVE_MEMCACHED_BINARY
+
+/* If Memcached binary with sasl support is available */
+#undef HAVE_MEMCACHED_SASL_BINARY
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have a MSG_DONTWAIT */
+#undef HAVE_MSG_DONTWAIT
+
+/* Define to 1 if you have a MSG_MORE */
+#undef HAVE_MSG_MORE
+
+/* Define to 1 if you have a MSG_NOSIGNAL */
+#undef HAVE_MSG_NOSIGNAL
+
+/* Enables murmur hashing support */
+#undef HAVE_MURMUR_HASH
+
+/* Define to 1 if MySQL libraries are available */
+#undef HAVE_MYSQL
+
+/* Define to 1 if MySQLD binary is available */
+#undef HAVE_MYSQLD_BUILD
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
+/* Define to 1 if you have the `pipe2' function. */
+#undef HAVE_PIPE2
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define if pthread_timedjoin_np is present in pthread.h. */
+#undef HAVE_PTHREAD_TIMEDJOIN_NP
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#undef HAVE_PTRDIFF_T
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have a working SO_RCVTIMEO */
+#undef HAVE_RCVTIMEO
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `setppriv' function. */
+#undef HAVE_SETPPRIV
+
+/* Define to 1 if you have the `sigignore' function. */
+#undef HAVE_SIGIGNORE
+
+/* Define to 1 if you have a working SO_SNDTIMEO */
+#undef HAVE_SNDTIMEO
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have the <spawn.h> header file. */
+#undef HAVE_SPAWN_H
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if you have the `strtoull' function. */
+#undef HAVE_STRTOULL
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/sdt.h> header file. */
+#undef HAVE_SYS_SDT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#undef HAVE_SYS_SYSCTL_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define this if you have umem.h */
+#undef HAVE_UMEM_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if uuid_generate_time_safe is present in uuid/uuid.h. */
+#undef HAVE_UUID_GENERATE_TIME_SAFE
+
+/* Have uuid/uuid.h */
+#undef HAVE_UUID_UUID_H
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#undef HAVE_VISIBILITY
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#undef HAVE_WS2TCPIP_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* CPU of Build System */
+#undef HOST_CPU
+
+/* OS of Build System */
+#undef HOST_OS
+
+/* Whether we are building for FreeBSD */
+#undef HOST_OS_FREEBSD
+
+/* Whether we build for Linux */
+#undef HOST_OS_LINUX
+
+/* Whether we are building for Solaris */
+#undef HOST_OS_SOLARIS
+
+/* Whether we are building for Windows */
+#undef HOST_OS_WINDOWS
+
+/* Vendor of Build System */
+#undef HOST_VENDOR
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of the memcached binary used in make test */
+#undef MEMCACHED_BINARY
+
+/* Memcached binary version */
+#undef MEMCACHED_VERSION
+
+/* Name of the mysqld binary used in make test */
+#undef MYSQLD_BINARY
+
+/* Define to 1 to disable assert'ing code. */
+#undef NDEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Define to true if you want to use functions from atomic.h */
+#undef USE_ATOMIC_H
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define if the code was built from VCS. */
+#undef VCS_CHECKOUT
+
+/* VCS system */
+#undef VCS_SYSTEM
+
+/* Version number of package */
+#undef VERSION
+
+/* machine is big-endian */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* Workaround for bug in FreeBSD headers */
+#undef __APPLE_CC__
+
+/* Use STDC Limit Macros in C++ */
+#undef __STDC_LIMIT_MACROS
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int16_t
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int32_t
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int64_t
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
+#undef int8_t
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef ssize_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint8_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
+
+
+#ifndef HAVE_SYS_SOCKET_H
+# define SHUT_RD SD_RECEIVE
+# define SHUT_WR SD_SEND
+# define SHUT_RDWR SD_BOTH
+#endif
+          
+
+
+
+#ifndef __STDC_FORMAT_MACROS
+#  define __STDC_FORMAT_MACROS
+#endif
+ 
+#if defined(__cplusplus) 
+#  include CINTTYPES_H 
+#else 
+#  include <inttypes.h> 
+#endif
+
+#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
+# define HAVE_ULONG 1
+typedef unsigned long int ulong;
+#endif 
+
+
@@ -1,8 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-noinst_HEADERS+= poll/poll.h
-
-if BUILD_POLL
-libmemcached_libmemcached_la_SOURCES += poll/poll.c
-endif
@@ -1,77 +0,0 @@
-/* LibMemcached
- * 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 "config.h"
-#include <sys/time.h>
-#include <strings.h>
-
-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;
-}
@@ -1,45 +0,0 @@
-/* LibMemcached
- * 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
- *
- */
-#ifndef POLL_POLL_H
-#define POLL_POLL_H 1
-
-#ifdef WIN32
-#include <winsock2.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct pollfd
-{
-#ifdef 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
-
-int poll(struct pollfd fds[], nfds_t nfds, int tmo);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
@@ -0,0 +1,52 @@
+# vim:ft=automake
+
+RPM_BUILDDIR= ~/rpmbuild
+
+RPM_BUILD_TARGET= @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPM_SOURCE= $(RPM_BUILDDIR)/SOURCES/$(DIST_ARCHIVES)
+
+RPMS=
+RPMS+= $(RPM_BUILD_TARGET)
+RPMS+= @PACKAGE@-devel-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+RPMS+= @PACKAGE@-debuginfo-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm
+
+SRPMS= @PACKAGE@-@VERSION@-@RPM_RELEASE@.src.rpm
+
+RPM_DIST= $(RPMS) $(SRPMS)
+
+BUILD_RPMS= $(foreach rpm_iterator,$(RPMS),$(addprefix $(RPM_BUILDDIR)/RPMS/@build_cpu@/, $(rpm_iterator)))
+BUILD_SRPMS= $(foreach srpm_iterator,$(SRPMS),$(addprefix $(RPM_BUILDDIR)/SRPMS/, $(srpm_iterator)))
+BUILD_RPM_DIR= $(RPM_BUILDDIR)/BUILD/@PACKAGE@-@VERSION@
+
+$(RPM_BUILDDIR):
+	@@RPMDEV_SETUPTREE@
+
+$(DIST_ARCHIVES): $(DISTFILES)
+	$(MAKE) $(AM_MAKEFLAGS) dist-gzip
+
+$(RPM_SOURCE): | $(RPM_BUILDDIR) $(DIST_ARCHIVES)
+	@rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_DIR)
+	@cp $(DIST_ARCHIVES) $(RPM_SOURCE)
+
+$(RPM_BUILD_TARGET): $(RPM_SOURCE) support/@PACKAGE@.spec
+	@@RPMBUILD@ -ba $(top_srcdir)/support/@PACKAGE@.spec
+	@cp $(BUILD_RPMS) $(BUILD_SRPMS) .
+
+.PHONY: rpm-sign
+rpm-sign: $(RPM_BUILD_TARGET)
+	@@RPM@ --addsign $(RPM_DIST)
+	@@RPM@ --checksig $(RPM_DIST)
+
+.PHONY: clean-rpm
+clean-rpm:
+	-@rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_SOURCE) $(BUILD_RPM_DIR) $(RPM_DIST)
+
+rpm: $(RPM_BUILD_TARGET)
+dist-rpm: $(RPM_BUILD_TARGET)
+
+.PHONY: release
+release: rpm rpm-sign
+
+.PHONY: auto-rpmbuild
+auto-rpmbuild: support/@PACKAGE@.spec
+	@auto-br-rpmbuild -ba $(top_srcdir)/support/@PACKAGE@.spec
@@ -2,10 +2,8 @@
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-EXTRA_DIST+= \
-	     support/libmemcached.spec \
-	     support/libmemcached-fc.spec.in \
-	     support/set_benchmark.sh 
+EXTRA_DIST+= support/libmemcached.spec
+EXTRA_DIST+= support/set_benchmark.sh 
 
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = support/libmemcached.pc
+pkgconfigdir= $(libdir)/pkgconfig
+pkgconfig_DATA= support/libmemcached.pc
@@ -1,105 +0,0 @@
-Name:      libmemcached
-Summary:   memcached C library and command line tools
-Version: @VERSION@
-Release:   1%{?dist}
-License:   BSD
-Group:     System Environment/Libraries
-URL:       http://libmemcached.org/
-Source0:   http://download.tangent.org/libmemcached-%{version}.tar.gz
-
-# For test suite
-BuildRequires: memcached
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-
-%description
-libmemcached is a C client library to the memcached server
-(http://danga.com/memcached). It has been designed to be light on memory
-usage, and provide full access to server side methods.
-
-It also implements several command line tools:
-
-memcat - Copy the value of a key to standard output.
-memflush - Flush the contents of your servers.
-memrm - Remove a key(s) from the serrver.
-memstat - Dump the stats of your servers to standard output.
-memslap - Generate testing loads on a memcached cluster.
-memcp - Copy files to memcached servers.
-memerror - Creates human readable messages from libmemecached error codes.
-
-
-%package devel
-Summary: Header files and development libraries for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-This package contains the header files and development libraries
-for %{name}. If you like to develop programs using %{name}, 
-you will need to install %{name}-devel.
-
-
-%prep
-%setup -q
-
-%{__mkdir} examples
-%{__cp} tests/*.{c,cpp,h} examples/
-
-
-%build
-%configure
-%{__make} %{_smp_mflags}
-
-
-%install
-%{__rm} -rf %{buildroot}
-%{__make} install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
-
-
-%check
-# test suite cannot run in mock (same port use for memcache server on all arch)
-# 1 test seems to fail.. 
-#%{__make} test
-
-
-%clean
-%{__rm} -rf %{buildroot}
-
-
-%post -p /sbin/ldconfig
-
-
-%postun -p /sbin/ldconfig
- 
-
-%files
-%defattr (-,root,root,-) 
-%doc AUTHORS COPYING NEWS README THANKS TODO
-%{_bindir}/mem*
-%exclude %{_libdir}/libmemcached.a
-%exclude %{_libdir}/libmemcached.la
-%exclude %{_libdir}/libmemcachedutil.a
-%exclude %{_libdir}/libmemcachedutil.la
-%{_libdir}/libmemcached.so.*
-%{_libdir}/libmemcachedutil.so.*
-%{_mandir}/man1/mem*
-
-
-%files devel
-%defattr (-,root,root,-) 
-%doc examples
-%{_includedir}/libmemcached
-%{_libdir}/libmemcached.so
-%{_libdir}/libmemcachedutil.so
-%{_libdir}/pkgconfig/libmemcached.pc
-%{_mandir}/man3/libmemcached*.3.gz
-%{_mandir}/man3/memcached_*.3.gz
-
-
-%changelog
-* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1
-- Initial RPM from Brian Aker spec
-- create -devel subpackage
-- add %%post %%postun %%check section
-
@@ -4,7 +4,8 @@ libdir=@libdir@
 includedir=@includedir@
 
 Name: libmemcached
-Description: libmemcached C library.
+URL: http://libmemcachd.org/
+Description: libmemcached C/C++ library.
 Version: @VERSION@
-Libs: -L${libdir} -lmemcached
+Libs: -L${libdir} -lmemcached -lmemcachedutil
 Cflags: -I${includedir}
@@ -0,0 +1,344 @@
+Name:      libmemcached
+Summary:   memcached C library and command line tools
+Version:   1.0.18
+Release:   1
+License:   BSD
+Group:     System Environment/Libraries
+URL:       http://launchpad.net/libmemcached
+Source0:   http://download.tangent.org/libmemcached-%{version}.tar.gz
+
+# For test suite
+BuildRequires: bash
+BuildRequires: binutils
+BuildRequires: coreutils
+BuildRequires: cpio
+BuildRequires: cyrus-sasl-devel
+BuildRequires: diffutils
+BuildRequires: elfutils
+BuildRequires: file
+BuildRequires: findutils
+BuildRequires: gawk
+BuildRequires: gcc
+BuildRequires: glibc
+BuildRequires: glibc-common
+BuildRequires: glibc-devel
+BuildRequires: glibc-headers
+BuildRequires: grep
+BuildRequires: gzip
+BuildRequires: libevent-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libuuid-devel
+BuildRequires: make
+BuildRequires: memcached
+BuildRequires: pkgconfig
+BuildRequires: python-sphinx
+BuildRequires: sed
+BuildRequires: tar
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+
+%description
+libmemcached, http://libmemcached.org/, is a C client library to the memcached server
+(http://danga.com/memcached). It has been designed to be light on memory
+usage, and provide full access to server side methods.
+
+It also implements several command line tools:
+
+memcat - Copy the value of a key to standard output.
+memflush - Flush the contents of your servers.
+memrm - Remove a key(s) from the serrver.
+memstat - Dump the stats of your servers to standard output.
+memslap - Generate testing loads on a memcached cluster.
+memcp - Copy files to memcached servers.
+memerror - Creates human readable messages from libmemecached error codes.
+memcapable - Verify a memcached server for protocol behavior.
+memexist - Check for the existance of a key.
+memtouch - Update the expiration value of a key.
+
+
+%package devel
+Summary: Header files and development libraries for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains the header files and development libraries
+for %{name}. If you like to develop programs using %{name}, 
+you will need to install %{name}-devel.
+
+
+%prep
+%setup -q
+
+%{__mkdir} examples
+
+%build
+%configure
+%{__make} %{?_smp_mflags}
+
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} install  DESTDIR="%{buildroot}" AM_INSTALL_PROGRAM_FLAGS=""
+
+
+%check
+# test suite cannot run in mock (same port use for memcache server on all arch)
+# 1 test seems to fail.. 
+# %{__make} check
+
+
+%clean
+%{__rm} -rf %{buildroot}
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
+ 
+
+%files
+%defattr (-,root,root,-) 
+%doc AUTHORS COPYING NEWS README THANKS TODO
+%{_bindir}/mem*
+%exclude %{_libdir}/libmemcached.la
+%exclude %{_libdir}/libhashkit.la
+%exclude %{_libdir}/libmemcachedutil.la
+%exclude %{_libdir}/libmemcached.a
+%exclude %{_libdir}/libhashkit.a
+%exclude %{_libdir}/libmemcachedutil.a
+%{_libdir}/libhashkit.so.2.0.0
+%{_libdir}/libmemcached.so.11.0.0
+%{_libdir}/libmemcachedutil.so.2.0.0
+%{_libdir}/libhashkit.so.2
+%{_libdir}/libmemcached.so.11
+%{_libdir}/libmemcachedutil.so.2
+%{_mandir}/man1/memaslap.1.gz
+%{_mandir}/man1/memcapable.1.gz
+%{_mandir}/man1/memcat.1.gz
+%{_mandir}/man1/memcp.1.gz
+%{_mandir}/man1/memdump.1.gz
+%{_mandir}/man1/memerror.1.gz
+%{_mandir}/man1/memexist.1.gz
+%{_mandir}/man1/memflush.1.gz
+%{_mandir}/man1/memparse.1.gz
+%{_mandir}/man1/memping.1.gz
+%{_mandir}/man1/memrm.1.gz
+%{_mandir}/man1/memslap.1.gz
+%{_mandir}/man1/memstat.1.gz
+%{_mandir}/man1/memtouch.1.gz
+
+
+%files devel
+%defattr (-,root,root,-) 
+%doc examples
+%{_datadir}/aclocal/ax_libmemcached.m4
+%{_includedir}/libhashkit/hashkit.h
+%{_includedir}/libhashkit-1.0/algorithm.h
+%{_includedir}/libhashkit-1.0/behavior.h
+%{_includedir}/libhashkit-1.0/configure.h
+%{_includedir}/libhashkit-1.0/digest.h
+%{_includedir}/libhashkit-1.0/function.h
+%{_includedir}/libhashkit-1.0/has.h
+%{_includedir}/libhashkit-1.0/hashkit.h
+%{_includedir}/libhashkit-1.0/hashkit.hpp
+%{_includedir}/libhashkit-1.0/str_algorithm.h
+%{_includedir}/libhashkit-1.0/strerror.h
+%{_includedir}/libhashkit-1.0/types.h
+%{_includedir}/libhashkit-1.0/visibility.h
+
+%{_includedir}/libmemcachedutil-1.0/util.h
+%{_includedir}/libmemcachedutil-1.0/flush.h
+%{_includedir}/libmemcachedutil-1.0/pid.h
+%{_includedir}/libmemcachedutil-1.0/ping.h
+%{_includedir}/libmemcachedutil-1.0/ostream.hpp
+%{_includedir}/libmemcachedutil-1.0/pool.h
+%{_includedir}/libmemcachedutil-1.0/version.h
+
+%{_includedir}/libmemcached/memcached.h
+%{_includedir}/libmemcached/memcached.hpp
+%{_includedir}/libmemcached/util.h
+
+%{_includedir}/libmemcached-1.0/alloc.h
+%{_includedir}/libmemcached-1.0/allocators.h
+%{_includedir}/libmemcached-1.0/analyze.h
+%{_includedir}/libmemcached-1.0/auto.h
+%{_includedir}/libmemcached-1.0/basic_string.h
+%{_includedir}/libmemcached-1.0/behavior.h
+%{_includedir}/libmemcached-1.0/callback.h
+%{_includedir}/libmemcached-1.0/callbacks.h
+%{_includedir}/libmemcached-1.0/configure.h
+%{_includedir}/libmemcached-1.0/defaults.h
+%{_includedir}/libmemcached-1.0/delete.h
+%{_includedir}/libmemcached-1.0/deprecated_types.h
+%{_includedir}/libmemcached-1.0/dump.h
+%{_includedir}/libmemcached-1.0/error.h
+%{_includedir}/libmemcached-1.0/exception.hpp
+%{_includedir}/libmemcached-1.0/exist.h
+%{_includedir}/libmemcached-1.0/fetch.h
+%{_includedir}/libmemcached-1.0/flush.h
+%{_includedir}/libmemcached-1.0/flush_buffers.h
+%{_includedir}/libmemcached-1.0/get.h
+%{_includedir}/libmemcached-1.0/hash.h
+%{_includedir}/libmemcached-1.0/limits.h
+%{_includedir}/libmemcached-1.0/memcached.h
+%{_includedir}/libmemcached-1.0/memcached.hpp
+%{_includedir}/libmemcached-1.0/options.h
+%{_includedir}/libmemcached-1.0/parse.h
+%{_includedir}/libmemcached-1.0/platform.h
+%{_includedir}/libmemcached-1.0/quit.h
+%{_includedir}/libmemcached-1.0/result.h
+%{_includedir}/libmemcached-1.0/return.h
+%{_includedir}/libmemcached-1.0/sasl.h
+%{_includedir}/libmemcached-1.0/server.h
+%{_includedir}/libmemcached-1.0/server_list.h
+%{_includedir}/libmemcached-1.0/stats.h
+%{_includedir}/libmemcached-1.0/storage.h
+%{_includedir}/libmemcached-1.0/strerror.h
+%{_includedir}/libmemcached-1.0/struct/allocator.h
+%{_includedir}/libmemcached-1.0/struct/analysis.h
+%{_includedir}/libmemcached-1.0/struct/callback.h
+%{_includedir}/libmemcached-1.0/struct/memcached.h
+%{_includedir}/libmemcached-1.0/struct/result.h
+%{_includedir}/libmemcached-1.0/struct/sasl.h
+%{_includedir}/libmemcached-1.0/struct/server.h
+%{_includedir}/libmemcached-1.0/struct/stat.h
+%{_includedir}/libmemcached-1.0/struct/string.h
+%{_includedir}/libmemcached-1.0/touch.h
+%{_includedir}/libmemcached-1.0/triggers.h
+%{_includedir}/libmemcached-1.0/types.h
+%{_includedir}/libmemcached-1.0/types/behavior.h
+%{_includedir}/libmemcached-1.0/types/callback.h
+%{_includedir}/libmemcached-1.0/types/connection.h
+%{_includedir}/libmemcached-1.0/types/hash.h
+%{_includedir}/libmemcached-1.0/types/return.h
+%{_includedir}/libmemcached-1.0/types/server_distribution.h
+%{_includedir}/libmemcached-1.0/verbosity.h
+%{_includedir}/libmemcached-1.0/version.h
+%{_includedir}/libmemcached-1.0/visibility.h
+%{_includedir}/libhashkit-1.0/string.h
+%{_includedir}/libmemcached-1.0/encoding_key.h
+
+%{_libdir}/libhashkit.so
+%{_libdir}/libmemcached.so
+%{_libdir}/libmemcachedutil.so
+%{_libdir}/pkgconfig/libmemcached.pc
+%{_mandir}/man3/hashkit_clone.3.gz
+%{_mandir}/man3/hashkit_crc32.3.gz
+%{_mandir}/man3/hashkit_create.3.gz
+%{_mandir}/man3/hashkit_fnv1_32.3.gz
+%{_mandir}/man3/hashkit_fnv1_64.3.gz
+%{_mandir}/man3/hashkit_fnv1a_32.3.gz
+%{_mandir}/man3/hashkit_fnv1a_64.3.gz
+%{_mandir}/man3/hashkit_free.3.gz
+%{_mandir}/man3/hashkit_functions.3.gz
+%{_mandir}/man3/hashkit_hsieh.3.gz
+%{_mandir}/man3/hashkit_is_allocated.3.gz
+%{_mandir}/man3/hashkit_jenkins.3.gz
+%{_mandir}/man3/hashkit_md5.3.gz
+%{_mandir}/man3/hashkit_murmur.3.gz
+%{_mandir}/man3/hashkit_value.3.gz
+%{_mandir}/man3/libhashkit.3.gz
+%{_mandir}/man3/libmemcached.3.gz
+%{_mandir}/man3/libmemcached_check_configuration.3.gz
+%{_mandir}/man3/libmemcached_configuration.3.gz
+%{_mandir}/man3/libmemcached_examples.3.gz
+%{_mandir}/man3/libmemcachedutil.3.gz
+%{_mandir}/man3/memcached.3.gz
+%{_mandir}/man3/memcached_add.3.gz
+%{_mandir}/man3/memcached_add_by_key.3.gz
+%{_mandir}/man3/memcached_analyze.3.gz
+%{_mandir}/man3/memcached_append.3.gz
+%{_mandir}/man3/memcached_append_by_key.3.gz
+%{_mandir}/man3/memcached_behavior_get.3.gz
+%{_mandir}/man3/memcached_behavior_set.3.gz
+%{_mandir}/man3/memcached_callback_get.3.gz
+%{_mandir}/man3/memcached_callback_set.3.gz
+%{_mandir}/man3/memcached_cas.3.gz
+%{_mandir}/man3/memcached_cas_by_key.3.gz
+%{_mandir}/man3/memcached_clone.3.gz
+%{_mandir}/man3/memcached_create.3.gz
+%{_mandir}/man3/memcached_decrement.3.gz
+%{_mandir}/man3/memcached_decrement_with_initial.3.gz
+%{_mandir}/man3/memcached_delete.3.gz
+%{_mandir}/man3/memcached_delete_by_key.3.gz
+%{_mandir}/man3/memcached_destroy_sasl_auth_data.3.gz
+%{_mandir}/man3/memcached_dump.3.gz
+%{_mandir}/man3/memcached_fetch.3.gz
+%{_mandir}/man3/memcached_fetch_execute.3.gz
+%{_mandir}/man3/memcached_fetch_result.3.gz
+%{_mandir}/man3/memcached_flush_buffers.3.gz
+%{_mandir}/man3/memcached_free.3.gz
+%{_mandir}/man3/memcached_generate_hash.3.gz
+%{_mandir}/man3/memcached_generate_hash_value.3.gz
+%{_mandir}/man3/memcached_get.3.gz
+%{_mandir}/man3/memcached_get_by_key.3.gz
+%{_mandir}/man3/memcached_get_memory_allocators.3.gz
+%{_mandir}/man3/memcached_get_sasl_callbacks.3.gz
+%{_mandir}/man3/memcached_get_user_data.3.gz
+%{_mandir}/man3/memcached_increment.3.gz
+%{_mandir}/man3/memcached_increment_with_initial.3.gz
+%{_mandir}/man3/memcached_lib_version.3.gz
+%{_mandir}/man3/memcached_mget.3.gz
+%{_mandir}/man3/memcached_mget_by_key.3.gz
+%{_mandir}/man3/memcached_mget_execute.3.gz
+%{_mandir}/man3/memcached_mget_execute_by_key.3.gz
+%{_mandir}/man3/memcached_pool_behavior_get.3.gz
+%{_mandir}/man3/memcached_pool_behavior_set.3.gz
+%{_mandir}/man3/memcached_pool_create.3.gz
+%{_mandir}/man3/memcached_pool_destroy.3.gz
+%{_mandir}/man3/memcached_pool_pop.3.gz
+%{_mandir}/man3/memcached_pool_push.3.gz
+%{_mandir}/man3/memcached_pool_fetch.3.gz
+%{_mandir}/man3/memcached_pool_release.3.gz
+%{_mandir}/man3/memcached_pool_st.3.gz
+%{_mandir}/man3/memcached_pool.3.gz
+%{_mandir}/man3/memcached_prepend.3.gz
+%{_mandir}/man3/memcached_prepend_by_key.3.gz
+%{_mandir}/man3/memcached_quit.3.gz
+%{_mandir}/man3/memcached_replace.3.gz
+%{_mandir}/man3/memcached_replace_by_key.3.gz
+%{_mandir}/man3/memcached_sasl_set_auth_data.3.gz
+%{_mandir}/man3/memcached_server_add.3.gz
+%{_mandir}/man3/memcached_server_count.3.gz
+%{_mandir}/man3/memcached_server_cursor.3.gz
+%{_mandir}/man3/memcached_server_list.3.gz
+%{_mandir}/man3/memcached_server_list_append.3.gz
+%{_mandir}/man3/memcached_server_list_count.3.gz
+%{_mandir}/man3/memcached_server_list_free.3.gz
+%{_mandir}/man3/memcached_server_push.3.gz
+%{_mandir}/man3/memcached_servers_parse.3.gz
+%{_mandir}/man3/memcached_set.3.gz
+%{_mandir}/man3/memcached_set_by_key.3.gz
+%{_mandir}/man3/memcached_set_memory_allocators.3.gz
+%{_mandir}/man3/memcached_set_sasl_callbacks.3.gz
+%{_mandir}/man3/memcached_set_user_data.3.gz
+%{_mandir}/man3/memcached_stat.3.gz
+%{_mandir}/man3/memcached_stat_execute.3.gz
+%{_mandir}/man3/memcached_stat_get_keys.3.gz
+%{_mandir}/man3/memcached_last_error_message.3.gz
+%{_mandir}/man3/memcached_stat_get_value.3.gz
+%{_mandir}/man3/memcached_stat_servername.3.gz
+%{_mandir}/man3/memcached_strerror.3.gz
+%{_mandir}/man3/memcached_exist.3.gz
+%{_mandir}/man3/memcached_exist_by_key.3.gz
+%{_mandir}/man3/memcached_touch.3.gz
+%{_mandir}/man3/memcached_touch_by_key.3.gz
+%{_mandir}/man3/memcached_verbosity.3.gz
+%{_mandir}/man3/memcached_version.3.gz
+
+
+
+%changelog
+* Tue May  22 2012 Brian Aker <brian@tangent.org> - 1.0.8
+
+* Fri Jan  8 2010 Brian Aker <brian@tangent.org> - 0.37
+- Modified to be explicit in install include files. 
+
+* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28
+- Initial RPM from Brian Aker spec
+- create -devel subpackage
+- add %%post %%postun %%check section
+
@@ -1,20 +1,45 @@
 Name:      libmemcached
 Summary:   memcached C library and command line tools
-Version: @VERSION@
-Release:   1
+Version:   @VERSION@
+Release:   @RPM_RELEASE@
 License:   BSD
 Group:     System Environment/Libraries
 URL:       http://launchpad.net/libmemcached
 Source0:   http://download.tangent.org/libmemcached-%{version}.tar.gz
 
 # For test suite
+BuildRequires: bash
+BuildRequires: binutils
+BuildRequires: coreutils
+BuildRequires: cpio
+BuildRequires: cyrus-sasl-devel
+BuildRequires: diffutils
+BuildRequires: elfutils
+BuildRequires: file
+BuildRequires: findutils
+BuildRequires: gawk
+BuildRequires: gcc
+BuildRequires: glibc
+BuildRequires: glibc-common
+BuildRequires: glibc-devel
+BuildRequires: glibc-headers
+BuildRequires: grep
+BuildRequires: gzip
+BuildRequires: libevent-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libuuid-devel
+BuildRequires: make
 BuildRequires: memcached
+BuildRequires: pkgconfig
+BuildRequires: python-sphinx
+BuildRequires: sed
+BuildRequires: tar
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 
 %description
-libmemcached is a C client library to the memcached server
+libmemcached, http://libmemcached.org/, is a C client library to the memcached server
 (http://danga.com/memcached). It has been designed to be light on memory
 usage, and provide full access to server side methods.
 
@@ -28,6 +53,8 @@ memslap - Generate testing loads on a memcached cluster.
 memcp - Copy files to memcached servers.
 memerror - Creates human readable messages from libmemecached error codes.
 memcapable - Verify a memcached server for protocol behavior.
+memexist - Check for the existance of a key.
+memtouch - Update the expiration value of a key.
 
 
 %package devel
@@ -45,12 +72,10 @@ you will need to install %{name}-devel.
 %setup -q
 
 %{__mkdir} examples
-%{__cp} tests/*.{c,cpp,h} examples/
-
 
 %build
 %configure
-%{__make} %{_smp_mflags}
+%{__make} %{?_smp_mflags}
 
 
 %install
@@ -61,7 +86,7 @@ you will need to install %{name}-devel.
 %check
 # test suite cannot run in mock (same port use for memcache server on all arch)
 # 1 test seems to fail.. 
-#%{__make} test
+# %{__make} check
 
 
 %clean
@@ -81,83 +106,123 @@ you will need to install %{name}-devel.
 %exclude %{_libdir}/libmemcached.la
 %exclude %{_libdir}/libhashkit.la
 %exclude %{_libdir}/libmemcachedutil.la
-%exclude %{_libdir}/libmemcachedprotocol.la
-%{_libdir}/libhashkit.so.0.0.0
-%{_libdir}/libmemcached.so.6.0.0
-%{_libdir}/libmemcachedutil.so.1.0.0
-%{_libdir}/libmemcachedprotocol.so.0.0.0
-%{_libdir}/libhashkit.so.0
-%{_libdir}/libmemcached.so.6
-%{_libdir}/libmemcachedprotocol.so.0
-%{_libdir}/libmemcachedutil.so.1
+%exclude %{_libdir}/libmemcached.a
+%exclude %{_libdir}/libhashkit.a
+%exclude %{_libdir}/libmemcachedutil.a
+%{_libdir}/libhashkit.so.2.0.0
+%{_libdir}/libmemcached.so.11.0.0
+%{_libdir}/libmemcachedutil.so.2.0.0
+%{_libdir}/libhashkit.so.2
+%{_libdir}/libmemcached.so.11
+%{_libdir}/libmemcachedutil.so.2
+%{_mandir}/man1/memaslap.1.gz
 %{_mandir}/man1/memcapable.1.gz
 %{_mandir}/man1/memcat.1.gz
 %{_mandir}/man1/memcp.1.gz
 %{_mandir}/man1/memdump.1.gz
 %{_mandir}/man1/memerror.1.gz
+%{_mandir}/man1/memexist.1.gz
 %{_mandir}/man1/memflush.1.gz
+%{_mandir}/man1/memparse.1.gz
+%{_mandir}/man1/memping.1.gz
 %{_mandir}/man1/memrm.1.gz
 %{_mandir}/man1/memslap.1.gz
 %{_mandir}/man1/memstat.1.gz
+%{_mandir}/man1/memtouch.1.gz
 
 
 %files devel
 %defattr (-,root,root,-) 
 %doc examples
-%{_includedir}/libmemcached/allocators.h
-%{_includedir}/libmemcached/delete.h
-%{_includedir}/libmemcached/fetch.h
-%{_includedir}/libmemcached/flush.h
-%{_includedir}/libhashkit/algorithm.h
-%{_includedir}/libhashkit/behavior.h
-%{_includedir}/libhashkit/configure.h
-%{_includedir}/libhashkit/digest.h
-%{_includedir}/libhashkit/function.h
+%{_datadir}/aclocal/ax_libmemcached.m4
 %{_includedir}/libhashkit/hashkit.h
-%{_includedir}/libhashkit/strerror.h
-%{_includedir}/libhashkit/types.h
-%{_includedir}/libhashkit/visibility.h
-%{_includedir}/libmemcached/analyze.h
-%{_includedir}/libmemcached/auto.h
-%{_includedir}/libmemcached/behavior.h
-%{_includedir}/libmemcached/callback.h
-%{_includedir}/libmemcached/configure.h
-%{_includedir}/libmemcached/constants.h
-%{_includedir}/libmemcached/dump.h
-%{_includedir}/libmemcached/exception.hpp
-%{_includedir}/libmemcached/flush_buffers.h
-%{_includedir}/libmemcached/get.h
-%{_includedir}/libmemcached/hash.h
+%{_includedir}/libhashkit-1.0/algorithm.h
+%{_includedir}/libhashkit-1.0/behavior.h
+%{_includedir}/libhashkit-1.0/configure.h
+%{_includedir}/libhashkit-1.0/digest.h
+%{_includedir}/libhashkit-1.0/function.h
+%{_includedir}/libhashkit-1.0/has.h
+%{_includedir}/libhashkit-1.0/hashkit.h
+%{_includedir}/libhashkit-1.0/hashkit.hpp
+%{_includedir}/libhashkit-1.0/str_algorithm.h
+%{_includedir}/libhashkit-1.0/strerror.h
+%{_includedir}/libhashkit-1.0/types.h
+%{_includedir}/libhashkit-1.0/visibility.h
+
+%{_includedir}/libmemcachedutil-1.0/util.h
+%{_includedir}/libmemcachedutil-1.0/flush.h
+%{_includedir}/libmemcachedutil-1.0/pid.h
+%{_includedir}/libmemcachedutil-1.0/ping.h
+%{_includedir}/libmemcachedutil-1.0/ostream.hpp
+%{_includedir}/libmemcachedutil-1.0/pool.h
+%{_includedir}/libmemcachedutil-1.0/version.h
+
 %{_includedir}/libmemcached/memcached.h
 %{_includedir}/libmemcached/memcached.hpp
-%{_includedir}/libmemcached/memcached_util.h
-%{_includedir}/libmemcached/parse.h
-%{_includedir}/libmemcached/platform.h
-%{_includedir}/libmemcached/protocol/cache.h
-%{_includedir}/libmemcached/protocol/callback.h
-%{_includedir}/libmemcached/protocol_handler.h
-%{_includedir}/libmemcached/quit.h
-%{_includedir}/libmemcached/result.h
-%{_includedir}/libmemcached/sasl.h
-%{_includedir}/libmemcached/server.h
-%{_includedir}/libmemcached/server_list.h
-%{_includedir}/libmemcached/stats.h
-%{_includedir}/libmemcached/storage.h
-%{_includedir}/libmemcached/strerror.h
-%{_includedir}/libmemcached/string.h
-%{_includedir}/libmemcached/types.h
 %{_includedir}/libmemcached/util.h
-%{_includedir}/libmemcached/util/ping.h
-%{_includedir}/libmemcached/util/pool.h
-%{_includedir}/libmemcached/util/version.h
-%{_includedir}/libmemcached/verbosity.h
-%{_includedir}/libmemcached/version.h
-%{_includedir}/libmemcached/visibility.h
-%{_includedir}/libmemcached/watchpoint.h
-%{_includedir}/libmemcached/memcached/protocol_binary.h
+
+%{_includedir}/libmemcached-1.0/alloc.h
+%{_includedir}/libmemcached-1.0/allocators.h
+%{_includedir}/libmemcached-1.0/analyze.h
+%{_includedir}/libmemcached-1.0/auto.h
+%{_includedir}/libmemcached-1.0/basic_string.h
+%{_includedir}/libmemcached-1.0/behavior.h
+%{_includedir}/libmemcached-1.0/callback.h
+%{_includedir}/libmemcached-1.0/callbacks.h
+%{_includedir}/libmemcached-1.0/configure.h
+%{_includedir}/libmemcached-1.0/defaults.h
+%{_includedir}/libmemcached-1.0/delete.h
+%{_includedir}/libmemcached-1.0/deprecated_types.h
+%{_includedir}/libmemcached-1.0/dump.h
+%{_includedir}/libmemcached-1.0/error.h
+%{_includedir}/libmemcached-1.0/exception.hpp
+%{_includedir}/libmemcached-1.0/exist.h
+%{_includedir}/libmemcached-1.0/fetch.h
+%{_includedir}/libmemcached-1.0/flush.h
+%{_includedir}/libmemcached-1.0/flush_buffers.h
+%{_includedir}/libmemcached-1.0/get.h
+%{_includedir}/libmemcached-1.0/hash.h
+%{_includedir}/libmemcached-1.0/limits.h
+%{_includedir}/libmemcached-1.0/memcached.h
+%{_includedir}/libmemcached-1.0/memcached.hpp
+%{_includedir}/libmemcached-1.0/options.h
+%{_includedir}/libmemcached-1.0/parse.h
+%{_includedir}/libmemcached-1.0/platform.h
+%{_includedir}/libmemcached-1.0/quit.h
+%{_includedir}/libmemcached-1.0/result.h
+%{_includedir}/libmemcached-1.0/return.h
+%{_includedir}/libmemcached-1.0/sasl.h
+%{_includedir}/libmemcached-1.0/server.h
+%{_includedir}/libmemcached-1.0/server_list.h
+%{_includedir}/libmemcached-1.0/stats.h
+%{_includedir}/libmemcached-1.0/storage.h
+%{_includedir}/libmemcached-1.0/strerror.h
+%{_includedir}/libmemcached-1.0/struct/allocator.h
+%{_includedir}/libmemcached-1.0/struct/analysis.h
+%{_includedir}/libmemcached-1.0/struct/callback.h
+%{_includedir}/libmemcached-1.0/struct/memcached.h
+%{_includedir}/libmemcached-1.0/struct/result.h
+%{_includedir}/libmemcached-1.0/struct/sasl.h
+%{_includedir}/libmemcached-1.0/struct/server.h
+%{_includedir}/libmemcached-1.0/struct/stat.h
+%{_includedir}/libmemcached-1.0/struct/string.h
+%{_includedir}/libmemcached-1.0/touch.h
+%{_includedir}/libmemcached-1.0/triggers.h
+%{_includedir}/libmemcached-1.0/types.h
+%{_includedir}/libmemcached-1.0/types/behavior.h
+%{_includedir}/libmemcached-1.0/types/callback.h
+%{_includedir}/libmemcached-1.0/types/connection.h
+%{_includedir}/libmemcached-1.0/types/hash.h
+%{_includedir}/libmemcached-1.0/types/return.h
+%{_includedir}/libmemcached-1.0/types/server_distribution.h
+%{_includedir}/libmemcached-1.0/verbosity.h
+%{_includedir}/libmemcached-1.0/version.h
+%{_includedir}/libmemcached-1.0/visibility.h
+%{_includedir}/libhashkit-1.0/string.h
+%{_includedir}/libmemcached-1.0/encoding_key.h
+
 %{_libdir}/libhashkit.so
 %{_libdir}/libmemcached.so
-%{_libdir}/libmemcachedprotocol.so
 %{_libdir}/libmemcachedutil.so
 %{_libdir}/pkgconfig/libmemcached.pc
 %{_mandir}/man3/hashkit_clone.3.gz
@@ -175,9 +240,13 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/hashkit_md5.3.gz
 %{_mandir}/man3/hashkit_murmur.3.gz
 %{_mandir}/man3/hashkit_value.3.gz
+%{_mandir}/man3/libhashkit.3.gz
 %{_mandir}/man3/libmemcached.3.gz
+%{_mandir}/man3/libmemcached_check_configuration.3.gz
+%{_mandir}/man3/libmemcached_configuration.3.gz
 %{_mandir}/man3/libmemcached_examples.3.gz
 %{_mandir}/man3/libmemcachedutil.3.gz
+%{_mandir}/man3/memcached.3.gz
 %{_mandir}/man3/memcached_add.3.gz
 %{_mandir}/man3/memcached_add_by_key.3.gz
 %{_mandir}/man3/memcached_analyze.3.gz
@@ -202,6 +271,7 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/memcached_fetch_result.3.gz
 %{_mandir}/man3/memcached_flush_buffers.3.gz
 %{_mandir}/man3/memcached_free.3.gz
+%{_mandir}/man3/memcached_generate_hash.3.gz
 %{_mandir}/man3/memcached_generate_hash_value.3.gz
 %{_mandir}/man3/memcached_get.3.gz
 %{_mandir}/man3/memcached_get_by_key.3.gz
@@ -221,6 +291,10 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/memcached_pool_destroy.3.gz
 %{_mandir}/man3/memcached_pool_pop.3.gz
 %{_mandir}/man3/memcached_pool_push.3.gz
+%{_mandir}/man3/memcached_pool_fetch.3.gz
+%{_mandir}/man3/memcached_pool_release.3.gz
+%{_mandir}/man3/memcached_pool_st.3.gz
+%{_mandir}/man3/memcached_pool.3.gz
 %{_mandir}/man3/memcached_prepend.3.gz
 %{_mandir}/man3/memcached_prepend_by_key.3.gz
 %{_mandir}/man3/memcached_quit.3.gz
@@ -244,19 +318,26 @@ you will need to install %{name}-devel.
 %{_mandir}/man3/memcached_stat.3.gz
 %{_mandir}/man3/memcached_stat_execute.3.gz
 %{_mandir}/man3/memcached_stat_get_keys.3.gz
+%{_mandir}/man3/memcached_last_error_message.3.gz
 %{_mandir}/man3/memcached_stat_get_value.3.gz
 %{_mandir}/man3/memcached_stat_servername.3.gz
 %{_mandir}/man3/memcached_strerror.3.gz
+%{_mandir}/man3/memcached_exist.3.gz
+%{_mandir}/man3/memcached_exist_by_key.3.gz
+%{_mandir}/man3/memcached_touch.3.gz
+%{_mandir}/man3/memcached_touch_by_key.3.gz
 %{_mandir}/man3/memcached_verbosity.3.gz
 %{_mandir}/man3/memcached_version.3.gz
 
 
 
 %changelog
-* Fri Jan  8 2010 Brian Aker <brian@tangent.org> - 0.37-1
+* Tue May  22 2012 Brian Aker <brian@tangent.org> - 1.0.8
+
+* Fri Jan  8 2010 Brian Aker <brian@tangent.org> - 0.37
 - Modified to be explicit in install include files. 
 
-* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28-1
+* Sat Apr 25 2009 Remi Collet <rpms@famillecollet.com> - 0.28
 - Initial RPM from Brian Aker spec
 - create -devel subpackage
 - add %%post %%postun %%check section
@@ -1,291 +0,0 @@
-/* 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:
- *
- */
-
-/*
-  Sample test application.
-*/
-#include "config.h"
-
-#include "libmemcached/memcached.h"
-#include "libmemcached/watchpoint.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
-#include "server.h"
-#include "../clients/generator.h"
-#include "../clients/execute.h"
-
-#include "test.h"
-
-/* Number of items generated for tests */
-#define GLOBAL_COUNT 100000
-
-/* Number of times to run the test loop */
-#define TEST_COUNTER 500000
-static uint32_t global_count;
-
-static pairs_st *global_pairs;
-static char *global_keys[GLOBAL_COUNT];
-static size_t global_keys_length[GLOBAL_COUNT];
-
-static test_return_t cleanup_pairs(memcached_st *memc __attribute__((unused)))
-{
-  pairs_free(global_pairs);
-
-  return 0;
-}
-
-static test_return_t generate_pairs(memcached_st *memc __attribute__((unused)))
-{
-  global_pairs= pairs_generate(GLOBAL_COUNT, 400);
-  global_count= GLOBAL_COUNT;
-
-  for (size_t x= 0; x < global_count; x++)
-  {
-    global_keys[x]= global_pairs[x].key; 
-    global_keys_length[x]=  global_pairs[x].key_length;
-  }
-
-  return 0;
-}
-
-static test_return_t drizzle(memcached_st *memc)
-{
-  memcached_return_t rc;
-  char *return_value;
-  size_t return_value_length;
-  uint32_t flags;
-
-infinite:
-  for (size_t x= 0; x < TEST_COUNTER; x++)
-  {
-    uint32_t test_bit;
-    uint8_t which;
-
-    test_bit= (uint32_t)(random() % GLOBAL_COUNT);
-    which= (uint8_t)(random() % 2);
-
-    if (which == 0)
-    {
-      return_value= memcached_get(memc, global_keys[test_bit], global_keys_length[test_bit],
-                                  &return_value_length, &flags, &rc);
-      if (rc == MEMCACHED_SUCCESS && return_value)
-      {
-        free(return_value);
-      }
-      else if (rc == MEMCACHED_NOTFOUND)
-      {
-        continue;
-      }
-      else
-      {
-        WATCHPOINT_ERROR(rc);
-        WATCHPOINT_ASSERT(rc);
-      }
-    } 
-    else
-    {
-      rc= memcached_set(memc, global_pairs[test_bit].key, 
-                        global_pairs[test_bit].key_length,
-                        global_pairs[test_bit].value, 
-                        global_pairs[test_bit].value_length,
-                        0, 0);
-      if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
-      {
-        WATCHPOINT_ERROR(rc);
-        WATCHPOINT_ASSERT(0);
-      }
-    }
-  }
-
-  if (getenv("MEMCACHED_ATOM_BURIN_IN"))
-    goto infinite;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_nonblock(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
-
-  return TEST_SUCCESS;
-}
-
-/* 
-  Set the value, then quit to make sure it is flushed.
-  Come back in and test that add fails.
-*/
-static test_return_t add_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-  unsigned long long setting_value;
-
-  setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
-
-  rc= memcached_set(memc, key, strlen(key), 
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  memcached_quit(memc);
-  rc= memcached_add(memc, key, strlen(key), 
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-
-  /* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */
-  if (setting_value)
-  {
-    test_true(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_STORED);
-  }
-  else
-  {
-    test_true(rc == MEMCACHED_NOTSTORED);
-  }
-
-  return 0;
-}
-
-/*
- * repeating add_tests many times
- * may show a problem in timing
- */
-static test_return_t many_adds(memcached_st *memc)
-{
-  for (size_t x= 0; x < TEST_COUNTER; x++)
-  {
-    add_test(memc);
-  }
-  return 0;
-}
-
-test_st smash_tests[] ={
-  {"generate_pairs", 1, (test_callback_fn)generate_pairs },
-  {"drizzle", 1, (test_callback_fn)drizzle },
-  {"cleanup", 1, (test_callback_fn)cleanup_pairs },
-  {"many_adds", 1, (test_callback_fn)many_adds },
-  {0, 0, 0}
-};
-
-#define BENCHMARK_TEST_LOOP 20000
-
-struct benchmark_state_st
-{
-  bool create_init;
-  bool clone_init;
-  memcached_st *create;
-  memcached_st *clone;
-} benchmark_state;
-
-static test_return_t memcached_create_benchmark(memcached_st *memc __attribute__((unused)))
-{
-  benchmark_state.create_init= true;
-
-  for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
-  {
-    memcached_st *ptr;
-    ptr= memcached_create(&benchmark_state.create[x]);
-
-    test_true(ptr);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t memcached_clone_benchmark(memcached_st *memc)
-{
-  benchmark_state.clone_init= true;
-
-  for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
-  {
-    memcached_st *ptr;
-    ptr= memcached_clone(&benchmark_state.clone[x], memc);
-
-    test_true(ptr);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_allocate(memcached_st *memc __attribute__((unused)))
-{
-  memset(&benchmark_state, 0, sizeof(benchmark_state));
-
-  benchmark_state.create= (memcached_st *)calloc(BENCHMARK_TEST_LOOP, sizeof(memcached_st));
-  test_true(benchmark_state.create);
-  benchmark_state.clone= (memcached_st *)calloc(BENCHMARK_TEST_LOOP, sizeof(memcached_st));
-  test_true(benchmark_state.clone);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t post_allocate(memcached_st *memc __attribute__((unused)))
-{
-  for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
-  {
-    if (benchmark_state.create_init)
-      memcached_free(&benchmark_state.create[x]);
-
-    if (benchmark_state.clone_init)
-      memcached_free(&benchmark_state.clone[x]);
-  }
-
-  free(benchmark_state.create);
-  free(benchmark_state.clone);
-
-  return TEST_SUCCESS;
-}
-
-
-test_st micro_tests[] ={
-  {"memcached_create", 1, (test_callback_fn)memcached_create_benchmark },
-  {"memcached_clone", 1, (test_callback_fn)memcached_clone_benchmark },
-  {0, 0, 0}
-};
-
-
-collection_st collection[] ={
-  {"smash", 0, 0, smash_tests},
-  {"smash_nonblock", (test_callback_fn)pre_nonblock, 0, smash_tests},
-  {"micro-benchmark", (test_callback_fn)pre_allocate, (test_callback_fn)post_allocate, micro_tests},
-  {0, 0, 0, 0}
-};
-
-
-#define SERVERS_TO_CREATE 5
-
-#include "libmemcached_world.h"
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-
-  world->create= (test_callback_create_fn)world_create;
-  world->destroy= (test_callback_fn)world_destroy;
-
-  world->test.startup= (test_callback_fn)world_test_startup;
-  world->test.flush= (test_callback_fn)world_flush;
-  world->test.pre_run= (test_callback_fn)world_pre_run;
-  world->test.post_run= (test_callback_fn)world_post_run;
-  world->test.on_error= (test_callback_error_fn)world_on_error;
-
-  world->collection.startup= (test_callback_fn)world_container_startup;
-  world->collection.shutdown= (test_callback_fn)world_container_shutdown;
-
-  world->runner= &defualt_libmemcached_runner;
-}
@@ -0,0 +1,66 @@
+/*  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
+
+#include <libtest/visibility.h>
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+LIBTEST_LOCAL
+test_return_t basic_init_test(memcached_st *junk);
+
+LIBTEST_LOCAL
+test_return_t basic_clone_test(memcached_st *memc);
+
+LIBTEST_LOCAL
+test_return_t basic_reset_stack_test(memcached_st *junk);
+
+LIBTEST_LOCAL
+test_return_t basic_reset_heap_test(memcached_st *junk);
+
+LIBTEST_LOCAL
+test_return_t basic_reset_stack_clone_test(memcached_st *memc);
+
+LIBTEST_LOCAL
+test_return_t basic_reset_heap_clone_test(memcached_st *memc);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -0,0 +1,41 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t test_MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY(memcached_st *);
+test_return_t test_MEMCACHED_CALLBACK_DELETE_TRIGGER(memcached_st *);
@@ -0,0 +1,133 @@
+# 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
+
+
+tests_memcapable_SOURCES= tests/memcapable.cc
+tests_memcapable_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memcapable_DEPENDENCIES= clients/memcapable
+tests_memcapable_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcapable
+noinst_PROGRAMS+= tests/memcapable
+
+tests_memstat_SOURCES= tests/memstat.cc
+tests_memstat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memstat_DEPENDENCIES= clients/memstat
+tests_memstat_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memstat
+noinst_PROGRAMS+= tests/memstat
+
+tests_memcp_SOURCES= tests/memcp.cc
+tests_memcp_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memcp_DEPENDENCIES= clients/memcp
+tests_memcp_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcp
+noinst_PROGRAMS+= tests/memcp
+
+tests_memflush_SOURCES= tests/memflush.cc
+tests_memflush_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memflush_DEPENDENCIES= clients/memflush
+tests_memflush_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memflush
+noinst_PROGRAMS+= tests/memflush
+
+tests_memrm_SOURCES= tests/memrm.cc
+tests_memrm_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memrm_DEPENDENCIES= clients/memrm
+tests_memrm_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memrm
+noinst_PROGRAMS+= tests/memrm
+
+tests_memexist_SOURCES= tests/memexist.cc
+tests_memexist_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memexist_DEPENDENCIES= clients/memexist
+tests_memexist_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memexist
+noinst_PROGRAMS+= tests/memexist
+
+tests_memtouch_SOURCES= tests/memtouch.cc
+tests_memtouch_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memtouch_DEPENDENCIES= clients/memtouch
+tests_memtouch_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memtouch
+noinst_PROGRAMS+= tests/memtouch
+
+tests_memcat_SOURCES= tests/memcat.cc
+tests_memcat_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memcat_DEPENDENCIES= clients/memcat
+tests_memcat_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memcat
+noinst_PROGRAMS+= tests/memcat
+
+tests_memping_SOURCES= tests/memping.cc
+tests_memping_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memping_DEPENDENCIES= clients/memping
+tests_memping_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memping
+noinst_PROGRAMS+= tests/memping
+
+tests_memerror_SOURCES= tests/memerror.cc
+tests_memerror_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memerror_DEPENDENCIES= clients/memerror
+tests_memerror_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memerror
+noinst_PROGRAMS+= tests/memerror
+
+tests_memslap_SOURCES= tests/memslap.cc
+tests_memslap_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memslap_DEPENDENCIES= clients/memslap
+tests_memslap_LDADD= libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memslap
+noinst_PROGRAMS+= tests/memslap
+
+test-memslap: tests/memslap
+	@tests/memslap
+
+gdb-memslap: tests/memslap
+	@$(GDB_COMMAND) tests/memslap
+
+tests_memdump_SOURCES= tests/memdump.cc
+tests_memdump_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+EXTRA_tests_memdump_DEPENDENCIES= clients/memdump
+tests_memdump_LDADD=  libtest/libtest.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/memdump
+noinst_PROGRAMS+= tests/memdump
+
+test-memcp: tests/memcp
+	tests/memcp
+
+gdb-memcp: tests/memcp
+	@$(GDB_COMMAND) tests/memcp
+
+test-memstat: tests/memstat
+	tests/memstat
+
+test-memerror: tests/memerror
+	tests/memerror
+
+test-memtouch: tests/memtouch
+	tests/memtouch
+
+test-memping: tests/memping
+	tests/memping
+
+valgrind-memerror: tests/memerror
+	 @$(VALGRIND_COMMAND) tests/memerror
+
+valgrind-memtouch: tests/memtouch
+	 @$(VALGRIND_COMMAND) tests/memtouch
+
+test-memdump: tests/memdump
+	tests/memdump
+
+gdb-memdump: tests/memdump
+	@$(GDB_COMMAND) tests/memdump
+
+valgrind-memdump: tests/memdump
+	 @$(VALGRIND_COMMAND) tests/memdump
@@ -0,0 +1,195 @@
+/*
+ * An example file showing the usage of the C++ libmemcached interface.
+ */
+#include <mem_config.h>
+
+#include <vector>
+#include <string>
+#include <iostream>
+#include <algorithm>
+#include <map>
+
+#include <string.h>
+
+#include <libmemcached/memcached.hpp>
+
+using namespace std;
+using namespace memcache;
+
+class DeletePtrs
+{
+public:
+  template<typename T>
+  inline void operator()(const T *ptr) const
+  {
+    delete ptr;
+  }
+};
+
+class MyCache
+{
+public:
+
+  static const uint32_t num_of_clients= 10;
+
+  static MyCache &singleton()
+  {
+    static MyCache instance;
+    return instance;
+  }
+
+  void set(const string &key,
+           const vector<char> &value)
+  {
+    time_t expiry= 0;
+    uint32_t flags= 0;
+    getCache()->set(key, value, expiry, flags);
+  }
+
+  vector<char> get(const string &key)
+  {
+    vector<char> ret_value;
+    getCache()->get(key, ret_value);
+    return ret_value;
+  }
+
+  void remove(const string &key)
+  {
+    getCache()->remove(key);
+  }
+
+  Memcache *getCache()
+  {
+    /* 
+     * pick a random element from the vector of clients. Obviously, this is
+     * not very random but suffices as an example!
+     */
+    uint32_t index= rand() % num_of_clients;
+    return clients[index];
+  } 
+
+private:
+
+  /*
+   * A vector of clients.
+   */
+  std::vector<Memcache *> clients;
+
+  MyCache()
+    :
+      clients()
+  {
+    /* create clients and add them to the vector */
+    for (uint32_t i= 0; i < num_of_clients; i++)
+    {
+      Memcache *client= new Memcache("127.0.0.1:11211");
+      clients.push_back(client);
+    }
+  }
+
+  ~MyCache()
+  {
+    for_each(clients.begin(), clients.end(), DeletePtrs());
+    clients.clear();
+  }
+
+  MyCache(const MyCache&);
+
+};
+
+class Product
+{
+public:
+
+  Product(int in_id, double in_price)
+    :
+      id(in_id),
+      price(in_price)
+  {}
+
+  Product()
+    :
+      id(0),
+      price(0.0)
+  {}
+
+  int getId() const
+  {
+    return id;
+  }
+
+  double getPrice() const
+  {
+    return price;
+  }
+
+private:
+
+  int id;
+  double price;
+
+};
+
+void setAllProducts(vector<Product> &products)
+{
+  vector<char> raw_products(products.size() * sizeof(Product));
+  memcpy(&raw_products[0], &products[0], products.size() * sizeof(Product));
+  MyCache::singleton().set("AllProducts", raw_products);
+}
+
+vector<Product> getAllProducts()
+{
+  vector<char> raw_products = MyCache::singleton().get("AllProducts");
+  vector<Product> products(raw_products.size() / sizeof(Product));
+  memcpy(&products[0], &raw_products[0], raw_products.size());
+  return products;
+}
+
+Product getProduct(const string &key)
+{
+  vector<char> raw_product= MyCache::singleton().get(key);
+  Product ret;
+  if (! raw_product.empty())
+  {
+    memcpy(&ret, &raw_product[0], sizeof(Product));
+  }
+  else
+  {
+    /* retrieve it from the persistent store */
+  }
+  return ret;
+}
+
+void setProduct(const string &key, const Product &product)
+{
+  vector<char> raw_product(sizeof(Product));
+  memcpy(&raw_product[0], &product, sizeof(Product));
+  MyCache::singleton().set(key, raw_product);
+}
+
+int main()
+{
+  Memcache first_client("127.0.0.1:19191");
+  map< string, map<string, string> > my_stats;
+  first_client.getStats(my_stats);
+  
+  /*
+   * Iterate through the retrieved stats.
+   */
+  map< string, map<string, string> >::iterator it=
+    my_stats.begin();
+  while (it != my_stats.end())
+  {
+    cout << "working with server: " << (*it).first << endl;
+    map<string, string> serv_stats= (*it).second;
+    map<string, string>::iterator iter= serv_stats.begin();
+    while (iter != serv_stats.end())
+    {
+      cout << (*iter).first << ":" << (*iter).second << endl;
+      ++iter;
+    }
+    ++it;
+  }
+
+  return EXIT_SUCCESS;
+}
@@ -0,0 +1,143 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Cycle the Gearmand server
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+#include <libmemcached-1.0/memcached.h>
+
+static test_return_t server_startup_single_TEST(void *obj)
+{
+  server_startup_st *servers= (server_startup_st*)obj;
+  test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(), NULL));
+  test_compare(true, servers->shutdown());
+
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_startup_multiple_TEST(void *obj)
+{
+  test_skip(true, jenkins_is_caller());
+
+  server_startup_st *servers= (server_startup_st*)obj;
+  for (size_t x= 0; x < 10; ++x)
+  {
+    test_compare(true, server_startup(*servers, "memcached", libtest::get_free_port(), NULL));
+  }
+  test_compare(true, servers->shutdown());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t shutdown_and_remove_TEST(void *obj)
+{
+  server_startup_st *servers= (server_startup_st*)obj;
+  servers->clear();
+
+  return TEST_SUCCESS;
+}
+
+test_st server_startup_TESTS[] ={
+  {"server_startup(1)", false, (test_callback_fn*)server_startup_single_TEST },
+  {"server_startup(10)", false, (test_callback_fn*)server_startup_multiple_TEST },
+  {"shutdown_and_remove()", false, (test_callback_fn*)shutdown_and_remove_TEST },
+  {"server_startup(10)", false, (test_callback_fn*)server_startup_multiple_TEST },
+  {0, 0, 0}
+};
+
+#if 0
+static test_return_t collection_INIT(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  test_zero(servers->count());
+  test_compare(true, server_startup(*servers, "memcached", libtest::default_port(), 0, NULL));
+
+  return TEST_SUCCESS;
+}
+#endif
+
+static test_return_t validate_sanity_INIT(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+
+  test_zero(servers->count());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t collection_FINAL(void *object)
+{
+  server_startup_st *servers= (server_startup_st*)object;
+  servers->clear();
+
+  return TEST_SUCCESS;
+}
+
+collection_st collection[] ={
+  {"server_startup()", validate_sanity_INIT, collection_FINAL, server_startup_TESTS },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (jenkins_is_caller())
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  return &servers;
+}
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,48 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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
+
+test_return_t confirm_keys_exist(memcached_st *memc, const char * const *keys, const size_t number_of_keys, bool key_matches_value= false, bool require_all= false);
+
+test_return_t confirm_keys_dont_exist(memcached_st *memc, const char * const *keys, const size_t number_of_keys);
+
+test_return_t print_keys_by_server(memcached_st *memc);
+
+size_t confirm_key_count(memcached_st *memc);
+
+void print_servers(memcached_st *);
@@ -0,0 +1,49 @@
+/*  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
+
+test_return_t server_list_null_test(memcached_st *ptr);
+test_return_t regression_bug_728286(memcached_st *);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -0,0 +1,48 @@
+/*  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
+
+test_return_t memcached_increment_MEMCACHED_NO_SERVERS(memcached_st *junk);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -0,0 +1,42 @@
+/*  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
+
+test_return_t memcached_exist_NOTFOUND(memcached_st *);
+test_return_t memcached_exist_SUCCESS(memcached_st *);
+test_return_t memcached_exist_by_key_NOTFOUND(memcached_st *);
+test_return_t memcached_exist_by_key_SUCCESS(memcached_st *);
@@ -0,0 +1,239 @@
+/*  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 <mem_config.h>
+
+/*
+  C++ interface test
+*/
+#include <libmemcached-1.0/memcached.hpp>
+#include <libmemcached/server_instance.h>
+#include <libtest/test.hpp>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <ctime>
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+using namespace memcache;
+using namespace libtest;
+
+libtest::Framework *global_framework= NULL;
+
+static test_return_t shutdown_servers(memcached_st *memc)
+{
+  return TEST_SKIPPED;
+
+  test_skip_valgrind();
+
+  test_compare(memcached_server_count(memc), 1U);
+
+  // Disable a single server, just the first
+  global_framework->servers().shutdown(0);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t add_shutdown_servers(memcached_st *memc)
+{
+  return TEST_SKIPPED;
+
+  test_skip_valgrind();
+
+  while (memcached_server_count(memc) < 2)
+  {
+    const char *argv[1]= { "add_shutdown_server" };
+    test_true(global_framework->servers().start_socket_server("memcached", libtest::default_port(), argv));
+    test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, "localhost", libtest::default_port()));
+  }
+
+  // Disable a single server, just the first
+  global_framework->servers().shutdown(0);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t restart_servers(memcached_st *)
+{
+  // Restart the servers
+  global_framework->servers().restart();
+
+  return TEST_SUCCESS;
+}
+
+#include "libmemcached/instance.hpp"
+static test_return_t cull_TEST(memcached_st *memc)
+{
+  uint32_t count= memcached_server_count(memc);
+
+  // Do not do this in your code, it is not supported.
+  memc->servers[0].options.is_dead= true;
+  memc->state.is_time_for_rebuild= true;
+
+  uint32_t new_count= memcached_server_count(memc);
+  test_compare(count, new_count);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t MEMCACHED_SERVER_TEMPORARILY_DISABLED_TEST(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 30));
+  test_compare_got(MEMCACHED_CONNECTION_FAILURE,
+                   memcached_set(memc,
+                                 test_literal_param("foo"),
+                                 NULL, 0, time_t(0), uint32_t(0)),
+                   memcached_last_error_message(memc));
+
+  /*
+    Setting server_failure_counter==0 should not influence the timeout that we set above,
+    since we check the timeout that is created by the failure before we check how many times
+    a server has failed.
+  */
+  test_compare(MEMCACHED_SERVER_TEMPORARILY_DISABLED,
+               memcached_set(memc, test_literal_param("foo"), NULL, 0, time_t(0), uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t MEMCACHED_SERVER_TEMPORARILY_DISABLED_to_success_TEST(memcached_st *memc)
+{
+  return TEST_SKIPPED;
+
+  test_compare_got(MEMCACHED_CONNECTION_FAILURE,
+                   memcached_set(memc,
+                                 test_literal_param("foo"),
+                                 NULL, 0, time_t(0), uint32_t(0)),
+                   memcached_last_error_message(memc));
+
+  /*
+    Setting server_failure_counter==0 should not influence the timeout that we set above,
+    since we check the timeout that is created by the failure before we check how many times
+    a server has failed.
+  */
+  test_compare(MEMCACHED_SERVER_TEMPORARILY_DISABLED,
+               memcached_set(memc, test_literal_param("foo"), NULL, 0, time_t(0), uint32_t(0)));
+
+  global_framework->servers().restart();
+
+  int limit= 5;
+  memcached_return_t ret;
+  do {
+    libtest::dream(3, 0);
+    ret= memcached_set(memc, test_literal_param("foo"), NULL, 0, time_t(0), uint32_t(0));
+  } while (ret == MEMCACHED_SERVER_TEMPORARILY_DISABLED and --limit);
+
+  test_true(limit);
+
+  test_compare_got(MEMCACHED_SUCCESS, ret, memcached_last_error_message(memc));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t MEMCACHED_SERVER_MARKED_DEAD_TEST(memcached_st *memc)
+{
+  return TEST_SKIPPED;
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 30));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, true));
+
+  memcached_return_t ret;
+  do {
+    ret= memcached_set(memc,
+                       test_literal_param("foo"),
+                       NULL, 0, time_t(0), uint32_t(0));
+  } while (ret == MEMCACHED_SUCCESS or ret == MEMCACHED_CONNECTION_FAILURE);
+  test_compare(MEMCACHED_SERVER_TEMPORARILY_DISABLED, ret);
+
+  int limit= 5;
+  do {
+    libtest::dream(3, 0);
+    ret= memcached_set(memc, test_literal_param("foo"), NULL, 0, time_t(0), uint32_t(0));
+  } while ((ret == MEMCACHED_SERVER_TEMPORARILY_DISABLED or ret == MEMCACHED_SUCCESS) and --limit);
+
+  test_true(limit);
+
+  test_compare_got(MEMCACHED_SERVER_MARKED_DEAD, ret, memcached_last_error_message(memc));
+
+  return TEST_SUCCESS;
+}
+
+test_st cull_TESTS[] ={
+  { "cull servers", true, (test_callback_fn*)cull_TEST },
+  { 0, 0, 0 }
+};
+
+test_st server_temporarily_disabled_TESTS[] ={
+  { "memcached_set(MEMCACHED_SERVER_TEMPORARILY_DISABLED -> MEMCACHED_SUCCESS)", true, (test_callback_fn*)MEMCACHED_SERVER_TEMPORARILY_DISABLED_to_success_TEST },
+  { "memcached_set(MEMCACHED_SERVER_TEMPORARILY_DISABLED)", true, (test_callback_fn*)MEMCACHED_SERVER_TEMPORARILY_DISABLED_TEST },
+  { 0, 0, 0 }
+};
+
+test_st server_permanently_disabled_TESTS[] ={
+  { "memcached_set(MEMCACHED_SERVER_MARKED_DEAD)", true, (test_callback_fn*)MEMCACHED_SERVER_MARKED_DEAD_TEST },
+  { 0, 0, 0 }
+};
+
+collection_st collection[] ={
+  { "cull", (test_callback_fn*)shutdown_servers, (test_callback_fn*)restart_servers, cull_TESTS },
+  { "server failed", (test_callback_fn*)shutdown_servers, (test_callback_fn*)restart_servers, server_temporarily_disabled_TESTS },
+  { "server eject", (test_callback_fn*)add_shutdown_servers, (test_callback_fn*)restart_servers, server_permanently_disabled_TESTS },
+  { 0, 0, 0, 0 }
+};
+
+#include "tests/libmemcached_world.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->servers().set_servers_to_run(1);
+
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+
+  global_framework= world;
+}
@@ -1,28 +1,32 @@
 /*
   C++ to libhashkit
 */
-#include "test.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
-#include <libhashkit/hashkit.h>
+#include <mem_config.h>
 
-#include "hash_results.h"
+#include <libtest/test.hpp>
 
-static test_return_t exists_test(void *obj)
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <libhashkit-1.0/hashkit.hpp>
+
+using namespace libtest;
+
+#include "tests/hash_results.h"
+
+static test_return_t exists_test(void *)
 {
   Hashkit hashk;
-  (void)obj;
   (void)hashk;
 
   return TEST_SUCCESS;
 }
 
-static test_return_t new_test(void *obj)
+static test_return_t new_test(void *)
 {
   Hashkit *hashk= new Hashkit;
-  (void)obj;
 
   (void)hashk;
 
@@ -31,11 +35,10 @@ static test_return_t new_test(void *obj)
   return TEST_SUCCESS;
 }
 
-static test_return_t copy_test(void *obj)
+static test_return_t copy_test(void *)
 {
   Hashkit *hashk= new Hashkit;
   Hashkit *copy(hashk);
-  (void)obj;
 
   (void)copy;
 
@@ -44,11 +47,10 @@ static test_return_t copy_test(void *obj)
   return TEST_SUCCESS;
 }
 
-static test_return_t assign_test(void *obj)
+static test_return_t assign_test(void *)
 {
   Hashkit hashk;
   Hashkit copy;
-  (void)obj;
 
   copy= hashk;
 
@@ -57,18 +59,15 @@ static test_return_t assign_test(void *obj)
   return TEST_SUCCESS;
 }
 
-static test_return_t digest_test(void *obj)
+static test_return_t digest_test(void *)
 {
   Hashkit hashk;
-  uint32_t value;
-  (void)obj;
-
-  value= hashk.digest("Foo", sizeof("Foo"));
+  test_true(hashk.digest("Foo", sizeof("Foo")));
 
   return TEST_SUCCESS;
 }
 
-static test_return_t set_function_test(void *obj)
+static test_return_t set_function_test(void *)
 {
   Hashkit hashk;
   hashkit_hash_algorithm_t algo_list[]= { 
@@ -83,53 +82,71 @@ static test_return_t set_function_test(void *obj)
     HASHKIT_HASH_JENKINS,
     HASHKIT_HASH_MAX
   };
-  hashkit_hash_algorithm_t *algo;
-  (void)obj;
 
 
-  for (algo= algo_list; *algo != HASHKIT_HASH_MAX; algo++)
+  for (hashkit_hash_algorithm_t *algo= algo_list; *algo != HASHKIT_HASH_MAX; algo++)
   {
-    hashkit_return_t rc;
-    uint32_t x;
-    const char **ptr;
-    uint32_t *list;
+    hashkit_return_t rc= hashk.set_function(*algo);
 
-    rc= hashk.set_function(*algo);
+    if (rc == HASHKIT_INVALID_ARGUMENT)
+    {
+      continue;
+    }
 
-    test_true(rc == HASHKIT_SUCCESS);
+    test_compare(HASHKIT_SUCCESS, rc);
 
+    uint32_t *list;
     switch (*algo)
     {
     case HASHKIT_HASH_DEFAULT:
       list= one_at_a_time_values;
       break;
+
     case HASHKIT_HASH_MD5:
       list= md5_values;
       break;
+
     case HASHKIT_HASH_CRC:
       list= crc_values;
       break;
+
     case HASHKIT_HASH_FNV1_64:
       list= fnv1_64_values;
       break;
+
     case HASHKIT_HASH_FNV1A_64:
       list= fnv1a_64_values;
       break;
+
     case HASHKIT_HASH_FNV1_32:
       list= fnv1_32_values;
       break;
+
     case HASHKIT_HASH_FNV1A_32:
       list= fnv1a_32_values;
       break;
+
     case HASHKIT_HASH_HSIEH:
       list= hsieh_values;
       break;
+
+    case HASHKIT_HASH_MURMUR3:
+#ifdef WORDS_BIGENDIAN
+      continue;
+#endif
+      list= murmur3_values;
+      break;
     case HASHKIT_HASH_MURMUR:
+#ifdef WORDS_BIGENDIAN
+      continue;
+#endif
       list= murmur_values;
       break;
+
     case HASHKIT_HASH_JENKINS:
       list= jenkins_values;
       break;
+
     case HASHKIT_HASH_CUSTOM:
     case HASHKIT_HASH_MAX:
     default:
@@ -138,37 +155,39 @@ static test_return_t set_function_test(void *obj)
     }
 
     // Now we make sure we did set the hash correctly.
+    uint32_t x;
+    const char **ptr;
     for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
     {
       uint32_t hash_val;
 
       hash_val= hashk.digest(*ptr, strlen(*ptr));
-      test_true(list[x] == hash_val);
+      char buffer[1024];
+      snprintf(buffer, sizeof(buffer), "%lu %lus %s", (unsigned long)list[x], (unsigned long)hash_val, libhashkit_string_hash(*algo));
+      test_compare(list[x], hash_val);
     }
   }
 
   return TEST_SUCCESS;
 }
 
-static test_return_t set_distribution_function_test(void *obj)
+static test_return_t set_distribution_function_test(void *)
 {
   Hashkit hashk;
   hashkit_return_t rc;
-  (void)obj;
 
   rc= hashk.set_distribution_function(HASHKIT_HASH_CUSTOM);
-  test_true(rc == HASHKIT_FAILURE);
+  test_true(rc == HASHKIT_FAILURE or rc == HASHKIT_INVALID_ARGUMENT);
 
-  rc= hashk.set_distribution_function(HASHKIT_HASH_JENKINS);
-  test_true(rc == HASHKIT_SUCCESS);
+  test_compare(HASHKIT_SUCCESS,
+               hashk.set_distribution_function(HASHKIT_HASH_JENKINS));
 
   return TEST_SUCCESS;
 }
 
-static test_return_t compare_function_test(void *obj)
+static test_return_t compare_function_test(void *)
 {
   Hashkit a, b;
-  (void)obj;
 
   b= a;
   
@@ -184,14 +203,14 @@ static test_return_t compare_function_test(void *obj)
 }
 
 test_st basic[] ={
-  { "exists", 0, reinterpret_cast<test_callback_fn>(exists_test) },
-  { "new", 0, reinterpret_cast<test_callback_fn>(new_test) },
-  { "copy", 0, reinterpret_cast<test_callback_fn>(copy_test) },
-  { "assign", 0, reinterpret_cast<test_callback_fn>(assign_test) },
-  { "digest", 0, reinterpret_cast<test_callback_fn>(digest_test) },
-  { "set_function", 0, reinterpret_cast<test_callback_fn>(set_function_test) },
-  { "set_distribution_function", 0, reinterpret_cast<test_callback_fn>(set_distribution_function_test) },
-  { "compare", 0, reinterpret_cast<test_callback_fn>(compare_function_test) },
+  { "exists", 0, reinterpret_cast<test_callback_fn*>(exists_test) },
+  { "new", 0, reinterpret_cast<test_callback_fn*>(new_test) },
+  { "copy", 0, reinterpret_cast<test_callback_fn*>(copy_test) },
+  { "assign", 0, reinterpret_cast<test_callback_fn*>(assign_test) },
+  { "digest", 0, reinterpret_cast<test_callback_fn*>(digest_test) },
+  { "set_function", 0, reinterpret_cast<test_callback_fn*>(set_function_test) },
+  { "set_distribution_function", 0, reinterpret_cast<test_callback_fn*>(set_distribution_function_test) },
+  { "compare", 0, reinterpret_cast<test_callback_fn*>(compare_function_test) },
   { 0, 0, 0}
 };
 
@@ -200,7 +219,7 @@ collection_st collection[] ={
   {0, 0, 0, 0}
 };
 
-void get_world(world_st *world)
+void get_world(libtest::Framework* world)
 {
-  world->collections= collection;
+  world->collections(collection);
 }
@@ -105,6 +105,7 @@ static uint32_t hsieh_values[]= { 3738850110U, 3636226060U, 3821074029U, 3489929
 static uint32_t hsieh_values[]= {  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 };
 #endif
 
+#ifdef HAVE_MURMUR_HASH
 static uint32_t murmur_values[]= {  4142305122U, 734504955U, 3802834688U, 4076891445U,
                                     387802650U, 560515427U, 3274673488U, 3150339524U,
                                     1527441970U, 2728642900U, 3613992239U, 2938419259U,
@@ -113,6 +114,18 @@ static uint32_t murmur_values[]= {  4142305122U, 734504955U, 3802834688U, 407689
                                     926327338U, 442757446U, 1770805201U, 560483147U,
                                     3902279934U };
 
+static uint32_t murmur3_values[]= { 1120212521U, 1448785489U, 4186307405U, 2686268514U,
+                                    444808887U, 221750260U, 3074673162U, 1946933257U,
+                                    2826416675U, 2430719166U, 3200429559U, 297894347U,
+                                    732888124U, 4050076964U, 3298336176U, 1336207361U,
+                                    810553576U, 3748182674U, 3860119212U, 3439537197U,
+                                    3044240981U, 1464271804U, 3896193724U, 2915115798U,
+                                    1702843840U };
+#else
+static uint32_t murmur_values[]= {  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 uint32_t murmur3_values[]= {  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 };
+#endif
+
 static uint32_t jenkins_values[]= { 1442444624U, 4253821186U, 1885058256U, 2120131735U,
                                     3261968576U, 3515188778U, 4232909173U, 4288625128U,
                                     1812047395U, 3689182164U, 2502979932U, 1214050606U,
@@ -1,579 +0,0 @@
-/* libHashKit Functions Test
- * 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.
- */
-
-#include "config.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libhashkit/hashkit.h>
-
-#include "test.h"
-
-#include "hash_results.h"
-
-static hashkit_st global_hashk;
-
-/**
-  @brief hash_test_st is a structure we use in testing. It is currently empty.
-*/
-typedef struct hash_test_st hash_test_st;
-
-struct hash_test_st
-{
-  bool _unused;
-};
-
-static test_return_t init_test(void *not_used __attribute__((unused)))
-{
-  hashkit_st hashk;
-  hashkit_st *hashk_ptr;
-
-  hashk_ptr= hashkit_create(&hashk);
-  test_true(hashk_ptr);
-  test_true(hashk_ptr == &hashk);
-  test_true(hashkit_is_allocated(hashk_ptr) == false);
-
-  hashkit_free(hashk_ptr);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t allocation_test(void *not_used __attribute__((unused)))
-{
-  hashkit_st *hashk_ptr;
-
-  hashk_ptr= hashkit_create(NULL);
-  test_true(hashk_ptr);
-  test_true(hashkit_is_allocated(hashk_ptr) == true);
-  hashkit_free(hashk_ptr);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t clone_test(hashkit_st *hashk)
-{
-  // First we make sure that the testing system is giving us what we expect.
-  assert(&global_hashk == hashk);
-
-  // Second we test if hashk is even valid
-
-  /* All null? */
-  {
-    hashkit_st *hashk_ptr;
-    hashk_ptr= hashkit_clone(NULL, NULL);
-    test_true(hashk_ptr);
-    test_true(hashkit_is_allocated(hashk_ptr));
-    hashkit_free(hashk_ptr);
-  }
-
-  /* Can we init from null? */
-  {
-    hashkit_st *hashk_ptr;
-
-    hashk_ptr= hashkit_clone(NULL, hashk);
-
-    test_true(hashk_ptr);
-    test_true(hashkit_is_allocated(hashk_ptr));
-
-    hashkit_free(hashk_ptr);
-  }
-
-  /* Can we init from struct? */
-  {
-    hashkit_st declared_clone;
-    hashkit_st *hash_clone;
-
-    hash_clone= hashkit_clone(&declared_clone, NULL);
-    test_true(hash_clone);
-    test_true(hash_clone == &declared_clone);
-    test_false(hashkit_is_allocated(hash_clone));
-
-    hashkit_free(hash_clone);
-  }
-
-  /* Can we init from struct? */
-  {
-    hashkit_st declared_clone;
-    hashkit_st *hash_clone;
-
-    hash_clone= hashkit_clone(&declared_clone, hashk);
-    test_true(hash_clone);
-    test_true(hash_clone == &declared_clone);
-    test_false(hashkit_is_allocated(hash_clone));
-
-    hashkit_free(hash_clone);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t one_at_a_time_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_one_at_a_time(*ptr, strlen(*ptr));
-    test_true(one_at_a_time_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t md5_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_md5(*ptr, strlen(*ptr));
-    test_true(md5_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t crc_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_crc32(*ptr, strlen(*ptr));
-    assert(crc_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1_64_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_fnv1_64(*ptr, strlen(*ptr));
-    assert(fnv1_64_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1a_64_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_fnv1a_64(*ptr, strlen(*ptr));
-    assert(fnv1a_64_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1_32_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_fnv1_32(*ptr, strlen(*ptr));
-    assert(fnv1_32_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1a_32_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_fnv1a_32(*ptr, strlen(*ptr));
-    assert(fnv1a_32_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t hsieh_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-#ifdef HAVE_HSIEH_HASH
-    hash_val= libhashkit_hsieh(*ptr, strlen(*ptr));
-#else
-    hash_val= 1;
-#endif
-    assert(hsieh_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t murmur_run (hashkit_st *hashk __attribute__((unused)))
-{
-#ifdef WORDS_BIGENDIAN
-  return TEST_SKIPPED;
-#else
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_murmur(*ptr, strlen(*ptr));
-    assert(murmur_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-#endif
-}
-
-static test_return_t jenkins_run (hashkit_st *hashk __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= libhashkit_jenkins(*ptr, strlen(*ptr));
-    assert(jenkins_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-
-
-
-/**
-  @brief now we list out the tests.
-*/
-
-test_st allocation[]= {
-  {"init", 0, (test_callback_fn)init_test},
-  {"create and free", 0, (test_callback_fn)allocation_test},
-  {"clone", 0, (test_callback_fn)clone_test},
-  {0, 0, 0}
-};
-
-static test_return_t hashkit_digest_test(hashkit_st *hashk)
-{
-  uint32_t value;
-  value= hashkit_digest(hashk, "a", sizeof("a"));
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t hashkit_set_function_test(hashkit_st *hashk)
-{
-  for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++) 
-  {
-    hashkit_return_t rc;
-    uint32_t x;
-    const char **ptr;
-    uint32_t *list;
-
-    rc= hashkit_set_function(hashk, algo);
-
-    /* Hsieh is disabled most of the time for patent issues */
-    if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_HSIEH)
-      continue;
-
-    if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_CUSTOM)
-      continue;
-
-    test_true(rc == HASHKIT_SUCCESS);
-
-    switch (algo)
-    {
-    case HASHKIT_HASH_DEFAULT:
-      list= one_at_a_time_values;
-      break;
-    case HASHKIT_HASH_MD5:
-      list= md5_values;
-      break;
-    case HASHKIT_HASH_CRC:
-      list= crc_values;
-      break;
-    case HASHKIT_HASH_FNV1_64:
-      list= fnv1_64_values;
-      break;
-    case HASHKIT_HASH_FNV1A_64:
-      list= fnv1a_64_values;
-      break;
-    case HASHKIT_HASH_FNV1_32:
-      list= fnv1_32_values;
-      break;
-    case HASHKIT_HASH_FNV1A_32:
-      list= fnv1a_32_values;
-      break;
-    case HASHKIT_HASH_HSIEH:
-      list= hsieh_values;
-      break;
-    case HASHKIT_HASH_MURMUR:
-      list= murmur_values;
-      break;
-    case HASHKIT_HASH_JENKINS:
-      list= jenkins_values;
-      break;
-    case HASHKIT_HASH_CUSTOM:
-    case HASHKIT_HASH_MAX:
-    default:
-      list= NULL;
-      break;
-    }
-
-    // Now we make sure we did set the hash correctly.
-    if (list)
-    {
-      for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-      {
-        uint32_t hash_val;
-
-        hash_val= hashkit_digest(hashk, *ptr, strlen(*ptr));
-        test_true(list[x] == hash_val);
-      }
-    }
-    else
-    {
-      return TEST_FAILURE;
-    }
-  }
-
-  return TEST_SUCCESS;
-}
-
-static uint32_t hash_test_function(const char *string, size_t string_length, void *context)
-{
-  (void)context;
-  return libhashkit_md5(string, string_length);
-}
-
-static test_return_t hashkit_set_custom_function_test(hashkit_st *hashk)
-{
-  hashkit_return_t rc;
-  uint32_t x;
-  const char **ptr;
-
-
-  rc= hashkit_set_custom_function(hashk, hash_test_function, NULL);
-  test_true(rc == HASHKIT_SUCCESS);
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= hashkit_digest(hashk, *ptr, strlen(*ptr));
-    test_true(md5_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t hashkit_set_distribution_function_test(hashkit_st *hashk)
-{
-  for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++) 
-  {
-    hashkit_return_t rc;
-
-    rc= hashkit_set_distribution_function(hashk, algo);
-
-    /* Hsieh is disabled most of the time for patent issues */
-    if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_HSIEH)
-      continue;
-
-    if (rc == HASHKIT_FAILURE && algo == HASHKIT_HASH_CUSTOM)
-      continue;
-
-    test_true(rc == HASHKIT_SUCCESS);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t hashkit_set_custom_distribution_function_test(hashkit_st *hashk)
-{
-  hashkit_return_t rc;
-
-  rc= hashkit_set_custom_distribution_function(hashk, hash_test_function, NULL);
-  test_true(rc == HASHKIT_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t hashkit_get_function_test(hashkit_st *hashk)
-{
-  for (hashkit_hash_algorithm_t algo = HASHKIT_HASH_DEFAULT; algo < HASHKIT_HASH_MAX; algo++) 
-  {
-    hashkit_return_t rc;
-
-    if (HASHKIT_HASH_CUSTOM || HASHKIT_HASH_HSIEH)
-      continue;
-
-    rc= hashkit_set_function(hashk, algo);
-    test_true(rc == HASHKIT_SUCCESS);
-
-    test_true(hashkit_get_function(hashk) == algo);
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t hashkit_compare_test(hashkit_st *hashk)
-{
-  hashkit_st *clone;
-
-  clone= hashkit_clone(NULL, hashk);
-
-  test_true(hashkit_compare(clone, hashk));
-  hashkit_free(clone);
-
-  return TEST_SUCCESS;
-}
-
-test_st hashkit_st_functions[] ={
-  {"hashkit_digest", 0, (test_callback_fn)hashkit_digest_test},
-  {"hashkit_set_function", 0, (test_callback_fn)hashkit_set_function_test},
-  {"hashkit_set_custom_function", 0, (test_callback_fn)hashkit_set_custom_function_test},
-  {"hashkit_get_function", 0, (test_callback_fn)hashkit_get_function_test},
-  {"hashkit_set_distribution_function", 0, (test_callback_fn)hashkit_set_distribution_function_test},
-  {"hashkit_set_custom_distribution_function", 0, (test_callback_fn)hashkit_set_custom_distribution_function_test},
-  {"hashkit_compare", 0, (test_callback_fn)hashkit_compare_test},
-  {0, 0, 0}
-};
-
-static test_return_t libhashkit_digest_test(hashkit_st *hashk)
-{
-  uint32_t value;
-
-  (void)hashk;
-
-  value= libhashkit_digest("a", sizeof("a"), HASHKIT_HASH_DEFAULT);
-
-  return TEST_SUCCESS;
-}
-
-test_st library_functions[] ={
-  {"libhashkit_digest", 0, (test_callback_fn)libhashkit_digest_test},
-  {0, 0, 0}
-};
-
-test_st hash_tests[] ={
-  {"one_at_a_time", 0, (test_callback_fn)one_at_a_time_run },
-  {"md5", 0, (test_callback_fn)md5_run },
-  {"crc", 0, (test_callback_fn)crc_run },
-  {"fnv1_64", 0, (test_callback_fn)fnv1_64_run },
-  {"fnv1a_64", 0, (test_callback_fn)fnv1a_64_run },
-  {"fnv1_32", 0, (test_callback_fn)fnv1_32_run },
-  {"fnv1a_32", 0, (test_callback_fn)fnv1a_32_run },
-  {"hsieh", 0, (test_callback_fn)hsieh_run },
-  {"murmur", 0, (test_callback_fn)murmur_run },
-  {"jenkis", 0, (test_callback_fn)jenkins_run },
-  {0, 0, (test_callback_fn)0}
-};
-
-/*
- * The following test suite is used to verify that we don't introduce
- * regression bugs. If you want more information about the bug / test,
- * you should look in the bug report at
- *   http://bugs.launchpad.net/libmemcached
- */
-test_st regression[]= {
-  {0, 0, 0}
-};
-
-collection_st collection[] ={
-  {"allocation", 0, 0, allocation},
-  {"hashkit_st_functions", 0, 0, hashkit_st_functions},
-  {"library_functions", 0, 0, library_functions},
-  {"hashing", 0, 0, hash_tests},
-  {"regression", 0, 0, regression},
-  {0, 0, 0, 0}
-};
-
-/* Prototypes for functions we will pass to test framework */
-void *world_create(test_return_t *error);
-test_return_t world_destroy(hashkit_st *hashk);
-
-void *world_create(test_return_t *error)
-{
-  hashkit_st *hashk_ptr;
-
-  hashk_ptr= hashkit_create(&global_hashk);
-
-  if (hashk_ptr != &global_hashk)
-  {
-    *error= TEST_FAILURE;
-    return NULL;
-  }
-
-  if (hashkit_is_allocated(hashk_ptr) == true)
-  {
-    *error= TEST_FAILURE;
-    return NULL;
-  }
-
-  *error= TEST_SUCCESS;
-
-  return hashk_ptr;
-}
-
-
-test_return_t world_destroy(hashkit_st *hashk)
-{
-  // Did we get back what we expected?
-  assert(hashkit_is_allocated(hashk) == false);
-  hashkit_free(&global_hashk);
-
-  return TEST_SUCCESS;
-}
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-  world->create= (test_callback_create_fn)world_create;
-  world->destroy= (test_callback_fn)world_destroy;
-}
@@ -0,0 +1,592 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  libHashKit Functions Test
+ *
+ *  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 <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <libhashkit-1.0/hashkit.h>
+#include <libhashkit/is.h>
+
+#include "tests/hash_results.h"
+
+static hashkit_st global_hashk;
+
+/**
+  @brief hash_test_st is a structure we use in testing. It is currently empty.
+*/
+typedef struct hash_test_st hash_test_st;
+
+struct hash_test_st
+{
+  bool _unused;
+};
+
+static test_return_t init_test(void *)
+{
+  hashkit_st hashk;
+  hashkit_st *hashk_ptr;
+
+  hashk_ptr= hashkit_create(&hashk);
+  test_true(hashk_ptr);
+  test_true(hashk_ptr == &hashk);
+  test_false(hashkit_is_allocated(hashk_ptr));
+
+  hashkit_free(hashk_ptr);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t allocation_test(void *)
+{
+  hashkit_st *hashk_ptr;
+
+  hashk_ptr= hashkit_create(NULL);
+  test_true(hashk_ptr);
+  test_true(hashkit_is_allocated(hashk_ptr));
+  hashkit_free(hashk_ptr);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t clone_test(hashkit_st *hashk)
+{
+  // First we make sure that the testing system is giving us what we expect.
+  test_true(&global_hashk == hashk);
+
+  // Second we test if hashk is even valid
+
+  /* All null? */
+  {
+    hashkit_st *hashk_ptr;
+    hashk_ptr= hashkit_clone(NULL, NULL);
+    test_true(hashk_ptr);
+    test_true(hashkit_is_allocated(hashk_ptr));
+    hashkit_free(hashk_ptr);
+  }
+
+  /* Can we init from null? */
+  {
+    hashkit_st *hashk_ptr;
+
+    hashk_ptr= hashkit_clone(NULL, hashk);
+
+    test_true(hashk_ptr);
+    test_true(hashkit_is_allocated(hashk_ptr));
+
+    hashkit_free(hashk_ptr);
+  }
+
+  /* Can we init from struct? */
+  {
+    hashkit_st declared_clone;
+    hashkit_st *hash_clone;
+
+    hash_clone= hashkit_clone(&declared_clone, NULL);
+    test_true(hash_clone);
+    test_true(hash_clone == &declared_clone);
+    test_false(hashkit_is_allocated(hash_clone));
+
+    hashkit_free(hash_clone);
+  }
+
+  /* Can we init from struct? */
+  {
+    hashkit_st declared_clone;
+    hashkit_st *hash_clone;
+
+    hash_clone= hashkit_clone(&declared_clone, hashk);
+    test_true(hash_clone);
+    test_true(hash_clone == &declared_clone);
+    test_false(hashkit_is_allocated(hash_clone));
+
+    hashkit_free(hash_clone);
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t one_at_a_time_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(one_at_a_time_values[x],
+                 libhashkit_one_at_a_time(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t md5_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(md5_values[x],
+                 libhashkit_md5(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t crc_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(crc_values[x],
+                 libhashkit_crc32(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fnv1_64_run (hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_FNV1_64));
+
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1_64_values[x],
+                 libhashkit_fnv1_64(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fnv1a_64_run (hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_FNV1A_64));
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1a_64_values[x],
+                 libhashkit_fnv1a_64(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fnv1_32_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1_32_values[x],
+                 libhashkit_fnv1_32(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t fnv1a_32_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1a_32_values[x],
+                 libhashkit_fnv1a_32(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t hsieh_run (hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_HSIEH));
+
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(hsieh_values[x],
+                 libhashkit_hsieh(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t murmur3_TEST(hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR3));
+
+#ifdef WORDS_BIGENDIAN
+  (void)murmur3_values;
+  return TEST_SKIPPED;
+#else
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(murmur3_values[x],
+                 libhashkit_murmur3(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+#endif
+}
+
+static test_return_t murmur_run (hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR));
+
+#ifdef WORDS_BIGENDIAN
+  (void)murmur_values;
+  return TEST_SKIPPED;
+#else
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(murmur_values[x],
+                 libhashkit_murmur(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+#endif
+}
+
+static test_return_t jenkins_run (hashkit_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(jenkins_values[x],
+                 libhashkit_jenkins(*ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+
+
+
+/**
+  @brief now we list out the tests.
+*/
+
+test_st allocation[]= {
+  {"init", 0, (test_callback_fn*)init_test},
+  {"create and free", 0, (test_callback_fn*)allocation_test},
+  {"clone", 0, (test_callback_fn*)clone_test},
+  {0, 0, 0}
+};
+
+static test_return_t hashkit_digest_test(hashkit_st *hashk)
+{
+  test_true(hashkit_digest(hashk, "a", sizeof("a")));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t hashkit_set_function_test(hashkit_st *hashk)
+{
+  for (int algo= int(HASHKIT_HASH_DEFAULT); algo < int(HASHKIT_HASH_MAX); algo++)
+  {
+    uint32_t x;
+    const char **ptr;
+    uint32_t *list;
+
+    test_skip(true, libhashkit_has_algorithm(static_cast<hashkit_hash_algorithm_t>(algo)));
+
+    hashkit_return_t rc= hashkit_set_function(hashk, static_cast<hashkit_hash_algorithm_t>(algo));
+
+    test_compare_got(HASHKIT_SUCCESS, rc, hashkit_strerror(NULL, rc));
+
+    switch (algo)
+    {
+    case HASHKIT_HASH_DEFAULT:
+      list= one_at_a_time_values;
+      break;
+
+    case HASHKIT_HASH_MD5:
+      list= md5_values;
+      break;
+
+    case HASHKIT_HASH_CRC:
+      list= crc_values;
+      break;
+
+    case HASHKIT_HASH_FNV1_64:
+      list= fnv1_64_values;
+      break;
+
+    case HASHKIT_HASH_FNV1A_64:
+      list= fnv1a_64_values;
+      break;
+
+    case HASHKIT_HASH_FNV1_32:
+      list= fnv1_32_values;
+      break;
+
+    case HASHKIT_HASH_FNV1A_32:
+      list= fnv1a_32_values;
+      break;
+
+    case HASHKIT_HASH_HSIEH:
+      list= hsieh_values;
+      break;
+
+    case HASHKIT_HASH_MURMUR:
+      list= murmur_values;
+      break;
+
+    case HASHKIT_HASH_JENKINS:
+      list= jenkins_values;
+      break;
+
+    case HASHKIT_HASH_CUSTOM:
+    case HASHKIT_HASH_MAX:
+    default:
+      list= NULL;
+      break;
+    }
+
+    // Now we make sure we did set the hash correctly.
+    if (list)
+    {
+      for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+      {
+        test_compare(list[x],
+                     hashkit_digest(hashk, *ptr, strlen(*ptr)));
+      }
+    }
+    else
+    {
+      return TEST_FAILURE;
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+static uint32_t hash_test_function(const char *string, size_t string_length, void *)
+{
+  return libhashkit_md5(string, string_length);
+}
+
+static test_return_t hashkit_set_custom_function_test(hashkit_st *hashk)
+{
+  uint32_t x;
+  const char **ptr;
+
+
+  test_compare(HASHKIT_SUCCESS, 
+               hashkit_set_custom_function(hashk, hash_test_function, NULL));
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(md5_values[x], 
+                 hashkit_digest(hashk, *ptr, strlen(*ptr)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t hashkit_set_distribution_function_test(hashkit_st *hashk)
+{
+  for (int algo= int(HASHKIT_HASH_DEFAULT); algo < int(HASHKIT_HASH_MAX); algo++)
+  {
+    hashkit_return_t rc= hashkit_set_distribution_function(hashk, static_cast<hashkit_hash_algorithm_t>(algo));
+
+    /* Hsieh is disabled most of the time for patent issues */
+    if (rc == HASHKIT_INVALID_ARGUMENT)
+      continue;
+
+    test_compare(HASHKIT_SUCCESS, rc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t hashkit_set_custom_distribution_function_test(hashkit_st *hashk)
+{
+  test_compare(HASHKIT_SUCCESS,
+               hashkit_set_custom_distribution_function(hashk, hash_test_function, NULL));
+
+  return TEST_SUCCESS;
+}
+
+
+static test_return_t hashkit_get_function_test(hashkit_st *hashk)
+{
+  for (int algo= int(HASHKIT_HASH_DEFAULT); algo < int(HASHKIT_HASH_MAX); algo++)
+  {
+
+    if (HASHKIT_HASH_CUSTOM)
+    {
+      continue;
+    }
+    test_skip(true, libhashkit_has_algorithm(static_cast<hashkit_hash_algorithm_t>(algo)));
+
+    test_compare(HASHKIT_SUCCESS,
+                 hashkit_set_function(hashk, static_cast<hashkit_hash_algorithm_t>(algo)));
+
+    test_compare(hashkit_get_function(hashk), algo);
+  }
+  return TEST_SUCCESS;
+}
+
+static test_return_t hashkit_compare_test(hashkit_st *hashk)
+{
+  hashkit_st *clone= hashkit_clone(NULL, hashk);
+
+  test_true(hashkit_compare(clone, hashk));
+  hashkit_free(clone);
+
+  return TEST_SUCCESS;
+}
+
+test_st hashkit_st_functions[] ={
+  {"hashkit_digest", 0, (test_callback_fn*)hashkit_digest_test},
+  {"hashkit_set_function", 0, (test_callback_fn*)hashkit_set_function_test},
+  {"hashkit_set_custom_function", 0, (test_callback_fn*)hashkit_set_custom_function_test},
+  {"hashkit_get_function", 0, (test_callback_fn*)hashkit_get_function_test},
+  {"hashkit_set_distribution_function", 0, (test_callback_fn*)hashkit_set_distribution_function_test},
+  {"hashkit_set_custom_distribution_function", 0, (test_callback_fn*)hashkit_set_custom_distribution_function_test},
+  {"hashkit_compare", 0, (test_callback_fn*)hashkit_compare_test},
+  {0, 0, 0}
+};
+
+static test_return_t libhashkit_digest_test(hashkit_st *)
+{
+  test_true(libhashkit_digest("a", sizeof("a"), HASHKIT_HASH_DEFAULT));
+
+  return TEST_SUCCESS;
+}
+
+test_st library_functions[] ={
+  {"libhashkit_digest", 0, (test_callback_fn*)libhashkit_digest_test},
+  {0, 0, 0}
+};
+
+test_st hash_tests[] ={
+  {"one_at_a_time", 0, (test_callback_fn*)one_at_a_time_run },
+  {"md5", 0, (test_callback_fn*)md5_run },
+  {"crc", 0, (test_callback_fn*)crc_run },
+  {"fnv1_64", 0, (test_callback_fn*)fnv1_64_run },
+  {"fnv1a_64", 0, (test_callback_fn*)fnv1a_64_run },
+  {"fnv1_32", 0, (test_callback_fn*)fnv1_32_run },
+  {"fnv1a_32", 0, (test_callback_fn*)fnv1a_32_run },
+  {"hsieh", 0, (test_callback_fn*)hsieh_run },
+  {"murmur", 0, (test_callback_fn*)murmur_run },
+  {"murmur3", 0, (test_callback_fn*)murmur3_TEST },
+  {"jenkis", 0, (test_callback_fn*)jenkins_run },
+  {0, 0, (test_callback_fn*)0}
+};
+
+/*
+ * The following test suite is used to verify that we don't introduce
+ * regression bugs. If you want more information about the bug / test,
+ * you should look in the bug report at
+ *   http://bugs.launchpad.net/libmemcached
+ */
+test_st regression[]= {
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"allocation", 0, 0, allocation},
+  {"hashkit_st_functions", 0, 0, hashkit_st_functions},
+  {"library_functions", 0, 0, library_functions},
+  {"hashing", 0, 0, hash_tests},
+  {"regression", 0, 0, regression},
+  {0, 0, 0, 0}
+};
+
+static void *world_create(libtest::server_startup_st&, test_return_t& error)
+{
+  hashkit_st *hashk_ptr= hashkit_create(&global_hashk);
+
+  if (hashk_ptr != &global_hashk)
+  {
+    error= TEST_FAILURE;
+    return NULL;
+  }
+
+  if (hashkit_is_allocated(hashk_ptr) == true)
+  {
+    error= TEST_FAILURE;
+    return NULL;
+  }
+
+  return hashk_ptr;
+}
+
+
+static bool world_destroy(void *object)
+{
+  hashkit_st *hashk= (hashkit_st *)object;
+  // Did we get back what we expected?
+  test_true(hashkit_is_allocated(hashk) == false);
+  hashkit_free(&global_hashk);
+
+  return TEST_SUCCESS;
+}
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+  world->destroy(world_destroy);
+}
@@ -1,336 +1,159 @@
 # 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
 
-TESTS_LDADDS = libmemcached/libmemcached.la
-
-VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes
-
-DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
-
-PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole
-
-if BUILD_LIBMEMCACHEDUTIL
+TESTS_LDADDS=
+TESTS_LDADDS+= libmemcached/libmemcached.la
 TESTS_LDADDS+= libmemcached/libmemcachedutil.la
-endif
-
-noinst_HEADERS+= \
-		 tests/hash_results.h \
-		 tests/ketama_test_cases.h \
-		 tests/ketama_test_cases_spy.h \
-		 tests/libmemcached_world.h \
-		 tests/server.h \
-		 tests/test.h
-
-noinst_PROGRAMS+= \
-		  tests/atomsmasher \
-		  tests/hashplus \
-		  tests/memplus \
-		  tests/startservers \
-		  tests/testapp \
-		  tests/testhashkit \
-		  tests/testplus \
-		  tests/testudp
-
-noinst_LTLIBRARIES+= tests/libserver.la
-tests_libserver_la_SOURCES= tests/server.c
-
-noinst_LTLIBRARIES+= tests/libtest.la
-tests_libtest_la_SOURCES= tests/test.c
-
-tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-tests_testapp_SOURCES= tests/mem_functions.c
-tests_testapp_DEPENDENCIES= \
-			    $(BUILT_SOURCES) \
-			    clients/libgenexec.la \
-			    tests/libserver.la \
-			    tests/libtest.la \
-			    libmemcached/libmemcachedinternal.la \
-			    $(TESTS_LDADDS)
-tests_testapp_LDADD= clients/libgenexec.la \
-		     tests/libserver.la \
-		     tests/libtest.la \
-		     libmemcached/libmemcachedinternal.la \
-		     $(TESTS_LDADDS) $(LIBSASL)
-
-tests_testplus_SOURCES= tests/plus.cpp
-tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_testplus_DEPENDENCIES= tests/libtest.la tests/libserver.la $(TESTS_LDADDS)
-tests_testplus_LDADD= $(tests_testplus_DEPENDENCIES) $(LIBSASL)
-
-tests_atomsmasher_SOURCES= tests/atomsmasher.c
-tests_atomsmasher_DEPENDENCIES= \
-				clients/libgenexec.la \
-				tests/libserver.la \
-				tests/libtest.la \
-				$(TESTS_LDADDS)
-tests_atomsmasher_LDADD= $(tests_atomsmasher_DEPENDENCIES) $(LIBSASL)
-
-tests_testudp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-tests_testudp_SOURCES= tests/mem_udp.c
-tests_testudp_DEPENDENCIES= \
-			    clients/libgenexec.la \
-			    tests/libserver.la \
-			    tests/libtest.la \
-			    $(TESTS_LDADDS)
-tests_testudp_LDADD= $(tests_testudp_DEPENDENCIES) $(LIBSASL)
-
-tests_startservers_SOURCES= tests/start.c
-tests_startservers_DEPENDENCIES= tests/libserver.la $(TESTS_LDADDS)
-tests_startservers_LDADD= $(tests_startservers_DEPENDENCIES) $(LIBSASL)
-
-tests_testhashkit_SOURCES = tests/hashkit_functions.c
-tests_testhashkit_DEPENDENCIES = tests/libtest.la libhashkit/libhashkit.la
-tests_testhashkit_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
-
-tests_hashplus_SOURCES = tests/hash_plus.cc
-tests_hashplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_hashplus_DEPENDENCIES = $(tests_testhashkit_DEPENDENCIES)
-tests_hashplus_LDADD = $(tests_testhashkit_DEPENDENCIES) $(LIBSASL)
-
-tests_memplus_SOURCES = tests/mem_plus.cc
-tests_memplus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX)
-tests_memplus_DEPENDENCIES = tests/libtest.la tests/libserver.la libmemcached/libmemcached.la
-tests_memplus_LDADD = $(tests_memplus_DEPENDENCIES) $(LIBSASL)
+TESTS_LDADDS+= libtest/libtest.la
+
+EXTRA_DIST+= tests/cpp_example.cc
+
+noinst_HEADERS+= tests/exist.h
+noinst_HEADERS+= tests/hash_results.h
+noinst_HEADERS+= tests/keys.hpp
+noinst_HEADERS+= tests/libmemcached_test_container.h
+noinst_HEADERS+= tests/libmemcached_world.h
+noinst_HEADERS+= tests/libmemcached_world_socket.h
+noinst_HEADERS+= tests/memc.hpp
+noinst_HEADERS+= tests/runner.h
+
+# Cycle should always run first
+tests_cycle_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
+tests_cycle_CXXFLAGS= $(AM_CXXFLAGS)
+tests_cycle_CXXFLAGS+= @PTHREAD_CFLAGS@
+tests_cycle_SOURCES= tests/cycle.cc
+tests_cycle_LDADD= $(TESTS_LDADDS)
+tests_cycle_LDADD+= @PTHREAD_LIBS@
+check_PROGRAMS+= tests/cycle
+noinst_PROGRAMS+= tests/cycle
+
+include tests/libmemcached-1.0/include.am
+
+include tests/parser.am
+
+tests_failure_SOURCES=
+tests_failure_SOURCES+= tests/failure.cc
+tests_failure_SOURCES+= clients/execute.cc
+tests_failure_SOURCES+= clients/generator.cc
+tests_failure_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_failure_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_failure_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_failure_SOURCES+= tests/libmemcached-1.0/print.cc
+
+tests_failure_CXXFLAGS = $(AM_CXXFLAGS)
+tests_failure_LDADD= $(TESTS_LDADDS)
+check_PROGRAMS+= tests/failure
+noinst_PROGRAMS+= tests/failure
+
+test-failure: tests/failure
+	@tests/failure
+
+gdb-failure: tests/failure
+	@$(GDB_COMMAND) tests/failure
+
+tests_testhashkit_SOURCES= tests/hashkit_functions.cc
+tests_testhashkit_LDADD= libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS)
+check_PROGRAMS+= tests/testhashkit
+noinst_PROGRAMS+= tests/testhashkit
 
-test: check
+test-hash: tests/testhashkit
+	@tests/testhashkit
 
-check-local: $(TEST_DOCS) test-mem test-hash memcapable
-	@echo "Tests completed"
-
-test-x: check-local test-plus test-memcat test-memcp test-memrm test-memerror test-memdump test-memflush test-memstat
-	@echo "Tests completed"
-
-memcapable: clients/memcapable
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcapable -p 12555 || echo "Your memcached server does not support all commands"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memcat: clients/memcat clients/memcp
-	@echo "Testing memcat"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" `pwd`/clients/memcp
-	@clients/memcat --servers="localhost:12555" memcp > `pwd`/tests/scratch
-	@clients/memcat --servers="localhost:12555" --file=`pwd`/tests/scratch2 memcp
-#	@diff clients/memcp tests/scratch
-	@cat `pwd`/tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm `pwd`/tests/Xumemc.pid
-	@rm `pwd`/tests/scratch
-	@rm `pwd`/tests/scratch2
-
-valgrind-memcat: clients/memcat clients/memcp
-	@echo "Testing memcat"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcp
-	@$(VALGRIND_COMMAND) clients/memcat --servers="localhost:12555" memcp > tests/scratch
-#	@diff clients/memcp tests/scratch
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-	@rm tests/scratch
-
-test-memcp: clients/memcp
-	@echo "Testing memcp"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memcp: clients/memcat clients/memcp
-	@echo "Testing memcp"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memcp --servers="localhost:12555" clients/memcp clients/memcat clients/memstat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memrm: clients/memrm clients/memcp
-	@echo "Testing memrm"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@clients/memrm --servers="localhost:12555" memcat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memrm: clients/memcat clients/memcp
-	@echo "Testing memrm"
-	@@MEMC_BINARY@ -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@$(VALGRIND_COMMAND) clients/memrm --servers="localhost:12555" memcat
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memflush: clients/memflush
-	@echo "Testing memflush"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memflush --servers="localhost:12555"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memflush: clients/memflush
-	@echo "Testing memflush"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memflush --servers="localhost:12555"
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memdump: clients/memdump clients/memcp
-	@echo "Testing memdump"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@clients/memdump --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memdump: clients/memcat clients/memcp
-	@echo "Testing memdump"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memcp --servers="localhost:12555" clients/memcat
-	@$(VALGRIND_COMMAND) clients/memdump --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memstat: clients/memstat
-	@echo "Testing memstat"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@clients/memstat --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-valgrind-memstat: clients/memstat
-	@echo "Testing memstat"
-	@$(MEMC_BINARY) -d -u root -P `pwd`/tests/Xumemc.pid -p 12555
-	@$(VALGRIND_COMMAND) clients/memstat --servers="localhost:12555" > /dev/null
-	@cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server"
-	@rm tests/Xumemc.pid
-
-test-memerror: clients/memerror
-	@echo "Testing memerror"
-	@clients/memerror 0 > /dev/null
-
-valgrind-memerror: clients/memerror
-	@echo "Testing memerror"
-	@$(VALGRIND_COMMAND) clients/memerror 0 > /dev/null
-
-
-
-
-
-MEMSLAP_COMMAND= clients/memslap $(COLLECTION) $(SUITE)
-
-MEM_COMMAND= tests/testapp $(COLLECTION) $(SUITE)
-
-TESTPLUS_COMMAND= tests/testplus $(COLLECTION) $(SUITE)
-
-MEMPLUS_COMMAND= tests/memplus $(COLLECTION) $(SUITE)
-
-HASHPLUS_COMMAND= tests/hashplus $(COLLECTION) $(SUITE)
-
-ATOM_COMMAND= tests/atomsmasher $(COLLECTION) $(SUITE)
 
-UDP_COMMAND= tests/testudp $(COLLECTION) $(SUITE)
+tests_hash_plus_SOURCES= tests/hash_plus.cc
+tests_hash_plus_CXXFLAGS= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_hash_plus_LDADD= $(tests_testhashkit_LDADD)
+check_PROGRAMS+= tests/hash_plus
+noinst_PROGRAMS+= tests/hash_plus
 
-HASH_COMMAND= tests/testhashkit $(COLLECTION) $(SUITE)
+include tests/cli.am
 
-test-mem: tests/testapp
-	$(MEM_COMMAND)
+test: check
 
-test-udp: tests/testudp
-	$(UDP_COMMAND)
+test-mem: tests/libmemcached-1.0/testapp
+	@tests/libmemcached-1.0/testapp
 
 test-atom: tests/atomsmasher
-	$(ATOM_COMMAND)
+	@tests/atomsmasher
 
-test-plus: tests/testplus
-	$(TESTPLUS_COMMAND)
+test-hashplus: tests/hash_plus
+	@tests/hash_plus
 
-test-hash: tests/testhashkit
-	$(HASH_COMMAND)
+test-cycle: tests/cycle
+	@tests/cycle
 
-test-hashplus: tests/hashplus
-	$(HASHPLUS_COMMAND)
+test-memcapable: tests/memcapable
+	@tests/memcapable
 
-test-memplus: tests/memplus
-	$(MEMPLUS_COMMAND)
+valgrind-memcapable: tests/memcapable
+	$(VALGRIND_COMMAND) tests/memcapable
 
 pahole-mem: tests/testapp
-	$(PAHOLE_COMMAND)  $(MEM_COMMAND)
+	@$(PAHOLE_COMMAND)  tests/testapp
 
-gdb-mem: tests/testapp
-	$(DEBUG_COMMAND)  $(MEM_COMMAND)
+pahole-hash: tests/testhashkit
+	@$(PAHOLE_COMMAND)  tests/testhashkit
 
-gdb-atom: tests/atomsmasher
-	$(DEBUG_COMMAND)  $(UDP_COMMAND)
-
-gdb-udp: tests/testudp
-	$(DEBUG_COMMAND)  $(ATOM_COMMAND)
+gdb-mem: tests/libmemcached-1.0/testapp
+	@$(GDB_COMMAND)  tests/libmemcached-1.0/testapp
 
-gdb-plus: tests/testplus
-	$(DEBUG_COMMAND)  $(TESTPLUS_COMMAND)
+gdb-atom: tests/atomsmasher
+	@$(GDB_COMMAND) tests/atomsmasher
 
 gdb-hash: tests/testhashkit
-	$(DEBUG_COMMAND) $(HASH_COMMAND)
+	@$(GDB_COMMAND) tests/testhashkit
 
-gdb-hashplus: tests/hashplus
-	$(DEBUG_COMMAND) $(HASHPLUS_COMMAND)
+gdb-hashplus: tests/hash_plus
+	@$(GDB_COMMAND) tests/hash_plus
 
-gdb-memplus: tests/memplus
-	$(DEBUG_COMMAND) $(MEMPLUS_COMMAND)
+gdb-cycle: tests/cycle
+	@$(GDB_COMMAND) tests/cycle
 
-gdb-memslap: clients/memslap
-	$(DEBUG_COMMAND)  $(MEMSLAP_COMMAND)
+valgrind-cycle: tests/cycle
+	$(VALGRIND_COMMAND) tests/cycle
 
-valgrind-mem: tests/testapp
-	$(VALGRIND_COMMAND)  $(MEM_COMMAND)
+valgrind-mem: tests/libmemcached-1.0/testapp
+	@$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp
 
-valgrind-atom: tests/atomsmasher
-	$(VALGRIND_COMMAND)  $(ATOM_COMMAND)
+valgrind-failure: tests/failure
+	@$(VALGRIND_COMMAND) tests/failure
 
-valgrind-udp: tests/testudp
-	$(VALGRIND_COMMAND)  $(UDP_COMMAND)
+valgrind-atom: tests/atomsmasher
+	$(VALGRIND_COMMAND) tests/atomsmasher
 
-valgrind-plus: tests/testplus
-	$(VALGRIND_COMMAND)  $(TESTPLUS_COMMAND)
+valgrind-sasl: tests/sasl
+	@$(VALGRIND_COMMAND) tests/sasl
 
 valgrind-hash: tests/testhashkit
-	$(VALGRIND_COMMAND) $(HASH_COMMAND)
-
-valgrind-hashplus: tests/hashplus
-	$(VALGRIND_COMMAND) $(HASHPLUS_COMMAND)
-
-valgrind-memplus: tests/memplus
-	$(VALGRIND_COMMAND) $(MEMPLUS_COMMAND)
+	@$(VALGRIND_COMMAND) tests/testhashkit
 
-valgrind-memslap: clients/memslap
-	$(VALGRIND_COMMAND) $(MEMSLAP_COMMAND)
+valgrind-hashplus: tests/hash_plus
+	@$(VALGRIND_COMMAND) tests/hash_plus
 
-PHONY += valgrind
-valgrind: tests/testapp tests/testhashkit valgrind-mem valgrind-hash valgrind-memcat valgrind-memcp valgrind-memrm valgrind-memerror valgrind-memdump valgrind-memflush valgrind-memstat
+helgrind-cycle: tests/cycle
+	@$(HELGRIND_COMMAND) tests/cycle
 
-PHONY += cachegrind
-CLEANFILES += tests/cachegrind.out
-cachegrind:
-	rm -f tests/cachegrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=cachegrind --cachegrind-out-file=tests/cachegrind.out.%p --branch-sim=yes tests/testapp
-	cg_annotate tests/cachegrind.out.* --auto=yes > tests/cachegrind.out
+helgrind-mem: tests/libmemcached-1.0/testapp
+	@$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp
 
-PHONY += callgrind
-CLEANFILES += tests/callgrind.out
-callgrind:
-	rm -f tests/callgrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=callgrind --callgrind-out-file=tests/callgrind.out.%p  tests/testapp
-	callgrind_annotate tests/callgrind.out.* --auto=yes > tests/callgrind.out
+helgrind-atom: tests/atomsmasher
+	@$(HELGRIND_COMMAND) tests/atomsmasher
 
-PHONY += helgrind
-CLEANFILES+= helgrind.out.*
-helgrind:
-	rm -f helgrind.out.*
-	$(LIBTOOL) --mode=execute valgrind --tool=helgrind  tests/testapp
+helgrind-hash: tests/testhashkit
+	@$(HELGRIND_COMMAND) tests/testhashkit
 
-PHONY += helgrind-slap
-helgrind-slap:
-	$(LIBTOOL) --mode=execute valgrind --tool=helgrind  clients/memslap --server=localhost --concurrency=30
+helgrind-hashplus: tests/hash_plus
+	@$(HELGRIND_COMMAND) tests/hash_plus
 
-test-no-outputdiff: test
+drd-mem: tests/libmemcached-1.0/testapp 
+	@$(DRD_COMMAND) tests/libmemcached-1.0/testapp
 
-hudson-valgrind: tests/testapp
-	$(VALGRIND_COMMAND) --log-file=tests/valgrind.out $(MEM_COMMAND)
+drd-cycle: tests/cycle
+	@$(DRD_COMMAND) tests/cycle
@@ -0,0 +1,42 @@
+/*  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
+
+test_return_t auto_eject_hosts(memcached_st *);
+test_return_t ketama_compatibility_libmemcached(memcached_st *);
+test_return_t ketama_compatibility_spymemcached(memcached_st *);
+test_return_t user_supplied_bug18(memcached_st *);
@@ -6,8 +6,7 @@
  * the COPYING file in the parent directory for full text.
  */
 
-#ifndef TESTS_KETAMA_TEST_CASES_H
-#define TESTS_KETAMA_TEST_CASES_H
+#pragma once
 
 static struct {
     const char *key;
@@ -117,5 +116,3 @@ static struct {
 };
 
 #include "ketama_test_cases_spy.h"
-
-#endif
@@ -6,8 +6,7 @@
  * the COPYING file in the parent directory for full text.
  */
 
-#ifndef TESTS_KETAMA_TEST_CASES_SPY_H
-#define TESTS_KETAMA_TEST_CASES_SPY_H
+#pragma once
 
 static struct {
     const char *key;
@@ -115,4 +114,3 @@ static struct {
   { "\\MQ_XNT7L-", 1259349383UL, 1259509450UL, "10.0.1.5" },
   { "VD6D0]ba_\\", 3842502950UL, 3842588691UL, "10.0.1.7" },
 };
-#endif
@@ -0,0 +1,145 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached 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.
+ *
+ */
+
+
+#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H
+#include <uuid/uuid.h>
+#endif
+
+struct keys_st {
+public:
+  keys_st(size_t arg)
+  {
+    init(arg, UUID_STRING_MAXLENGTH);
+  }
+
+  keys_st(size_t arg, size_t padding)
+  {
+    init(arg, padding);
+  }
+
+  void init(size_t arg, size_t padding)
+  {
+    _lengths.resize(arg);
+    _keys.resize(arg);
+
+    for (size_t x= 0; x < _keys.size(); x++)
+    {
+      libtest::vchar_t key_buffer;
+      key_buffer.resize(padding +1);
+      memset(&key_buffer[0], 'x', padding);
+
+#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H
+      if (HAVE_UUID_UUID_H)
+      {
+        uuid_t out;
+        uuid_generate(out);
+
+        uuid_unparse(out, &key_buffer[0]);
+        _keys[x]= strdup(&key_buffer[0]);
+        (_keys[x])[UUID_STRING_MAXLENGTH]= 'x';
+      }
+      else // We just use a number and pad the string if UUID is not available
+#endif
+      {
+        char int_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+        int key_length= snprintf(int_buffer, sizeof(int_buffer), "%u", uint32_t(x));
+        memcpy(&key_buffer[0], int_buffer, key_length);
+        _keys[x]= strdup(&key_buffer[0]);
+      }
+      _lengths[x]= padding;
+    }
+  }
+
+  ~keys_st()
+  {
+    for (libtest::vchar_ptr_t::iterator iter= _keys.begin();
+         iter != _keys.end();
+         ++iter)
+    {
+      ::free(*iter);
+    }
+  }
+
+  libtest::vchar_ptr_t::iterator begin()
+  {
+    return _keys.begin();
+  }
+
+  libtest::vchar_ptr_t::iterator end()
+  {
+    return _keys.end();
+  }
+
+  size_t size() const
+  {
+    return _keys.size();
+  }
+
+  std::vector<size_t>& lengths()
+  {
+    return _lengths;
+  }
+
+  libtest::vchar_ptr_t& keys()
+  {
+    return _keys;
+  }
+
+  size_t* lengths_ptr()
+  {
+    return &_lengths[0];
+  }
+
+  char** keys_ptr()
+  {
+    return &_keys[0];
+  }
+
+  char* key_at(size_t arg)
+  {
+    return _keys[arg];
+  }
+
+  size_t length_at(size_t arg)
+  {
+    return _lengths[arg];
+  }
+
+private:
+    libtest::vchar_ptr_t _keys;
+    std::vector<size_t> _lengths;
+};
@@ -0,0 +1,97 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include "tests/basic.h"
+#include "tests/debug.h"
+#include "tests/deprecated.h"
+#include "tests/error_conditions.h"
+#include "tests/exist.h"
+#include "tests/ketama.h"
+#include "tests/namespace.h"
+#include "tests/libmemcached-1.0/dump.h"
+#include "tests/libmemcached-1.0/generate.h"
+#include "tests/libmemcached-1.0/haldenbrand.h"
+#include "tests/libmemcached-1.0/parser.h"
+#include "tests/libmemcached-1.0/stat.h"
+#include "tests/touch.h"
+#include "tests/callbacks.h"
+#include "tests/pool.h"
+#include "tests/print.h"
+#include "tests/replication.h"
+#include "tests/server_add.h"
+#include "tests/virtual_buckets.h"
+
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+
+
+#include "tests/libmemcached-1.0/mem_functions.h"
+#include "tests/libmemcached-1.0/encoding_key.h"
+
+/* Collections we are running */
+#include "tests/libmemcached-1.0/all_tests.h"
+
+#include "tests/libmemcached_world.h"
+
+#include <algorithm>
+
+void get_world(libtest::Framework* world)
+{
+  if (getenv("LIBMEMCACHED_SERVER_NUMBER"))
+  {
+    unsigned long int set_count= strtoul(getenv("LIBMEMCACHED_SERVER_NUMBER"), (char **) NULL, 10);
+    fatal_assert(set_count >= 1);
+    world->servers().set_servers_to_run(set_count);
+  }
+  else
+  {
+    // Assume a minimum of 3, and a maximum of 8
+    world->servers().set_servers_to_run((libtest::number_of_cpus() > 3) ? 
+                                        std::min(libtest::number_of_cpus(), size_t(8)) : 3);
+  }
+
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+
+  world->set_socket();
+}
@@ -0,0 +1,524 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+#include "tests/libmemcached-1.0/memcached_get.h"
+
+
+/* Clean the server before beginning testing */
+test_st tests[] ={
+  {"util_version", true, (test_callback_fn*)util_version_test },
+  {"flush", false, (test_callback_fn*)flush_test },
+  {"init", false, (test_callback_fn*)init_test },
+  {"allocation", false, (test_callback_fn*)allocation_test },
+  {"server_list_null_test", false, (test_callback_fn*)server_list_null_test},
+  {"server_unsort", false, (test_callback_fn*)server_unsort_test},
+  {"server_sort", false, (test_callback_fn*)server_sort_test},
+  {"server_sort2", false, (test_callback_fn*)server_sort2_test},
+  {"memcached_server_remove", false, (test_callback_fn*)memcached_server_remove_test},
+  {"clone_test", false, (test_callback_fn*)clone_test },
+  {"connection_test", false, (test_callback_fn*)connection_test},
+  {"callback_test", false, (test_callback_fn*)callback_test},
+  {"userdata_test", false, (test_callback_fn*)userdata_test},
+  {"memcached_set()", false, (test_callback_fn*)set_test },
+  {"memcached_set() 2", false, (test_callback_fn*)set_test2 },
+  {"memcached_set() 3", false, (test_callback_fn*)set_test3 },
+  {"memcached_add(SUCCESS)", true, (test_callback_fn*)memcached_add_SUCCESS_TEST },
+  {"add", true, (test_callback_fn*)add_test },
+  {"memcached_fetch_result(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_fetch_result_NOT_FOUND },
+  {"replace", true, (test_callback_fn*)replace_test },
+  {"delete", true, (test_callback_fn*)delete_test },
+  {"memcached_get()", true, (test_callback_fn*)get_test },
+  {"get2", false, (test_callback_fn*)get_test2 },
+  {"get3", false, (test_callback_fn*)get_test3 },
+  {"get4", false, (test_callback_fn*)get_test4 },
+  {"partial mget", false, (test_callback_fn*)get_test5 },
+  {"stats_servername", false, (test_callback_fn*)stats_servername_test },
+  {"increment", false, (test_callback_fn*)increment_test },
+  {"memcached_increment_with_initial(0)", true, (test_callback_fn*)increment_with_initial_test },
+  {"memcached_increment_with_initial(999)", true, (test_callback_fn*)increment_with_initial_999_test },
+  {"decrement", false, (test_callback_fn*)decrement_test },
+  {"memcached_decrement_with_initial(3)", true, (test_callback_fn*)decrement_with_initial_test },
+  {"memcached_decrement_with_initial(999)", true, (test_callback_fn*)decrement_with_initial_999_test },
+  {"increment_by_key", false, (test_callback_fn*)increment_by_key_test },
+  {"increment_with_initial_by_key", true, (test_callback_fn*)increment_with_initial_by_key_test },
+  {"decrement_by_key", false, (test_callback_fn*)decrement_by_key_test },
+  {"decrement_with_initial_by_key", true, (test_callback_fn*)decrement_with_initial_by_key_test },
+  {"binary_increment_with_prefix", true, (test_callback_fn*)binary_increment_with_prefix_test },
+  {"quit", false, (test_callback_fn*)quit_test },
+  {"mget", true, (test_callback_fn*)mget_test },
+  {"mget_result", true, (test_callback_fn*)mget_result_test },
+  {"mget_result_alloc", true, (test_callback_fn*)mget_result_alloc_test },
+  {"mget_result_function", true, (test_callback_fn*)mget_result_function },
+  {"mget_execute", true, (test_callback_fn*)mget_execute },
+  {"mget_end", false, (test_callback_fn*)mget_end },
+  {"get_stats", false, (test_callback_fn*)get_stats },
+  {"add_host_test", false, (test_callback_fn*)add_host_test },
+  {"add_host_test_1", false, (test_callback_fn*)add_host_test1 },
+  {"get_stats_keys", false, (test_callback_fn*)get_stats_keys },
+  {"version_string_test", true, (test_callback_fn*)version_string_test},
+  {"memcached_mget() mixed memcached_get()", true, (test_callback_fn*)memcached_mget_mixed_memcached_get_TEST},
+  {"bad_key", true, (test_callback_fn*)bad_key_test },
+  {"memcached_server_cursor", true, (test_callback_fn*)memcached_server_cursor_test },
+  {"read_through", true, (test_callback_fn*)read_through },
+  {"delete_through", true, (test_callback_fn*)test_MEMCACHED_CALLBACK_DELETE_TRIGGER },
+  {"noreply", true, (test_callback_fn*)noreply_test},
+  {"analyzer", true, (test_callback_fn*)analyzer_test},
+  {"memcached_pool_st", true, (test_callback_fn*)connection_pool_test },
+  {"memcached_pool_st #2", true, (test_callback_fn*)connection_pool2_test },
+#if 0
+  {"memcached_pool_st #3", true, (test_callback_fn*)connection_pool3_test },
+#endif
+  {"memcached_pool_test", true, (test_callback_fn*)memcached_pool_test },
+  {"test_get_last_disconnect", true, (test_callback_fn*)test_get_last_disconnect},
+  {"verbosity", true, (test_callback_fn*)test_verbosity},
+  {"memcached_stat_execute", true, (test_callback_fn*)memcached_stat_execute_test},
+  {"memcached_exist(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_exist_NOTFOUND },
+  {"memcached_exist(MEMCACHED_SUCCESS)", true, (test_callback_fn*)memcached_exist_SUCCESS },
+  {"memcached_exist_by_key(MEMCACHED_NOTFOUND)", true, (test_callback_fn*)memcached_exist_by_key_NOTFOUND },
+  {"memcached_exist_by_key(MEMCACHED_SUCCESS)", true, (test_callback_fn*)memcached_exist_by_key_SUCCESS },
+  {"memcached_touch", 0, (test_callback_fn*)test_memcached_touch},
+  {"memcached_touch_with_prefix", 0, (test_callback_fn*)test_memcached_touch_by_key},
+#if 0
+  {"memcached_dump() no data", true, (test_callback_fn*)memcached_dump_TEST },
+#endif
+  {"memcached_dump() with data", true, (test_callback_fn*)memcached_dump_TEST2 },
+  {0, 0, 0}
+};
+
+test_st touch_tests[] ={
+  {"memcached_touch", 0, (test_callback_fn*)test_memcached_touch},
+  {"memcached_touch_with_prefix", 0, (test_callback_fn*)test_memcached_touch_by_key},
+  {0, 0, 0}
+};
+
+test_st kill_TESTS[] ={
+  {"kill(HUP)", 0, (test_callback_fn*)kill_HUP_TEST},
+  {0, 0, 0}
+};
+
+test_st memcached_stat_tests[] ={
+  {"memcached_stat() INVALID ARG", 0, (test_callback_fn*)memcached_stat_TEST},
+  {"memcached_stat()", 0, (test_callback_fn*)memcached_stat_TEST2},
+  {0, 0, 0}
+};
+
+test_st behavior_tests[] ={
+  {"libmemcached_string_behavior()", false, (test_callback_fn*)libmemcached_string_behavior_test},
+  {"libmemcached_string_distribution()", false, (test_callback_fn*)libmemcached_string_distribution_test},
+  {"behavior_test", false, (test_callback_fn*)behavior_test},
+  {"MEMCACHED_BEHAVIOR_CORK", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_CORK_test},
+  {"MEMCACHED_BEHAVIOR_TCP_KEEPALIVE", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test},
+  {"MEMCACHED_BEHAVIOR_TCP_KEEPIDLE", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test},
+  {"MEMCACHED_BEHAVIOR_POLL_TIMEOUT", false, (test_callback_fn*)MEMCACHED_BEHAVIOR_POLL_TIMEOUT_test},
+  {"MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH_TEST", true, (test_callback_fn*)MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH_TEST },
+  {"MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY", false, (test_callback_fn*)test_MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY},
+  {0, 0, 0}
+};
+
+test_st libmemcachedutil_tests[] ={
+  {"libmemcached_util_ping()", true, (test_callback_fn*)libmemcached_util_ping_TEST },
+  {"libmemcached_util_getpid()", true, (test_callback_fn*)getpid_test },
+  {"libmemcached_util_getpid(MEMCACHED_CONNECTION_FAILURE)", true, (test_callback_fn*)getpid_connection_failure_test },
+  {0, 0, 0}
+};
+
+test_st basic_tests[] ={
+  {"init", true, (test_callback_fn*)basic_init_test},
+  {"clone", true, (test_callback_fn*)basic_clone_test},
+  {"reset", true, (test_callback_fn*)basic_reset_stack_test},
+  {"reset heap", true, (test_callback_fn*)basic_reset_heap_test},
+  {"reset stack clone", true, (test_callback_fn*)basic_reset_stack_clone_test},
+  {"reset heap clone", true, (test_callback_fn*)basic_reset_heap_clone_test},
+  {"memcached_return_t", false, (test_callback_fn*)memcached_return_t_TEST },
+  {"c++ memcached_st == memcached_return_t", false, (test_callback_fn*)comparison_operator_memcached_st_and__memcached_return_t_TEST },
+  {0, 0, 0}
+};
+
+test_st regression_binary_vs_block[] ={
+  {"block add", true, (test_callback_fn*)block_add_regression},
+  {"binary add", true, (test_callback_fn*)binary_add_regression},
+  {0, 0, 0}
+};
+
+test_st async_tests[] ={
+  {"add", true, (test_callback_fn*)add_wrapper },
+  {0, 0, 0}
+};
+
+test_st memcached_server_get_last_disconnect_tests[] ={
+  {"memcached_server_get_last_disconnect()", false, (test_callback_fn*)test_multiple_get_last_disconnect},
+  {0, 0, (test_callback_fn*)0}
+};
+
+
+test_st result_tests[] ={
+  {"result static", false, (test_callback_fn*)result_static},
+  {"result alloc", false, (test_callback_fn*)result_alloc},
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st version_1_2_3[] ={
+  {"append", false, (test_callback_fn*)append_test },
+  {"prepend", false, (test_callback_fn*)prepend_test },
+  {"cas", false, (test_callback_fn*)cas_test },
+  {"cas2", false, (test_callback_fn*)cas2_test },
+  {"append_binary", false, (test_callback_fn*)append_binary_test },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st haldenbrand_TESTS[] ={
+  {"memcached_set", false, (test_callback_fn*)haldenbrand_TEST1 },
+  {"memcached_get()", false, (test_callback_fn*)haldenbrand_TEST2 },
+  {"memcached_mget()", false, (test_callback_fn*)haldenbrand_TEST3 },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st user_tests[] ={
+  {"user_supplied_bug4", true, (test_callback_fn*)user_supplied_bug4 },
+  {"user_supplied_bug5", true, (test_callback_fn*)user_supplied_bug5 },
+  {"user_supplied_bug6", true, (test_callback_fn*)user_supplied_bug6 },
+  {"user_supplied_bug7", true, (test_callback_fn*)user_supplied_bug7 },
+  {"user_supplied_bug8", true, (test_callback_fn*)user_supplied_bug8 },
+  {"user_supplied_bug9", true, (test_callback_fn*)user_supplied_bug9 },
+  {"user_supplied_bug10", true, (test_callback_fn*)user_supplied_bug10 },
+  {"user_supplied_bug11", true, (test_callback_fn*)user_supplied_bug11 },
+  {"user_supplied_bug12", true, (test_callback_fn*)user_supplied_bug12 },
+  {"user_supplied_bug13", true, (test_callback_fn*)user_supplied_bug13 },
+  {"user_supplied_bug14", true, (test_callback_fn*)user_supplied_bug14 },
+  {"user_supplied_bug15", true, (test_callback_fn*)user_supplied_bug15 },
+  {"user_supplied_bug16", true, (test_callback_fn*)user_supplied_bug16 },
+#if !defined(__sun) && !defined(__OpenBSD__)
+  /*
+   ** It seems to be something weird with the character sets..
+   ** value_fetch is unable to parse the value line (iscntrl "fails"), so I
+   ** guess I need to find out how this is supposed to work.. Perhaps I need
+   ** to run the test in a specific locale (I tried zh_CN.UTF-8 without success,
+   ** so just disable the code for now...).
+ */
+  {"user_supplied_bug17", true, (test_callback_fn*)user_supplied_bug17 },
+#endif
+  {"user_supplied_bug18", true, (test_callback_fn*)user_supplied_bug18 },
+  {"user_supplied_bug19", true, (test_callback_fn*)user_supplied_bug19 },
+  {"user_supplied_bug20", true, (test_callback_fn*)user_supplied_bug20 },
+  {"user_supplied_bug21", true, (test_callback_fn*)user_supplied_bug21 },
+  {"wrong_failure_counter_test", true, (test_callback_fn*)wrong_failure_counter_test},
+  {"wrong_failure_counter_two_test", true, (test_callback_fn*)wrong_failure_counter_two_test},
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st replication_tests[]= {
+  {"validate replication setup", true, (test_callback_fn*)check_replication_sanity_TEST },
+  {"set", true, (test_callback_fn*)replication_set_test },
+  {"get", false, (test_callback_fn*)replication_get_test },
+  {"mget", false, (test_callback_fn*)replication_mget_test },
+  {"delete", true, (test_callback_fn*)replication_delete_test },
+  {"rand_mget", false, (test_callback_fn*)replication_randomize_mget_test },
+  {"miss", false, (test_callback_fn*)replication_miss_test },
+  {"fail", false, (test_callback_fn*)replication_randomize_mget_fail_test },
+  {0, 0, (test_callback_fn*)0}
+};
+
+/*
+ * The following test suite is used to verify that we don't introduce
+ * regression bugs. If you want more information about the bug / test,
+ * you should look in the bug report at
+ *   http://bugs.launchpad.net/libmemcached
+ */
+test_st regression_tests[]= {
+  {"lp:434484", true, (test_callback_fn*)regression_bug_434484 },
+  {"lp:434843", true, (test_callback_fn*)regression_bug_434843 },
+  {"lp:434843-buffered", true, (test_callback_fn*)regression_bug_434843_buffered },
+  {"lp:421108", true, (test_callback_fn*)regression_bug_421108 },
+  {"lp:442914", true, (test_callback_fn*)regression_bug_442914 },
+  {"lp:447342", true, (test_callback_fn*)regression_bug_447342 },
+  {"lp:463297", true, (test_callback_fn*)regression_bug_463297 },
+  {"lp:490486", true, (test_callback_fn*)regression_bug_490486 },
+  {"lp:583031", true, (test_callback_fn*)regression_bug_583031 },
+  {"lp:?", true, (test_callback_fn*)regression_bug_ },
+  {"lp:728286", true, (test_callback_fn*)regression_bug_728286 },
+  {"lp:581030", true, (test_callback_fn*)regression_bug_581030 },
+  {"lp:71231153 connect()", true, (test_callback_fn*)regression_bug_71231153_connect },
+  {"lp:71231153 poll()", true, (test_callback_fn*)regression_bug_71231153_poll },
+  {"lp:655423", true, (test_callback_fn*)regression_bug_655423 },
+  {"lp:490520", true, (test_callback_fn*)regression_bug_490520 },
+  {"lp:854604", true, (test_callback_fn*)regression_bug_854604 },
+  {"lp:996813", true, (test_callback_fn*)regression_996813_TEST },
+  {"lp:994772", true, (test_callback_fn*)regression_994772_TEST },
+  {"lp:1009493", true, (test_callback_fn*)regression_1009493_TEST },
+  {"lp:1021819", true, (test_callback_fn*)regression_1021819_TEST },
+  {"lp:1048945", true, (test_callback_fn*)regression_1048945_TEST },
+  {"lp:1067242", true, (test_callback_fn*)regression_1067242_TEST },
+  {"lp:1251482", true, (test_callback_fn*)regression_bug_1251482 },
+  {0, false, (test_callback_fn*)0}
+};
+
+test_st ketama_compatibility[]= {
+  {"libmemcached", true, (test_callback_fn*)ketama_compatibility_libmemcached },
+  {"spymemcached", true, (test_callback_fn*)ketama_compatibility_spymemcached },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st generate_tests[] ={
+  {"generate_data", true, (test_callback_fn*)generate_data },
+  {"get_read", false, (test_callback_fn*)get_read },
+  {"delete_generate", false, (test_callback_fn*)delete_generate },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs },
+  {0, 0, (test_callback_fn*)0}
+};
+  // New start
+test_st generate_mget_TESTS[] ={
+  {"generate_data", true, (test_callback_fn*)generate_data },
+  {"mget_read", false, (test_callback_fn*)mget_read },
+  {"mget_read_result", false, (test_callback_fn*)mget_read_result },
+  {"memcached_fetch_result() use internal result", false, (test_callback_fn*)mget_read_internal_result },
+  {"memcached_fetch_result() partial read", false, (test_callback_fn*)mget_read_partial_result },
+  {"mget_read_function", false, (test_callback_fn*)mget_read_function },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st generate_large_TESTS[] ={
+  {"generate_large_pairs", true, (test_callback_fn*)generate_large_pairs },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st consistent_tests[] ={
+  {"generate_data", true, (test_callback_fn*)generate_data },
+  {"get_read", 0, (test_callback_fn*)get_read_count },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st consistent_weighted_tests[] ={
+  {"generate_data", true, (test_callback_fn*)generate_data_with_stats },
+  {"get_read", false, (test_callback_fn*)get_read_count },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st hsieh_availability[] ={
+  {"hsieh_avaibility_test", false, (test_callback_fn*)hsieh_avaibility_test},
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st murmur_availability[] ={
+  {"murmur_avaibility_test", false, (test_callback_fn*)murmur_avaibility_test},
+  {0, 0, (test_callback_fn*)0}
+};
+
+#if 0
+test_st hash_sanity[] ={
+  {"hash sanity", 0, (test_callback_fn*)hash_sanity_test},
+  {0, 0, (test_callback_fn*)0}
+};
+#endif
+
+test_st ketama_auto_eject_hosts[] ={
+  {"basic ketama test", true, (test_callback_fn*)ketama_TEST },
+  {"auto_eject_hosts", true, (test_callback_fn*)auto_eject_hosts },
+  {"output_ketama_weighted_keys", true, (test_callback_fn*)output_ketama_weighted_keys },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st hash_tests[] ={
+  {"one_at_a_time_run", false, (test_callback_fn*)one_at_a_time_run },
+  {"md5", false, (test_callback_fn*)md5_run },
+  {"crc", false, (test_callback_fn*)crc_run },
+  {"fnv1_64", false, (test_callback_fn*)fnv1_64_run },
+  {"fnv1a_64", false, (test_callback_fn*)fnv1a_64_run },
+  {"fnv1_32", false, (test_callback_fn*)fnv1_32_run },
+  {"fnv1a_32", false, (test_callback_fn*)fnv1a_32_run },
+  {"hsieh", false, (test_callback_fn*)hsieh_run },
+  {"murmur", false, (test_callback_fn*)murmur_run },
+  {"murmur3", false, (test_callback_fn*)murmur3_TEST },
+  {"jenkis", false, (test_callback_fn*)jenkins_run },
+  {"memcached_get_hashkit", false, (test_callback_fn*)memcached_get_hashkit_test },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st error_conditions[] ={
+  {"memcached_get(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_MEMCACHED_ERRNO },
+  {"memcached_get(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_MEMCACHED_NOTFOUND },
+  {"memcached_get_by_key(MEMCACHED_ERRNO)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_ERRNO },
+  {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
+  {"memcached_get_by_key(MEMCACHED_NOTFOUND)", false, (test_callback_fn*)memcached_get_by_key_MEMCACHED_NOTFOUND },
+  {"memcached_increment(MEMCACHED_NO_SERVERS)", false, (test_callback_fn*)memcached_increment_MEMCACHED_NO_SERVERS },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st parser_tests[] ={
+  {"behavior", false, (test_callback_fn*)behavior_parser_test },
+  {"boolean_options", false, (test_callback_fn*)parser_boolean_options_test },
+  {"configure_file", false, (test_callback_fn*)memcached_create_with_options_with_filename },
+  {"distribtions", false, (test_callback_fn*)parser_distribution_test },
+  {"hash", false, (test_callback_fn*)parser_hash_test },
+  {"libmemcached_check_configuration", false, (test_callback_fn*)libmemcached_check_configuration_test },
+  {"libmemcached_check_configuration_with_filename", false, (test_callback_fn*)libmemcached_check_configuration_with_filename_test },
+  {"number_options", false, (test_callback_fn*)parser_number_options_test },
+  {"randomly generated options", false, (test_callback_fn*)random_statement_build_test },
+  {"namespace", false, (test_callback_fn*)parser_key_prefix_test },
+  {"server", false, (test_callback_fn*)server_test },
+  {"bad server strings", false, (test_callback_fn*)servers_bad_test },
+  {"server with weights", false, (test_callback_fn*)server_with_weight_test },
+  {"parsing servername, port, and weight", false, (test_callback_fn*)test_hostname_port_weight },
+  {"--socket=", false, (test_callback_fn*)test_parse_socket },
+  {"--namespace=", false, (test_callback_fn*)test_namespace_keyword },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st virtual_bucket_tests[] ={
+  {"basic", false, (test_callback_fn*)virtual_back_map },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st memcached_server_add_TESTS[] ={
+  {"memcached_server_add(\"\")", false, (test_callback_fn*)memcached_server_add_empty_test },
+  {"memcached_server_add(NULL)", false, (test_callback_fn*)memcached_server_add_null_test },
+  {"memcached_server_add(many)", false, (test_callback_fn*)memcached_server_many_TEST },
+  {"memcached_server_add(many weighted)", false, (test_callback_fn*)memcached_server_many_weighted_TEST },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st pool_TESTS[] ={
+  {"lp:962815", true, (test_callback_fn*)regression_bug_962815 },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st memcached_set_encoding_key_TESTS[] ={
+  {"memcached_set_encoding_key()", true, (test_callback_fn*)memcached_set_encoding_key_TEST },
+  {"memcached_set_encoding_key() +set() + get()", true, (test_callback_fn*)memcached_set_encoding_key_set_get_TEST },
+  {"memcached_set_encoding_key() +add() + get()", true, (test_callback_fn*)memcached_set_encoding_key_add_get_TEST },
+  {"memcached_set_encoding_key() +replace() + get()", true, (test_callback_fn*)memcached_set_encoding_key_replace_get_TEST },
+  {"memcached_set_encoding_key() +prepend()", true, (test_callback_fn*)memcached_set_encoding_key_prepend_TEST },
+  {"memcached_set_encoding_key() +append()", true, (test_callback_fn*)memcached_set_encoding_key_append_TEST },
+  {"memcached_set_encoding_key() +increment()", true, (test_callback_fn*)memcached_set_encoding_key_increment_TEST },
+  {"memcached_set_encoding_key() +decrement()", true, (test_callback_fn*)memcached_set_encoding_key_increment_TEST },
+  {"memcached_set_encoding_key() +increment_with_initial()", true, (test_callback_fn*)memcached_set_encoding_key_increment_with_initial_TEST },
+  {"memcached_set_encoding_key() +decrement_with_initial()", true, (test_callback_fn*)memcached_set_encoding_key_decrement_with_initial_TEST },
+  {"memcached_set_encoding_key() +set() +get() +cloen()", true, (test_callback_fn*)memcached_set_encoding_key_set_get_clone_TEST },
+  {"memcached_set_encoding_key() +set() +get() increase value size", true, (test_callback_fn*)memcached_set_encoding_key_set_grow_key_TEST },
+  {0, 0, (test_callback_fn*)0}
+};
+
+test_st namespace_tests[] ={
+  {"basic tests", true, (test_callback_fn*)selection_of_namespace_tests },
+  {"increment", true, (test_callback_fn*)memcached_increment_namespace },
+  {0, 0, (test_callback_fn*)0}
+};
+
+collection_st collection[] ={
+#if 0
+  {"hash_sanity", 0, 0, hash_sanity},
+#endif
+  {"libmemcachedutil", 0, 0, libmemcachedutil_tests},
+  {"basic", 0, 0, basic_tests},
+  {"hsieh_availability", 0, 0, hsieh_availability},
+  {"murmur_availability", 0, 0, murmur_availability},
+  {"memcached_server_add", (test_callback_fn*)memcached_servers_reset_SETUP, 0, memcached_server_add_TESTS},
+  {"memcached_server_add(MEMCACHED_DISTRIBUTION_CONSISTENT)", (test_callback_fn*)memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_SETUP, 0, memcached_server_add_TESTS},
+  {"memcached_server_add(MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED)", (test_callback_fn*)memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED_SETUP, 0, memcached_server_add_TESTS},
+  {"block", 0, 0, tests},
+  {"binary", (test_callback_fn*)pre_binary, 0, tests},
+  {"nonblock", (test_callback_fn*)pre_nonblock, 0, tests},
+  {"nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
+  {"settimer", (test_callback_fn*)pre_settimer, 0, tests},
+  {"md5", (test_callback_fn*)pre_md5, 0, tests},
+  {"crc", (test_callback_fn*)pre_crc, 0, tests},
+  {"hsieh", (test_callback_fn*)pre_hsieh, 0, tests},
+  {"jenkins", (test_callback_fn*)pre_jenkins, 0, tests},
+  {"fnv1_64", (test_callback_fn*)pre_hash_fnv1_64, 0, tests},
+  {"fnv1a_64", (test_callback_fn*)pre_hash_fnv1a_64, 0, tests},
+  {"fnv1_32", (test_callback_fn*)pre_hash_fnv1_32, 0, tests},
+  {"fnv1a_32", (test_callback_fn*)pre_hash_fnv1a_32, 0, tests},
+  {"ketama", (test_callback_fn*)pre_behavior_ketama, 0, tests},
+  {"ketama_auto_eject_hosts", (test_callback_fn*)pre_behavior_ketama, 0, ketama_auto_eject_hosts},
+  {"unix_socket", (test_callback_fn*)pre_unix_socket, 0, tests},
+  {"unix_socket_nodelay", (test_callback_fn*)pre_nodelay, 0, tests},
+  {"gets", (test_callback_fn*)enable_cas, 0, tests},
+  {"consistent_crc", (test_callback_fn*)enable_consistent_crc, 0, tests},
+  {"consistent_hsieh", (test_callback_fn*)enable_consistent_hsieh, 0, tests},
+#ifdef MEMCACHED_ENABLE_DEPRECATED
+  {"deprecated_memory_allocators", (test_callback_fn*)deprecated_set_memory_alloc, 0, tests},
+#endif
+  {"memory_allocators", (test_callback_fn*)set_memory_alloc, 0, tests},
+  {"namespace", (test_callback_fn*)set_namespace, 0, tests},
+  {"namespace(BINARY)", (test_callback_fn*)set_namespace_and_binary, 0, tests},
+  {"specific namespace", 0, 0, namespace_tests},
+  {"specific namespace(BINARY)", (test_callback_fn*)pre_binary, 0, namespace_tests},
+  {"version_1_2_3", (test_callback_fn*)check_for_1_2_3, 0, version_1_2_3},
+  {"result", 0, 0, result_tests},
+  {"async", (test_callback_fn*)pre_nonblock, 0, async_tests},
+  {"async(BINARY)", (test_callback_fn*)pre_nonblock_binary, 0, async_tests},
+  {"Cal Haldenbrand's tests", 0, 0, haldenbrand_TESTS},
+  {"user written tests", 0, 0, user_tests},
+  {"generate", 0, 0, generate_tests},
+  {"generate MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", (test_callback_fn*)pre_buffer, 0, generate_tests},
+  {"mget generate MEMCACHED_BEHAVIOR_BUFFER_REQUESTS", (test_callback_fn*)pre_buffer, 0, generate_mget_TESTS},
+  {"generate large", 0, 0, generate_large_TESTS},
+  {"generate_hsieh", (test_callback_fn*)pre_hsieh, 0, generate_tests},
+  {"generate_ketama", (test_callback_fn*)pre_behavior_ketama, 0, generate_tests},
+  {"generate_hsieh_consistent", (test_callback_fn*)enable_consistent_hsieh, 0, generate_tests},
+  {"generate_md5", (test_callback_fn*)pre_md5, 0, generate_tests},
+  {"generate_murmur", (test_callback_fn*)pre_murmur, 0, generate_tests},
+  {"generate_jenkins", (test_callback_fn*)pre_jenkins, 0, generate_tests},
+  {"generate_nonblock", (test_callback_fn*)pre_nonblock, 0, generate_tests},
+  {"mget generate_nonblock", (test_callback_fn*)pre_nonblock, 0, generate_mget_TESTS},
+  {"consistent_not", 0, 0, consistent_tests},
+  {"consistent_ketama", (test_callback_fn*)pre_behavior_ketama, 0, consistent_tests},
+  {"consistent_ketama_weighted", (test_callback_fn*)pre_behavior_ketama_weighted, 0, consistent_weighted_tests},
+  {"ketama_compat", 0, 0, ketama_compatibility},
+  {"test_hashes", 0, 0, hash_tests},
+  {"replication", (test_callback_fn*)pre_replication, 0, replication_tests},
+  {"replication_noblock", (test_callback_fn*)pre_replication_noblock, 0, replication_tests},
+  {"regression", 0, 0, regression_tests},
+  {"behaviors", 0, 0, behavior_tests},
+  {"regression_binary_vs_block", (test_callback_fn*)key_setup, (test_callback_fn*)key_teardown, regression_binary_vs_block},
+  {"error_conditions", 0, 0, error_conditions},
+  {"parser", 0, 0, parser_tests},
+  {"virtual buckets", 0, 0, virtual_bucket_tests},
+  {"memcached_server_get_last_disconnect", 0, 0, memcached_server_get_last_disconnect_tests},
+  {"touch", 0, 0, touch_tests},
+  {"touch", (test_callback_fn*)pre_binary, 0, touch_tests},
+  {"memcached_stat()", 0, 0, memcached_stat_tests},
+  {"memcached_pool_create()", 0, 0, pool_TESTS},
+  {"memcached_set_encoding_key()", 0, 0, memcached_set_encoding_key_TESTS},
+  {"kill()", 0, 0, kill_TESTS},
+  {0, 0, 0, 0}
+};
@@ -0,0 +1,80 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include "tests/basic.h"
+#include "tests/debug.h"
+#include "tests/deprecated.h"
+#include "tests/error_conditions.h"
+#include "tests/exist.h"
+#include "tests/ketama.h"
+#include "tests/namespace.h"
+#include "tests/libmemcached-1.0/parser.h"
+#include "tests/libmemcached-1.0/dump.h"
+#include "tests/libmemcached-1.0/generate.h"
+#include "tests/libmemcached-1.0/haldenbrand.h"
+#include "tests/libmemcached-1.0/stat.h"
+#include "tests/touch.h"
+#include "tests/callbacks.h"
+#include "tests/pool.h"
+#include "tests/print.h"
+#include "tests/replication.h"
+#include "tests/server_add.h"
+#include "tests/virtual_buckets.h"
+
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+
+
+#include "tests/libmemcached-1.0/mem_functions.h"
+#include "tests/libmemcached-1.0/encoding_key.h"
+
+/* Collections we are running */
+#include "tests/libmemcached-1.0/all_tests.h"
+
+#include "tests/libmemcached_world_socket.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+}
@@ -0,0 +1,284 @@
+/* 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:
+ *
+ */
+
+/*
+  Sample test application.
+*/
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <stdint.h>
+#include <cstring>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <ctime>
+#include <clients/generator.h>
+#include <clients/execute.h>
+
+#include <libtest/server.h>
+
+#include <tests/debug.h>
+
+#include "tests/libmemcached-1.0/generate.h"
+
+using namespace libtest;
+
+/* Number of items generated for tests */
+#define GLOBAL_COUNT 100000
+
+/* Number of times to run the test loop */
+#define TEST_COUNTER 500000
+
+static pairs_st *global_pairs;
+static char *global_keys[GLOBAL_COUNT];
+static size_t global_keys_length[GLOBAL_COUNT];
+
+static test_return_t cleanup_pairs_TEST(memcached_st *)
+{
+  pairs_free(global_pairs);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t generate_pairs_TEST(memcached_st *)
+{
+  global_pairs= pairs_generate(GLOBAL_COUNT, 400);
+
+  for (ptrdiff_t x= 0; x < GLOBAL_COUNT; x++)
+  {
+    global_keys[x]= global_pairs[x].key;
+    global_keys_length[x]=  global_pairs[x].key_length;
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t drizzle_TEST(memcached_st *memc)
+{
+infinite:
+  for (ptrdiff_t x= 0; x < TEST_COUNTER; x++)
+  {
+    memcached_return_t rc;
+
+    uint32_t test_bit= (uint32_t)(random() % GLOBAL_COUNT);
+    uint8_t which= (uint8_t)(random() % 2);
+
+    if (which == 0)
+    {
+      size_t return_value_length;
+      uint32_t flags;
+      char* return_value= memcached_get(memc, global_keys[test_bit], global_keys_length[test_bit],
+                                        &return_value_length, &flags, &rc);
+      if (rc == MEMCACHED_SUCCESS && return_value)
+      {
+        free(return_value);
+      }
+      else if (rc == MEMCACHED_NOTFOUND)
+      {
+        continue;
+      }
+      else
+      {
+        test_compare(MEMCACHED_SUCCESS, rc);
+      }
+    }
+    else
+    {
+      rc= memcached_set(memc, global_pairs[test_bit].key,
+                        global_pairs[test_bit].key_length,
+                        global_pairs[test_bit].value,
+                        global_pairs[test_bit].value_length,
+                        0, 0);
+      if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
+      {
+        test_compare(MEMCACHED_SUCCESS, rc);
+      }
+    }
+  }
+
+  if (getenv("MEMCACHED_ATOM_BURIN_IN"))
+  {
+    goto infinite;
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t pre_nonblock(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0));
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Set the value, then quit to make sure it is flushed.
+  Come back in and test that add fails.
+*/
+static test_return_t add_test(memcached_st *memc)
+{
+  const char *key= "foo";
+  const char *value= "when we sanitize";
+
+  memcached_return_t rc= memcached_set(memc, key, strlen(key),
+                                       value, strlen(value),
+                                       time_t(0), uint32_t(0));
+  test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
+  memcached_quit(memc);
+  rc= memcached_add(memc, key, strlen(key),
+                    value, strlen(value),
+                    (time_t)0, (uint32_t)0);
+
+  if (rc == MEMCACHED_CONNECTION_FAILURE)
+  {
+    print_servers(memc);
+  }
+
+  /* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK))
+  {
+    test_true(rc == MEMCACHED_NOTSTORED or rc == MEMCACHED_STORED);
+  }
+  else
+  {
+    test_compare_got(MEMCACHED_NOTSTORED, rc, memcached_strerror(NULL, rc));
+  }
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * repeating add_tests many times
+ * may show a problem in timing
+ */
+static test_return_t many_adds(memcached_st *memc)
+{
+  test_true(memc);
+  for (ptrdiff_t x= 0; x < TEST_COUNTER; x++)
+  {
+    test_compare_got(TEST_SUCCESS, add_test(memc), x);
+  }
+  return TEST_SUCCESS;
+}
+
+test_st smash_tests[] ={
+  {"generate_pairs", true, (test_callback_fn*)generate_pairs_TEST },
+  {"drizzle", true, (test_callback_fn*)drizzle_TEST },
+  {"cleanup", true, (test_callback_fn*)cleanup_pairs_TEST },
+  {"many_adds", true, (test_callback_fn*)many_adds },
+  {0, 0, 0}
+};
+
+#define BENCHMARK_TEST_LOOP 20000
+
+struct benchmark_state_st
+{
+  bool create_init;
+  bool clone_init;
+  memcached_st *create;
+  memcached_st *clone;
+} benchmark_state;
+
+static test_return_t memcached_create_benchmark(memcached_st *)
+{
+  benchmark_state.create_init= true;
+
+  for (ptrdiff_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
+  {
+    memcached_st *ptr= memcached_create(&benchmark_state.create[x]);
+
+    test_true(ptr);
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t memcached_clone_benchmark(memcached_st *memc)
+{
+  benchmark_state.clone_init= true;
+
+  for (ptrdiff_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
+  {
+    memcached_st *ptr= memcached_clone(&benchmark_state.clone[x], memc);
+
+    test_true(ptr);
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t pre_allocate(memcached_st *)
+{
+  memset(&benchmark_state, 0, sizeof(benchmark_state));
+
+  benchmark_state.create= (memcached_st *)calloc(BENCHMARK_TEST_LOOP, sizeof(memcached_st));
+  test_true(benchmark_state.create);
+  benchmark_state.clone= (memcached_st *)calloc(BENCHMARK_TEST_LOOP, sizeof(memcached_st));
+  test_true(benchmark_state.clone);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t post_allocate(memcached_st *)
+{
+  for (ptrdiff_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
+  {
+    if (benchmark_state.create_init)
+    {
+      memcached_free(&benchmark_state.create[x]);
+    }
+
+    if (benchmark_state.clone_init)
+    {
+      memcached_free(&benchmark_state.clone[x]);
+    }
+  }
+
+  free(benchmark_state.create);
+  free(benchmark_state.clone);
+
+  return TEST_SUCCESS;
+}
+
+
+test_st micro_tests[] ={
+  {"memcached_create", 1, (test_callback_fn*)memcached_create_benchmark },
+  {"memcached_clone", 1, (test_callback_fn*)memcached_clone_benchmark },
+  {0, 0, 0}
+};
+
+
+collection_st collection[] ={
+  {"smash", 0, 0, smash_tests},
+  {"smash_nonblock", (test_callback_fn*)pre_nonblock, 0, smash_tests},
+  {"micro-benchmark", (test_callback_fn*)pre_allocate, (test_callback_fn*)post_allocate, micro_tests},
+  {0, 0, 0, 0}
+};
+
+
+#include "tests/libmemcached_world.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+}
@@ -0,0 +1,135 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+#include "libmemcached/is.h"
+
+#include "tests/basic.h"
+
+#include <cstring>
+
+test_return_t basic_init_test(memcached_st *junk)
+{
+  (void)junk;
+
+  memcached_st memc;
+  memcached_st *memc_ptr;
+
+  memc_ptr= memcached_create(&memc);
+  test_true(memc_ptr);
+  test_false(memcached_is_allocated(&memc));
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t basic_clone_test(memcached_st *memc)
+{
+  memcached_st *memc_ptr;
+
+  memc_ptr= memcached_clone(NULL, memc);
+  test_true(memc_ptr);
+  test_true(memcached_is_allocated(memc_ptr));
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t basic_reset_stack_test(memcached_st *junk)
+{
+  (void)junk;
+  memcached_st memc;
+
+  memcached_create(&memc);
+
+  memcached_reset(&memc);
+  test_false(memcached_is_allocated(&memc));
+
+  memcached_free(&memc);
+  test_false(memcached_is_allocated(&memc));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t basic_reset_heap_test(memcached_st *junk)
+{
+  (void)junk;
+  memcached_st *memc_ptr;
+
+  memc_ptr= memcached_create(NULL);
+  test_true(memcached_is_allocated(memc_ptr));
+
+  memcached_reset(memc_ptr);
+  test_true(memcached_is_allocated(memc_ptr));
+
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t basic_reset_stack_clone_test(memcached_st *memc)
+{
+  memcached_st clone;
+  memcached_st *memc_ptr;
+
+  memset(&clone, 0, sizeof(clone));
+  memc_ptr= memcached_clone(&clone, memc);
+  test_true(memc_ptr);
+
+  memcached_reset(memc_ptr);
+
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t basic_reset_heap_clone_test(memcached_st *memc)
+{
+  memcached_st *memc_ptr;
+
+  memc_ptr= memcached_clone(NULL, memc);
+  test_true(memc_ptr);
+
+  memcached_reset(memc_ptr);
+
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,51 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include "tests/libmemcached-1.0/callback_counter.h"
+
+memcached_return_t callback_counter(const memcached_st*, memcached_result_st*, void *context)
+{
+  size_t *counter= (size_t *)context;
+
+  *counter= *counter + 1;
+
+  return MEMCACHED_SUCCESS;
+}
+
@@ -0,0 +1,40 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+memcached_return_t callback_counter(const memcached_st*, memcached_result_st*, void *);
@@ -0,0 +1,87 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+#include <tests/callbacks.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static memcached_return_t delete_trigger(memcached_st *,
+                                         const char *key,
+                                         size_t key_length)
+{
+  fatal_assert(key);
+  fatal_assert(key_length);
+
+  return MEMCACHED_SUCCESS;
+}
+
+
+test_return_t test_MEMCACHED_CALLBACK_DELETE_TRIGGER_and_MEMCACHED_BEHAVIOR_NOREPLY(memcached_st *)
+{
+  memcached_st *memc= memcached(test_literal_param("--NOREPLY"));
+  test_true(memc);
+
+  memcached_trigger_delete_key_fn callback;
+
+  callback= (memcached_trigger_delete_key_fn)delete_trigger;
+
+  test_compare(MEMCACHED_INVALID_ARGUMENTS, 
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_DELETE_TRIGGER, *(void**)&callback));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_MEMCACHED_CALLBACK_DELETE_TRIGGER(memcached_st *memc)
+{
+  memcached_trigger_delete_key_fn callback;
+
+  callback= (memcached_trigger_delete_key_fn)delete_trigger;
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_DELETE_TRIGGER, *(void**)&callback));
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,206 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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 <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <climits>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+#include <tests/debug.h>
+#include <tests/print.h>
+
+#include "libmemcached/instance.hpp"
+
+/* Dump each server's keys */
+static memcached_return_t print_keys_callback(const memcached_st *,
+                                              const char *key,
+                                              size_t key_length,
+                                              void *)
+{
+
+  Out << "\t" << key << " (" << key_length << ")";
+  
+
+  return MEMCACHED_SUCCESS;
+}
+
+static memcached_return_t server_wrapper_for_dump_callback(const memcached_st *,
+                                                           const memcached_instance_st * server,
+                                                           void *)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  if (strcmp(memcached_server_type(server), "SOCKET") == 0)
+  {
+    if (memcached_failed(memcached_server_add_unix_socket(memc, memcached_server_name(server))))
+    {
+      return MEMCACHED_FAILURE;
+    }
+  }
+  else
+  {
+    if (memcached_failed(memcached_server_add(memc, memcached_server_name(server), memcached_server_port(server))))
+    {
+      return MEMCACHED_FAILURE;
+    }
+  }
+
+  memcached_dump_fn callbacks[1];
+
+  callbacks[0]= &print_keys_callback;
+
+  Out << memcached_server_name(server) << ":" << memcached_server_port(server);
+
+  if (memcached_failed(memcached_dump(memc, callbacks, NULL, 1)))
+  {
+    return MEMCACHED_FAILURE;
+  }
+
+  memcached_free(memc);
+
+  return MEMCACHED_SUCCESS;
+}
+
+
+test_return_t confirm_keys_exist(memcached_st *memc, const char * const *keys, const size_t number_of_keys, bool key_matches_value, bool require_all)
+{
+  for (size_t x= 0; x < number_of_keys; ++x)
+  {
+    memcached_return_t rc;
+    size_t value_length;
+    char *value= memcached_get(memc,
+                               test_string_make_from_cstr(keys[x]), // Keys
+                               &value_length,
+                               0, &rc);
+    if (require_all)
+    {
+      test_true(value);
+      if (key_matches_value)
+      {
+        test_strcmp(keys[x], value);
+      }
+    }
+    else if (memcached_success(rc))
+    {
+      test_warn(value, "get() did not return a value");
+      if (value and key_matches_value)
+      {
+        test_strcmp(keys[x], value);
+      }
+    }
+
+    if (value)
+    {
+      free(value);
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t confirm_keys_dont_exist(memcached_st *memc, const char * const *keys, const size_t number_of_keys)
+{
+  for (size_t x= 0; x < number_of_keys; ++x)
+  {
+    memcached_return_t rc;
+    size_t value_length;
+    char *value= memcached_get(memc,
+                               test_string_make_from_cstr(keys[x]), // Keys
+                               &value_length,
+                               0, &rc);
+    test_false(value);
+    test_compare(MEMCACHED_NOTFOUND, rc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t print_keys_by_server(memcached_st *memc)
+{
+  memcached_server_fn callback[]= { server_wrapper_for_dump_callback };
+  test_compare(MEMCACHED_SUCCESS, memcached_server_cursor(memc, callback, NULL, test_array_length(callback)));
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t callback_dump_counter(const memcached_st *ptr,
+                                                const char *key,
+                                                size_t key_length,
+                                                void *context)
+{
+  (void)ptr; (void)key; (void)key_length;
+  size_t *counter= (size_t *)context;
+
+  *counter= *counter + 1;
+
+  return MEMCACHED_SUCCESS;
+}
+
+size_t confirm_key_count(memcached_st *memc)
+{
+  memcached_st *clone= memcached_clone(NULL, memc);
+  if (memcached_failed(memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, false)))
+  {
+    memcached_free(clone);
+    return ULONG_MAX;
+  }
+
+  memcached_dump_fn callbacks[1];
+
+  callbacks[0]= &callback_dump_counter;
+
+  size_t count= 0;
+  if (memcached_failed(memcached_dump(clone, callbacks, (void *)&count, 1)))
+  {
+    memcached_free(clone);
+    return ULONG_MAX;
+  }
+
+  memcached_free(clone);
+  return count;
+}
+
+void print_servers(memcached_st *memc)
+{
+  memcached_server_fn callbacks[1];
+  callbacks[0]= server_print_callback;
+  memcached_server_cursor(memc, callbacks, NULL,  1);
+}
@@ -0,0 +1,74 @@
+/*  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 <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+#include <tests/deprecated.h>
+
+test_return_t server_list_null_test(memcached_st *ptr)
+{
+  memcached_server_st *server_list;
+  memcached_return_t rc;
+  (void)ptr;
+
+  server_list= memcached_server_list_append_with_weight(NULL, NULL, 0, 0, NULL);
+  test_true(server_list);
+  memcached_server_list_free(server_list);
+
+  server_list= memcached_server_list_append_with_weight(NULL, "localhost", 0, 0, NULL);
+  test_true(server_list);
+  memcached_server_list_free(server_list);
+
+  server_list= memcached_server_list_append_with_weight(NULL, NULL, 0, 0, &rc);
+  test_true(server_list);
+  memcached_server_list_free(server_list);
+
+  return TEST_SUCCESS;
+}
+
+// Look for memory leak
+test_return_t regression_bug_728286(memcached_st *)
+{
+  memcached_server_st *servers= memcached_servers_parse("1.2.3.4:99");
+  fatal_assert(servers);
+  memcached_server_free(servers);
+
+  return TEST_SUCCESS;
+}
+
@@ -0,0 +1,144 @@
+/*  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 <mem_config.h>
+
+#include <cstdlib>
+#include <climits>
+
+#include <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+using namespace libtest;
+
+#include "tests/libmemcached-1.0/dump.h"
+
+static memcached_return_t callback_dump_counter(const memcached_st *,
+                                                const char*, // key,
+                                                size_t, // length,
+                                                void *context)
+{
+  size_t *counter= (size_t *)context;
+
+#if 0
+  std::cerr.write(key, length);
+  std::cerr << std::endl;
+#endif
+
+  *counter= *counter +1;
+
+  return MEMCACHED_SUCCESS;
+}
+
+static memcached_return_t item_counter(const memcached_instance_st * ,
+                                       const char *key, size_t key_length,
+                                       const char *value, size_t, // value_length,
+                                       void *context)
+{
+  if ((key_length == (sizeof("curr_items") -1)) and (strncmp("curr_items", key, (sizeof("curr_items") -1)) == 0))
+  {
+    uint64_t* counter= (uint64_t*)context;
+    unsigned long number_value= strtoul(value, (char **)NULL, 10);
+    if (number_value == ULONG_MAX)
+    {
+      return MEMCACHED_FAILURE;
+    }
+    *counter= *counter +number_value;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+#if 0
+test_return_t memcached_dump_TEST(memcached_st *memc)
+{
+  test_skip(false, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  size_t count= 0;
+  memcached_dump_fn callbacks[1];
+  callbacks[0]= &callback_dump_counter;
+
+  uint64_t counter= 0;
+  test_compare_got(MEMCACHED_SUCCESS,
+                   memcached_stat_execute(memc, NULL, item_counter, &counter),
+                   memcached_last_error_message(memc));
+  test_zero(counter);
+
+  test_compare_got(MEMCACHED_SUCCESS, memcached_dump(memc, callbacks, &count, 1), memcached_last_error_message(memc));
+
+  return TEST_SUCCESS;
+}
+#endif
+
+#define memcached_dump_TEST2_COUNT 64
+test_return_t memcached_dump_TEST2(memcached_st *memc)
+{
+  test_skip(false, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  /* The dump test relies on there being at least 32 items in memcached */
+  for (uint32_t x= 0; x < memcached_dump_TEST2_COUNT; x++)
+  {
+    char key[1024];
+
+    int length= snprintf(key, sizeof(key), "%s%u", __func__, x);
+
+    test_true(length > 0);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, key, length,
+                               NULL, 0, // Zero length values
+                               time_t(0), uint32_t(0)));
+  }
+  memcached_quit(memc);
+
+  uint64_t counter= 0;
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_stat_execute(memc, NULL, item_counter, &counter));
+  test_true(counter > 0);
+
+  size_t count= 0;
+  memcached_dump_fn callbacks[1];
+  callbacks[0]= &callback_dump_counter;
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_dump(memc, callbacks, &count, 1));
+
+  test_true(count);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,40 @@
+/*  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
+
+test_return_t memcached_dump_TEST(memcached_st *);
+test_return_t memcached_dump_TEST2(memcached_st *);
@@ -0,0 +1,375 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+#include "tests/libmemcached-1.0/encoding_key.h"
+
+using namespace libtest;
+
+test_return_t memcached_set_encoding_key_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_set_get_TEST(memcached_st* memc)
+{
+  memcached_st *memc_no_crypt= memcached_clone(NULL, memc);
+  test_true(memc_no_crypt);
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc,
+                                                test_literal_param(__func__), // Key
+                                                test_literal_param(__func__), // Value
+                                                time_t(0),
+                                                uint32_t(0)));
+
+  {
+    memcached_return_t rc;
+    size_t value_length;
+    char *value;
+    test_true((value= memcached_get(memc,
+                                    test_literal_param(__func__), // Key
+                                    &value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(test_literal_param_size(__func__), value_length);
+    test_memcmp(__func__, value, value_length);
+
+    size_t raw_value_length;
+    char *raw_value;
+    test_true((raw_value= memcached_get(memc_no_crypt,
+                                        test_literal_param(__func__), // Key
+                                        &raw_value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_ne_compare(value_length, raw_value_length);
+    test_ne_compare(0, memcmp(value, raw_value, raw_value_length));
+
+    free(value);
+    free(raw_value);
+  }
+
+  memcached_free(memc_no_crypt);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_add_get_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_add(memc,
+                                                     test_literal_param(__func__), // Key
+                                                     test_literal_param(__func__), // Value
+                                                     time_t(0),
+                                                     uint32_t(0)));
+
+  {
+    memcached_return_t rc;
+    size_t value_length;
+    char *value;
+    test_true((value= memcached_get(memc,
+                                    test_literal_param(__func__), // Key
+                                    &value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(test_literal_param_size(__func__), value_length);
+    test_memcmp(__func__, value, value_length);
+    free(value);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_replace_get_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  // First we add the key
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_add(memc,
+                                                  test_literal_param(__func__), // Key
+                                                  test_literal_param(__func__), // Value
+                                                  time_t(0),
+                                                  uint32_t(0)));
+
+    memcached_return_t rc;
+    size_t value_length;
+    char *value;
+    test_true((value= memcached_get(memc,
+                                    test_literal_param(__func__), // Key
+                                    &value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(test_literal_param_size(__func__), value_length);
+    test_memcmp(__func__, value, value_length);
+    free(value);
+  }
+ 
+  // Then we replace the key
+  {
+    libtest::vchar_t new_value;
+    vchar::make(new_value);
+
+    test_compare(MEMCACHED_SUCCESS, memcached_replace(memc,
+                                                      test_literal_param(__func__), // Key
+                                                      vchar_param(new_value), // Value
+                                                      time_t(0),
+                                                      uint32_t(0)));
+
+    memcached_return_t rc;
+    size_t value_length;
+    char *value;
+    test_true((value= memcached_get(memc,
+                                    test_literal_param(__func__), // Key
+                                    &value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(new_value.size(), value_length);
+    test_compare(0, vchar::compare(new_value, value, value_length));
+    free(value);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_increment_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_increment(memc,
+                                                            test_literal_param(__func__), // Key
+                                                            uint32_t(0),
+                                                            NULL));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_decrement_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_decrement(memc,
+                                                            test_literal_param(__func__), // Key
+                                                            uint32_t(0),
+                                                            NULL));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_increment_with_initial_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_increment_with_initial(memc,
+                                                                         test_literal_param(__func__), // Key
+                                                                         uint32_t(0),
+                                                                         uint32_t(0),
+                                                                         time_t(0),
+                                                                         NULL));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_decrement_with_initial_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_decrement_with_initial(memc,
+                                                                         test_literal_param(__func__), // Key
+                                                                         uint32_t(0),
+                                                                         uint32_t(0),
+                                                                         time_t(0),
+                                                                         NULL));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_append_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_append(memc,
+                                                         test_literal_param(__func__), // Key
+                                                         test_literal_param(__func__), // Value
+                                                         time_t(0),
+                                                         uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_prepend_TEST(memcached_st* memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_prepend(memc,
+                                                         test_literal_param(__func__), // Key
+                                                         test_literal_param(__func__), // Value
+                                                         time_t(0),
+                                                         uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_set_get_clone_TEST(memcached_st* memc)
+{
+  memcached_st *memc_no_crypt= memcached_clone(NULL, memc);
+  test_true(memc_no_crypt);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+  
+  memcached_st *memc_crypt= memcached_clone(NULL, memc);
+  test_true(memc_crypt);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc,
+                                                     test_literal_param(__func__), // Key
+                                                     test_literal_param(__func__), // Value
+                                                     time_t(0),
+                                                     uint32_t(0)));
+
+  {
+    memcached_return_t rc;
+    size_t value_length;
+    char *value;
+    test_true((value= memcached_get(memc,
+                                    test_literal_param(__func__), // Key
+                                    &value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(test_literal_param_size(__func__), value_length);
+    test_memcmp(__func__, value, value_length);
+
+    /*
+      Check to make sure that the raw value is not the original.
+    */
+    size_t raw_value_length;
+    char *raw_value;
+    test_true((raw_value= memcached_get(memc_no_crypt,
+                                        test_literal_param(__func__), // Key
+                                        &raw_value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_ne_compare(test_literal_param_size(__func__), raw_value_length);
+    test_ne_compare(0, memcmp(__func__, raw_value, raw_value_length));
+
+    /*
+      Now we will use our clone, and make sure the encrypted values are the same.
+    */
+    size_t second_value_length;
+    char *second_value;
+    test_true((second_value= memcached_get(memc_crypt,
+                                           test_literal_param(__func__), // Key
+                                           &second_value_length, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(value_length, second_value_length);
+    test_compare(0, memcmp(value, second_value, second_value_length));
+    test_compare(test_literal_param_size(__func__), second_value_length);
+    test_compare(value_length, second_value_length);
+    test_memcmp(__func__, second_value, second_value_length);
+    test_memcmp(value, second_value, second_value_length);
+
+    free(value);
+    free(raw_value);
+    free(second_value);
+  }
+
+  memcached_free(memc_no_crypt);
+  memcached_free(memc_crypt);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_set_encoding_key_set_grow_key_TEST(memcached_st* memc)
+{
+  memcached_st *memc_no_crypt= memcached_clone(NULL, memc);
+  test_true(memc_no_crypt);
+  test_compare(MEMCACHED_SUCCESS, memcached_set_encoding_key(memc, test_literal_param(__func__)));
+
+  size_t payload_size[] = { 100, 1000, 10000, 1000000, 1000000, 0 };
+  libtest::vchar_t payload;
+  for (size_t *ptr= payload_size; *ptr; ptr++)
+  {
+    payload.reserve(*ptr);
+    for (size_t x= payload.size(); x < *ptr; x++)
+    { 
+      payload.push_back(rand());
+    }
+
+    {
+      memcached_return_t rc= memcached_set(memc,
+                                           test_literal_param(__func__), // Key
+                                           &payload[0], payload.size(), // Value
+                                           time_t(0),
+                                           uint32_t(0));
+
+      // If we run out of space on the server, we just end the test early.
+      if (rc == MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE)
+      {
+        break;
+      }
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+
+    {
+      memcached_return_t rc;
+      size_t value_length;
+      char *value;
+      test_true((value= memcached_get(memc,
+                                      test_literal_param(__func__), // Key
+                                      &value_length, NULL, &rc)));
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_compare(payload.size(), value_length);
+      test_memcmp(&payload[0], value, value_length);
+
+      size_t raw_value_length;
+      char *raw_value;
+      test_true((raw_value= memcached_get(memc_no_crypt,
+                                          test_literal_param(__func__), // Key
+                                          &raw_value_length, NULL, &rc)));
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_ne_compare(payload.size(), raw_value_length);
+      test_ne_compare(0, memcmp(&payload[0], raw_value, raw_value_length));
+
+      free(value);
+      free(raw_value);
+    }
+  }
+
+  memcached_free(memc_no_crypt);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,51 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t memcached_set_encoding_key_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_set_get_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_add_get_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_replace_get_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_increment_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_decrement_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_increment_with_initial_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_decrement_with_initial_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_prepend_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_append_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_set_get_clone_TEST(memcached_st*);
+test_return_t memcached_set_encoding_key_set_grow_key_TEST(memcached_st*);
@@ -0,0 +1,64 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+#define BUILDING_LIBMEMCACHED
+
+#include <libmemcached-1.0/memcached.h>
+#include "libmemcached/is.h"
+
+#include <tests/error_conditions.h>
+
+test_return_t memcached_increment_MEMCACHED_NO_SERVERS(memcached_st *)
+{
+  memcached_st *memc_ptr;
+
+  memc_ptr= memcached_create(NULL);
+  test_true(memc_ptr);
+
+  memcached_increment(memc_ptr, test_literal_param("dead key"), 1, NULL);
+  test_true(memcached_last_error(memc_ptr) == MEMCACHED_NO_SERVERS);
+
+  memcached_increment(memc_ptr, test_literal_param("dead key"), 1, NULL);
+  test_true(memcached_last_error(memc_ptr) == MEMCACHED_NO_SERVERS);
+
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,74 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+#include <tests/exist.h>
+
+using namespace libtest;
+
+test_return_t memcached_exist_NOTFOUND(memcached_st *memc)
+{
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("frog")));
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_exist_SUCCESS(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc, test_literal_param("frog"), 0, 0, 0, 0));
+  test_compare(MEMCACHED_SUCCESS, memcached_exist(memc, test_literal_param("frog")));
+  test_compare(MEMCACHED_SUCCESS, memcached_delete(memc, test_literal_param("frog"), 0));
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("frog")));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_exist_by_key_NOTFOUND(memcached_st *memc)
+{
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist_by_key(memc, test_literal_param("master"), test_literal_param("frog")));
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_exist_by_key_SUCCESS(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set_by_key(memc, test_literal_param("master"), test_literal_param("frog"), 0, 0, 0, 0));
+  test_compare(MEMCACHED_SUCCESS, memcached_exist_by_key(memc, test_literal_param("master"), test_literal_param("frog")));
+  test_compare(MEMCACHED_SUCCESS, memcached_delete_by_key(memc, test_literal_param("master"), test_literal_param("frog"), 0));
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist_by_key(memc, test_literal_param("master"), test_literal_param("frog")));
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,62 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include <tests/libmemcached-1.0/fetch_all_results.h>
+
+test_return_t fetch_all_results(memcached_st *memc, unsigned int &keys_returned, memcached_return_t& rc)
+{
+  keys_returned= 0;
+
+  memcached_result_st* result= NULL;
+  while ((result= memcached_fetch_result(memc, result, &rc)))
+  {
+    test_compare(MEMCACHED_SUCCESS, rc);
+    keys_returned+= 1;
+  }
+  memcached_result_free(result);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t fetch_all_results(memcached_st *memc, unsigned int &keys_returned)
+{
+  memcached_return_t rc;
+  return fetch_all_results(memc, keys_returned, rc);
+}
@@ -0,0 +1,41 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t fetch_all_results(memcached_st *, unsigned int&, memcached_return_t&);
+test_return_t fetch_all_results(memcached_st *, unsigned int&);
@@ -0,0 +1,396 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include <libmemcachedutil-1.0/util.h>
+#include <libmemcached/is.h>
+
+#include <tests/libmemcached-1.0/generate.h>
+#include <tests/libmemcached-1.0/fetch_all_results.h>
+#include "tests/libmemcached-1.0/callback_counter.h"
+
+#include "clients/generator.h"
+#include "clients/execute.h"
+
+#include "tests/memc.hpp"
+
+#ifdef __APPLE__
+# define GLOBAL_COUNT 3000
+#else
+# define GLOBAL_COUNT 10000
+#endif
+
+#define GLOBAL2_COUNT 100
+
+using namespace libtest;
+
+static pairs_st *global_pairs= NULL;
+static const char *global_keys[GLOBAL_COUNT];
+static size_t global_keys_length[GLOBAL_COUNT];
+static size_t global_count= 0;
+
+test_return_t cleanup_pairs(memcached_st*)
+{
+  pairs_free(global_pairs);
+  global_pairs= NULL;
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t generate_pairs(memcached_st *)
+{
+  global_pairs= pairs_generate(GLOBAL_COUNT, 400);
+
+  for (size_t x= 0; x < GLOBAL_COUNT; ++x)
+  {
+    global_keys[x]= global_pairs[x].key;
+    global_keys_length[x]=  global_pairs[x].key_length;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t generate_large_pairs(memcached_st *memc)
+{
+  global_pairs= pairs_generate(GLOBAL2_COUNT, MEMCACHED_MAX_BUFFER+10);
+
+  for (size_t x= 0; x < GLOBAL2_COUNT; x++)
+  {
+    global_keys[x]= global_pairs[x].key;
+    global_keys_length[x]=  global_pairs[x].key_length;
+  }
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true);
+  global_count= execute_set(memc, global_pairs, (unsigned int)GLOBAL2_COUNT);
+
+  ASSERT_TRUE(global_count > (GLOBAL2_COUNT / 2));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t generate_data(memcached_st *memc)
+{
+  test_compare(TEST_SUCCESS, generate_pairs(memc));
+
+  global_count= execute_set(memc, global_pairs, (unsigned int)GLOBAL_COUNT);
+
+  /* Possible false, positive, memcached may have ejected key/value based on
+   * memory needs. */
+
+  ASSERT_TRUE(global_count > (GLOBAL2_COUNT / 2));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t generate_data_with_stats(memcached_st *memc)
+{
+  test_compare(TEST_SUCCESS, generate_pairs(memc));
+
+  global_count= execute_set(memc, global_pairs, (unsigned int)GLOBAL2_COUNT);
+
+  ASSERT_EQ(global_count, GLOBAL2_COUNT);
+
+  // @todo hosts used size stats
+  memcached_return_t rc;
+  memcached_stat_st *stat_p= memcached_stat(memc, NULL, &rc);
+  test_true(stat_p);
+
+  for (uint32_t host_index= 0; host_index < memcached_server_count(memc); host_index++)
+  {
+    /* This test was changes so that "make test" would work properlly */
+    if (DEBUG)
+    {
+      const memcached_instance_st * instance=
+        memcached_server_instance_by_position(memc, host_index);
+
+      printf("\nserver %u|%s|%u bytes: %llu\n",
+             host_index,
+             memcached_server_name(instance),
+             memcached_server_port(instance),
+             (unsigned long long)(stat_p + host_index)->bytes);
+    }
+    test_true((unsigned long long)(stat_p + host_index)->bytes);
+  }
+
+  memcached_stat_free(NULL, stat_p);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t generate_buffer_data(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true);
+  generate_data(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_read_count(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+
+  memcached_server_add_with_weight(memc_clone, "localhost", 6666, 0);
+
+  {
+    char *return_value;
+    size_t return_value_length;
+    uint32_t flags;
+    uint32_t count;
+
+    for (size_t x= count= 0; x < global_count; ++x)
+    {
+      memcached_return_t rc;
+      return_value= memcached_get(memc_clone, global_keys[x], global_keys_length[x],
+                                  &return_value_length, &flags, &rc);
+      if (rc == MEMCACHED_SUCCESS)
+      {
+        count++;
+        if (return_value)
+        {
+          free(return_value);
+        }
+      }
+    }
+  }
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_read(memcached_st *memc)
+{
+  test::Memc clone(memc);
+  size_t keys_returned= 0;
+  for (size_t x= 0; x < global_count; ++x)
+  {
+    size_t return_value_length;
+    uint32_t flags;
+    memcached_return_t rc;
+    char *return_value= memcached_get(&clone, global_keys[x], global_keys_length[x],
+                                      &return_value_length, &flags, &rc);
+    /*
+      test_true(return_value);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    */
+    if (rc == MEMCACHED_SUCCESS && return_value)
+    {
+      keys_returned++;
+      free(return_value);
+    }
+  }
+  /*
+    Possible false, positive, memcached may have ejected key/value based on memory needs.
+  */
+  test_true(keys_returned > (global_count / 2));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_read(memcached_st *memc)
+{
+
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+
+  // Go fetch the keys and test to see if all of them were returned
+  {
+    unsigned int keys_returned;
+    test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned));
+    test_true(keys_returned > (global_count / 2));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_read_result(memcached_st *memc)
+{
+
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+
+  /* Turn this into a help function */
+  {
+    memcached_result_st results_obj;
+    memcached_result_st *results= memcached_result_create(memc, &results_obj);
+    test_true(results);
+
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
+    {
+      if (rc == MEMCACHED_IN_PROGRESS)
+      {
+        continue;
+      }
+
+      test_true(results);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+    test_compare(MEMCACHED_END, rc);
+
+    memcached_result_free(&results_obj);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_read_partial_result(memcached_st *memc)
+{
+
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+
+  // We will scan for just one key
+  {
+    memcached_result_st results_obj;
+    memcached_result_st *results= memcached_result_create(memc, &results_obj);
+
+    memcached_return_t rc;
+    results= memcached_fetch_result(memc, results, &rc);
+    test_true(results);
+    test_compare(MEMCACHED_SUCCESS, rc);
+
+    memcached_result_free(&results_obj);
+  }
+
+  // We already have a read happening, lets start up another one.
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+  {
+    memcached_result_st results_obj;
+    memcached_result_st *results= memcached_result_create(memc, &results_obj);
+    test_true(results);
+    test_false(memcached_is_allocated(results));
+
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
+    {
+      test_true(results);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+    test_compare(MEMCACHED_END, rc);
+
+    memcached_result_free(&results_obj);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_read_function(memcached_st *memc)
+{
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+
+  memcached_execute_fn callbacks[]= { &callback_counter };
+  size_t counter= 0;
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t delete_generate(memcached_st *memc)
+{
+  size_t total= 0;
+  for (size_t x= 0; x < global_count; x++)
+  {
+    if (memcached_success(memcached_delete(memc, global_keys[x], global_keys_length[x], (time_t)0)))
+    {
+      total++;
+    }
+  }
+
+  /*
+    Possible false, positive, memcached may have ejected key/value based on memory needs.
+  */
+  ASSERT_TRUE(total);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t delete_buffer_generate(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true);
+
+  size_t total= 0;
+  for (size_t x= 0; x < global_count; x++)
+  {
+    if (memcached_success(memcached_delete(memc, global_keys[x], global_keys_length[x], (time_t)0)))
+    {
+      total++;
+    }
+  }
+
+  ASSERT_TRUE(total);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_read_internal_result(memcached_st *memc)
+{
+
+  test_skip(true, bool(libmemcached_util_version_check(memc, 1, 4, 4)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, global_keys, global_keys_length, global_count));
+  {
+    memcached_result_st *results= NULL;
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc, results, &rc)))
+    {
+      test_true(results);
+      test_compare(MEMCACHED_SUCCESS, rc);
+    }
+    test_compare(MEMCACHED_END, rc);
+
+    memcached_result_free(results);
+  }
+
+  return TEST_SUCCESS;
+}
+
@@ -0,0 +1,53 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t cleanup_pairs(memcached_st*);
+test_return_t delete_buffer_generate(memcached_st*);
+test_return_t delete_generate(memcached_st*);
+test_return_t generate_buffer_data(memcached_st*);
+test_return_t generate_data(memcached_st*);
+test_return_t generate_data_with_stats(memcached_st*);
+test_return_t generate_large_pairs(memcached_st *);
+test_return_t get_read(memcached_st*);
+test_return_t get_read_count(memcached_st*);
+test_return_t mget_read(memcached_st*);
+test_return_t mget_read_function(memcached_st*);
+test_return_t mget_read_partial_result(memcached_st*);
+test_return_t mget_read_result(memcached_st*);
+test_return_t mget_read_internal_result(memcached_st*);
@@ -0,0 +1,182 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include "tests/libmemcached-1.0/haldenbrand.h"
+#include "tests/libmemcached-1.0/fetch_all_results.h"
+
+/* Test case provided by Cal Haldenbrand */
+#define HALDENBRAND_KEY_COUNT 3000U // * 1024576
+#define HALDENBRAND_FLAG_KEY 99 // * 1024576
+
+test_return_t haldenbrand_TEST1(memcached_st *memc)
+{
+  /* We just keep looking at the same values over and over */
+  srandom(10);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, true));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, true));
+
+
+  /* add key */
+  unsigned long long total= 0;
+  for (uint32_t x= 0 ; total < 20 * 1024576 ; x++ )
+  {
+    uint32_t size= (uint32_t)(rand() % ( 5 * 1024 ) ) + 400;
+    char randomstuff[6 * 1024];
+    memset(randomstuff, 0, 6 * 1024);
+    test_true(size < 6 * 1024); /* Being safe here */
+
+    for (uint32_t j= 0 ; j < size ;j++)
+    {
+      randomstuff[j] = (signed char) ((rand() % 26) + 97);
+    }
+
+    total+= size;
+    char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, key, key_length,
+                               randomstuff, strlen(randomstuff),
+                               time_t(0), HALDENBRAND_FLAG_KEY));
+  }
+  test_true(total > HALDENBRAND_KEY_COUNT);
+
+  return TEST_SUCCESS;
+}
+
+/* Test case provided by Cal Haldenbrand */
+test_return_t haldenbrand_TEST2(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, true));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, true));
+
+#if 0
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, 20 * 1024576));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, 20 * 1024576));
+  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE);
+  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
+
+  for (x= 0, errors= 0; total < 20 * 1024576 ; x++);
+#endif
+
+  size_t total_value_length= 0;
+  for (uint32_t x= 0, errors= 0; total_value_length < 24576 ; x++)
+  {
+    uint32_t flags= 0;
+    size_t val_len= 0;
+
+    char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
+
+    memcached_return_t rc;
+    char *getval= memcached_get(memc, key, key_length, &val_len, &flags, &rc);
+    if (memcached_failed(rc))
+    {
+      if (rc == MEMCACHED_NOTFOUND)
+      {
+        errors++;
+      }
+      else
+      {
+        test_true(rc);
+      }
+
+      continue;
+    }
+    test_compare(uint32_t(HALDENBRAND_FLAG_KEY), flags);
+    test_true(getval);
+
+    total_value_length+= val_len;
+    errors= 0;
+    ::free(getval);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/* Do a large mget() over all the keys we think exist */
+test_return_t haldenbrand_TEST3(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, true));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, true));
+
+#ifdef NOT_YET
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, 20 * 1024576);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, 20 * 1024576);
+  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE);
+  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
+#endif
+
+  std::vector<size_t> key_lengths;
+  key_lengths.resize(HALDENBRAND_KEY_COUNT);
+  std::vector<char *> keys;
+  keys.resize(key_lengths.size());
+  for (uint32_t x= 0; x < key_lengths.size(); x++)
+  {
+    char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+    int key_length= snprintf(key, sizeof(key), "%u", x);
+    test_true(key_length > 0 and key_length < MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1);
+    keys[x]= strdup(key);
+    key_lengths[x]= key_length;
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, &keys[0], &key_lengths[0], key_lengths.size()));
+
+  unsigned int keys_returned;
+  test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned));
+  test_compare(HALDENBRAND_KEY_COUNT, keys_returned);
+
+  for (libtest::vchar_ptr_t::iterator iter= keys.begin();
+       iter != keys.end();
+       iter++)
+  {
+    ::free(*iter);
+  }
+
+
+  return TEST_SUCCESS;
+}
+
@@ -0,0 +1,42 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t haldenbrand_TEST1(memcached_st *);
+test_return_t haldenbrand_TEST2(memcached_st *);
+test_return_t haldenbrand_TEST3(memcached_st *);
@@ -0,0 +1,271 @@
+# 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
+
+noinst_HEADERS+= tests/basic.h
+noinst_HEADERS+= tests/callbacks.h
+noinst_HEADERS+= tests/debug.h
+noinst_HEADERS+= tests/deprecated.h
+noinst_HEADERS+= tests/error_conditions.h
+noinst_HEADERS+= tests/exist.h
+noinst_HEADERS+= tests/ketama.h
+noinst_HEADERS+= tests/ketama_test_cases.h
+noinst_HEADERS+= tests/ketama_test_cases_spy.h
+noinst_HEADERS+= tests/libmemcached-1.0/all_tests.h
+noinst_HEADERS+= tests/libmemcached-1.0/callback_counter.h
+noinst_HEADERS+= tests/libmemcached-1.0/dump.h
+noinst_HEADERS+= tests/libmemcached-1.0/encoding_key.h
+noinst_HEADERS+= tests/libmemcached-1.0/fetch_all_results.h
+noinst_HEADERS+= tests/libmemcached-1.0/generate.h
+noinst_HEADERS+= tests/libmemcached-1.0/haldenbrand.h
+noinst_HEADERS+= tests/libmemcached-1.0/mem_functions.h
+noinst_HEADERS+= tests/libmemcached-1.0/memcached_get.h
+noinst_HEADERS+= tests/libmemcached-1.0/parser.h
+noinst_HEADERS+= tests/libmemcached-1.0/setup_and_teardowns.h
+noinst_HEADERS+= tests/libmemcached-1.0/stat.h
+noinst_HEADERS+= tests/namespace.h
+noinst_HEADERS+= tests/pool.h
+noinst_HEADERS+= tests/print.h
+noinst_HEADERS+= tests/replication.h
+noinst_HEADERS+= tests/server_add.h
+noinst_HEADERS+= tests/string.h
+noinst_HEADERS+= tests/touch.h
+noinst_HEADERS+= tests/virtual_buckets.h
+
+if HAVE_DTRACE
+else
+# Test internals
+tests_libmemcached_1_0_internals_CXXFLAGS=
+tests_libmemcached_1_0_internals_LDADD=
+tests_libmemcached_1_0_internals_SOURCES=
+
+tests_libmemcached_1_0_internals_SOURCES+= tests/libmemcached-1.0/internals.cc
+tests_libmemcached_1_0_internals_SOURCES+= tests/libmemcached-1.0/string.cc
+tests_libmemcached_1_0_internals_CXXFLAGS+= $(AM_CXXFLAGS)
+tests_libmemcached_1_0_internals_CXXFLAGS+= @PTHREAD_CFLAGS@
+tests_libmemcached_1_0_internals_LDADD+= libmemcachedinternal/libmemcachedinternal.la
+tests_libmemcached_1_0_internals_LDADD+= @PTHREAD_LIBS@
+tests_libmemcached_1_0_internals_LDADD+= libmemcachedinternal/libmemcachedutilinternal.la
+tests_libmemcached_1_0_internals_LDADD+= libtest/libtest.la
+check_PROGRAMS+= tests/libmemcached-1.0/internals
+noinst_PROGRAMS+= tests/libmemcached-1.0/internals
+
+test-internal: tests/libmemcached-1.0/internals
+	@tests/testplus
+
+endif
+
+tests_libmemcached_1_0_testapp_CXXFLAGS=
+tests_libmemcached_1_0_testapp_CFLAGS=
+tests_libmemcached_1_0_testapp_SOURCES=
+tests_libmemcached_1_0_testapp_LDADD=
+
+tests_libmemcached_1_0_testapp_CXXFLAGS+= $(AM_CXXFLAGS)
+tests_libmemcached_1_0_testapp_CXXFLAGS+= @PTHREAD_CFLAGS@
+tests_libmemcached_1_0_testapp_CFLAGS+= $(AM_CFLAGS)
+tests_libmemcached_1_0_testapp_CFLAGS+= $(NO_CONVERSION)
+tests_libmemcached_1_0_testapp_CFLAGS+= $(NO_STRICT_ALIASING)
+tests_libmemcached_1_0_testapp_SOURCES+= clients/generator.cc clients/execute.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/all_tests.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/basic.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/callbacks.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/debug.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/deprecated.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/dump.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/encoding_key.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/error_conditions.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/exist.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/haldenbrand.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/ketama.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/mem_functions.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/memcached_get.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/namespace.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/parser.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/pool.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/print.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/replication.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/server_add.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/setup_and_teardowns.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/stat.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/touch.cc
+tests_libmemcached_1_0_testapp_SOURCES+= tests/libmemcached-1.0/virtual_buckets.cc
+
+tests_libmemcached_1_0_testapp_LDADD+= @LIBUUID_LIB@
+tests_libmemcached_1_0_testapp_LDADD+= @PTHREAD_LIBS@
+tests_libmemcached_1_0_testapp_LDADD+= libmemcached/libmemcached.la
+tests_libmemcached_1_0_testapp_LDADD+= libmemcached/libmemcachedutil.la
+tests_libmemcached_1_0_testapp_LDADD+= libtest/libtest.la
+tests_libmemcached_1_0_testapp_LDADD+= libhashkit/libhashkit.la
+
+check_PROGRAMS+= tests/libmemcached-1.0/testapp
+noinst_PROGRAMS+= tests/libmemcached-1.0/testapp
+
+tests_libmemcached_1_0_testsocket_CXXFLAGS=
+tests_libmemcached_1_0_testsocket_CFLAGS=
+tests_libmemcached_1_0_testsocket_SOURCES=
+tests_libmemcached_1_0_testsocket_LDADD=
+
+tests_libmemcached_1_0_testsocket_CXXFLAGS+= @PTHREAD_CFLAGS@
+tests_libmemcached_1_0_testsocket_CXXFLAGS+= $(AM_CXXFLAGS)
+tests_libmemcached_1_0_testsocket_CFLAGS+= $(AM_CFLAGS)
+tests_libmemcached_1_0_testsocket_CFLAGS+= $(NO_CONVERSION)
+tests_libmemcached_1_0_testsocket_CFLAGS+= $(NO_STRICT_ALIASING)
+
+tests_libmemcached_1_0_testsocket_SOURCES+= clients/execute.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= clients/generator.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/all_tests_socket.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/basic.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/callbacks.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/debug.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/deprecated.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/dump.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/encoding_key.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/error_conditions.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/exist.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/haldenbrand.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/ketama.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/mem_functions.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/memcached_get.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/namespace.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/parser.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/pool.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/print.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/replication.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/server_add.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/setup_and_teardowns.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/stat.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/touch.cc
+tests_libmemcached_1_0_testsocket_SOURCES+= tests/libmemcached-1.0/virtual_buckets.cc
+
+tests_libmemcached_1_0_testsocket_LDADD+= @LIBUUID_LIB@
+tests_libmemcached_1_0_testsocket_LDADD+= @PTHREAD_LIBS@
+tests_libmemcached_1_0_testsocket_LDADD+= libmemcached/libmemcached.la
+tests_libmemcached_1_0_testsocket_LDADD+= libmemcached/libmemcachedutil.la
+tests_libmemcached_1_0_testsocket_LDADD+= libtest/libtest.la
+tests_libmemcached_1_0_testsocket_LDADD+= libhashkit/libhashkit.la
+
+check_PROGRAMS+= tests/libmemcached-1.0/testsocket
+noinst_PROGRAMS+= tests/libmemcached-1.0/testsocket
+
+test-socket: tests/libmemcached-1.0/testsocket
+	@tests/libmemcached-1.0/testsocket
+
+gdb-socket: tests/libmemcached-1.0/testsocket
+	@$(GDB_COMMAND) tests/libmemcached-1.0/testsocket
+
+tests_libmemcached_1_0_sasl_SOURCES=
+tests_libmemcached_1_0_sasl_LDADD=
+tests_libmemcached_1_0_sasl_CXXFLAGS=
+tests_libmemcached_1_0_sasl_CFLAGS=
+
+tests_libmemcached_1_0_sasl_CXXFLAGS+= $(AM_CXXFLAGS)
+tests_libmemcached_1_0_sasl_CXXFLAGS+= @PTHREAD_CFLAGS@
+tests_libmemcached_1_0_sasl_CFLAGS+= $(AM_CFLAGS)
+tests_libmemcached_1_0_sasl_CFLAGS+= $(NO_CONVERSION)
+tests_libmemcached_1_0_sasl_CFLAGS+= $(NO_STRICT_ALIASING)
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/basic.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/debug.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/deprecated.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/error_conditions.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/ketama.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/namespace.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/parser.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/pool.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/print.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/replication.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/sasl.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/virtual_buckets.cc
+tests_libmemcached_1_0_sasl_SOURCES+= clients/execute.cc
+tests_libmemcached_1_0_sasl_SOURCES+= clients/generator.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_libmemcached_1_0_sasl_SOURCES+= tests/libmemcached-1.0/generate.cc
+
+tests_libmemcached_1_0_sasl_LDADD+= @PTHREAD_LIBS@
+tests_libmemcached_1_0_sasl_LDADD+= libmemcached/libmemcached.la
+tests_libmemcached_1_0_sasl_LDADD+= libmemcached/libmemcachedutil.la
+tests_libmemcached_1_0_sasl_LDADD+= libtest/libtest.la
+tests_libmemcached_1_0_sasl_LDADD+= libhashkit/libhashkit.la
+
+check_PROGRAMS+= tests/libmemcached-1.0/sasl
+noinst_PROGRAMS+= tests/libmemcached-1.0/sasl
+
+test-sasl: tests/libmemcached-1.0/sasl
+	@tests/libmemcached-1.0/sasl
+
+gdb-sasl: tests/libmemcached-1.0/sasl
+	@$(GDB_COMMAND)  tests/libmemcached-1.0/sasl
+
+tests_atomsmasher_SOURCES=
+tests_atomsmasher_LDADD=
+
+tests_atomsmasher_LDADD+= $(TESTS_LDADDS)
+tests_atomsmasher_SOURCES+= clients/execute.cc
+tests_atomsmasher_SOURCES+= clients/generator.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/atomsmasher.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/debug.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_atomsmasher_SOURCES+= tests/libmemcached-1.0/print.cc
+noinst_PROGRAMS+= tests/atomsmasher
+
+tests_testudp_CFLAGS=
+tests_testudp_SOURCES=
+tests_testudp_LDADD=
+
+tests_testudp_CFLAGS+= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
+tests_testudp_SOURCES+= clients/execute.cc
+tests_testudp_SOURCES+= clients/generator.cc
+tests_testudp_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_testudp_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_testudp_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_testudp_SOURCES+= tests/libmemcached-1.0/print.cc
+tests_testudp_SOURCES+= tests/mem_udp.cc
+tests_testudp_LDADD+= $(TESTS_LDADDS)
+check_PROGRAMS+= tests/testudp
+noinst_PROGRAMS+= tests/testudp
+
+test-udp: tests/testudp
+	@tests/testudp
+
+tests_testplus_SOURCES=
+tests_testplus_CXXFLAGS=
+tests_testplus_LDADD=
+
+tests_testplus_SOURCES+= clients/execute.cc
+tests_testplus_SOURCES+= clients/generator.cc
+tests_testplus_SOURCES+= tests/libmemcached-1.0/callback_counter.cc
+tests_testplus_SOURCES+= tests/libmemcached-1.0/fetch_all_results.cc
+tests_testplus_SOURCES+= tests/libmemcached-1.0/generate.cc
+tests_testplus_SOURCES+= tests/libmemcached-1.0/plus.cpp
+tests_testplus_SOURCES+= tests/libmemcached-1.0/print.cc
+
+tests_testplus_CXXFLAGS+= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_testplus_LDADD+= $(TESTS_LDADDS)
+check_PROGRAMS+= tests/testplus
+noinst_PROGRAMS+= tests/testplus
+
+test-plus: tests/testplus
+	@tests/testplus
+
+gdb-plus: tests/testplus
+	$(GDB_COMMAND) tests/testplus
+
+valgrind-plus: tests/testplus
+	@$(VALGRIND_COMMAND) tests/testplus
+
+helgrind-plus: tests/testplus
+	@$(HELGRIND_COMMAND) tests/testplus
@@ -0,0 +1,67 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached internals test
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include "tests/string.h"
+
+/*
+  Test cases
+*/
+test_st string_tests[] ={
+  {"string static with null", false, string_static_null },
+  {"string alloc with null", false, string_alloc_null },
+  {"string alloc with 1K", false, string_alloc_with_size },
+  {"string alloc with malloc failure", false, string_alloc_with_size_toobig },
+  {"string append", false, string_alloc_append },
+  {"string append failure (too big)", false, string_alloc_append_toobig },
+  {"string_alloc_append_multiple", false, string_alloc_append_multiple },
+  {0, 0, 0}
+};
+
+
+collection_st collection[] ={
+  {"string", 0, 0, string_tests},
+  {0, 0, 0, 0}
+};
+
+void get_world(libtest::Framework* frame)
+{
+  frame->collections(collection);
+}
@@ -0,0 +1,291 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include "libmemcached/server_instance.h"
+#include "libmemcached/continuum.hpp"
+#include "libmemcached/instance.hpp"
+
+#include <tests/ketama.h>
+#include <tests/ketama_test_cases.h>
+
+test_return_t ketama_compatibility_libmemcached(memcached_st *)
+{
+  memcached_st *memc= memcached_create(NULL);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1));
+
+  test_compare(uint64_t(1), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA));
+  test_compare(MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, memcached_behavior_get_distribution(memc));
+
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  memcached_server_push(memc, server_pool);
+
+  /* verify that the server list was parsed okay. */
+  test_compare(8U, memcached_server_count(memc));
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
+  test_compare(in_port_t(11211), server_pool[0].port);
+  test_compare(600U, server_pool[0].weight);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
+  test_compare(in_port_t(11211), server_pool[2].port);
+  test_compare(200U, server_pool[2].weight);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
+  test_compare(in_port_t(11211), server_pool[7].port);
+  test_compare(100U, server_pool[7].weight);
+
+  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
+   * us test the boundary wraparound.
+   */
+  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->ketama.continuum[0].index);
+
+  /* verify the standard ketama set. */
+  for (uint32_t x= 0; x < 99; x++)
+  {
+    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
+    const memcached_instance_st * instance=
+      memcached_server_instance_by_position(memc, server_idx);
+    const char *hostname = memcached_server_name(instance);
+
+    test_strcmp(hostname, ketama_test_cases[x].server);
+  }
+
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t user_supplied_bug18(memcached_st *trash)
+{
+  memcached_return_t rc;
+  uint64_t value;
+  int x;
+  memcached_st *memc;
+
+  (void)trash;
+
+  memc= memcached_create(NULL);
+  test_true(memc);
+
+  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
+  test_true(value == 1);
+
+  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
+  test_true(value == MEMCACHED_HASH_MD5);
+
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  memcached_server_push(memc, server_pool);
+
+  /* verify that the server list was parsed okay. */
+  test_true(memcached_server_count(memc) == 8);
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
+  test_true(server_pool[0].port == 11211);
+  test_true(server_pool[0].weight == 600);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
+  test_true(server_pool[2].port == 11211);
+  test_true(server_pool[2].weight == 200);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
+  test_true(server_pool[7].port == 11211);
+  test_true(server_pool[7].weight == 100);
+
+  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
+   * us test the boundary wraparound.
+   */
+  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->ketama.continuum[0].index);
+
+  /* verify the standard ketama set. */
+  for (x= 0; x < 99; x++)
+  {
+    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
+
+    const memcached_instance_st * instance=
+      memcached_server_instance_by_position(memc, server_idx);
+
+    const char *hostname = memcached_server_name(instance);
+    test_strcmp(hostname, ketama_test_cases[x].server);
+  }
+
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t auto_eject_hosts(memcached_st *trash)
+{
+  (void) trash;
+
+  memcached_return_t rc;
+  memcached_st *memc= memcached_create(NULL);
+  test_true(memc);
+
+  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
+  test_true(value == 1);
+
+  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
+  test_true(value == MEMCACHED_HASH_MD5);
+
+    /* server should be removed when in delay */
+  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, 1);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS);
+  test_true(value == 1);
+
+  memcached_server_st *server_pool;
+  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  memcached_server_push(memc, server_pool);
+
+  /* verify that the server list was parsed okay. */
+  test_true(memcached_server_count(memc) == 8);
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
+  test_true(server_pool[0].port == 11211);
+  test_true(server_pool[0].weight == 600);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
+  test_true(server_pool[2].port == 11211);
+  test_true(server_pool[2].weight == 200);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
+  test_true(server_pool[7].port == 11211);
+  test_true(server_pool[7].weight == 100);
+
+  const memcached_instance_st * instance= memcached_server_instance_by_position(memc, 2);
+  memcached_instance_next_retry(instance, time(NULL) +15);
+  memc->ketama.next_distribution_rebuild= time(NULL) - 1;
+
+  /*
+    This would not work if there were only two hosts.
+  */
+  for (ptrdiff_t x= 0; x < 99; x++)
+  {
+    memcached_autoeject(memc);
+    uint32_t server_idx= memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
+    test_true(server_idx != 2);
+  }
+
+  /* and re-added when it's back. */
+  time_t absolute_time= time(NULL) -1;
+  memcached_instance_next_retry(instance, absolute_time);
+  memc->ketama.next_distribution_rebuild= absolute_time;
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION,
+                         memc->distribution);
+  for (ptrdiff_t x= 0; x < 99; x++)
+  {
+    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
+    // We re-use instance from above.
+    instance=
+      memcached_server_instance_by_position(memc, server_idx);
+    const char *hostname = memcached_server_name(instance);
+    test_strcmp(hostname, ketama_test_cases[x].server);
+  }
+
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t ketama_compatibility_spymemcached(memcached_st *)
+{
+  memcached_st *memc= memcached_create(NULL);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1));
+
+  test_compare(UINT64_C(1), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY));
+  test_compare(MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY, memcached_behavior_get_distribution(memc));
+
+  memcached_server_st *server_pool= memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
+  test_true(server_pool);
+  memcached_server_push(memc, server_pool);
+
+  /* verify that the server list was parsed okay. */
+  test_compare(8U, memcached_server_count(memc));
+  test_strcmp(server_pool[0].hostname, "10.0.1.1");
+  test_compare(in_port_t(11211), server_pool[0].port);
+  test_compare(600U, server_pool[0].weight);
+  test_strcmp(server_pool[2].hostname, "10.0.1.3");
+  test_compare(in_port_t(11211), server_pool[2].port);
+  test_compare(200U, server_pool[2].weight);
+  test_strcmp(server_pool[7].hostname, "10.0.1.8");
+  test_compare(in_port_t(11211), server_pool[7].port);
+  test_compare(100U, server_pool[7].weight);
+
+  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
+   * us test the boundary wraparound.
+   */
+  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->ketama.continuum[0].index);
+
+  /* verify the standard ketama set. */
+  for (uint32_t x= 0; x < 99; x++)
+  {
+    uint32_t server_idx= memcached_generate_hash(memc, ketama_test_cases_spy[x].key, strlen(ketama_test_cases_spy[x].key));
+
+    const memcached_instance_st * instance=
+      memcached_server_instance_by_position(memc, server_idx);
+
+    const char *hostname= memcached_server_name(instance);
+
+    test_strcmp(hostname, ketama_test_cases_spy[x].server);
+  }
+
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,5088 @@
+/*  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 <libtest/test.hpp>
+
+#if defined(HAVE_LIBUUID) && HAVE_LIBUUID
+# include <uuid/uuid.h>
+#endif
+
+/*
+  Test cases
+*/
+
+#include <libmemcached-1.0/memcached.h>
+#include "libmemcached/is.h"
+#include "libmemcached/server_instance.h"
+
+#include <libhashkit-1.0/hashkit.h>
+
+#include <libtest/memcached.hpp>
+
+#include <cerrno>
+#include <memory>
+#include <pthread.h>
+#include <semaphore.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <iostream>
+
+#include <libtest/server.h>
+
+#include "clients/generator.h"
+
+#define SMALL_STRING_LEN 1024
+
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <libmemcachedutil-1.0/util.h>
+
+#include "tests/hash_results.h"
+
+#include "tests/libmemcached-1.0/callback_counter.h"
+#include "tests/libmemcached-1.0/fetch_all_results.h"
+#include "tests/libmemcached-1.0/mem_functions.h"
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+#include "tests/print.h"
+#include "tests/debug.h"
+#include "tests/memc.hpp"
+
+#define UUID_STRING_MAXLENGTH 36
+
+#include "tests/keys.hpp"
+
+#include "libmemcached/instance.hpp"
+
+static memcached_st * create_single_instance_memcached(const memcached_st *original_memc, const char *options)
+{
+  /*
+    If no options are given, copy over at least the binary flag.
+  */
+  char options_buffer[1024]= { 0 };
+  if (options == NULL)
+  {
+    if (memcached_is_binary(original_memc))
+    {
+      snprintf(options_buffer, sizeof(options_buffer), "--BINARY");
+    }
+  }
+
+  /*
+   * I only want to hit _one_ server so I know the number of requests I'm
+   * sending in the pipeline.
+   */
+  const memcached_instance_st * instance= memcached_server_instance_by_position(original_memc, 0);
+
+  char server_string[1024];
+  int server_string_length;
+  if (instance->type == MEMCACHED_CONNECTION_UNIX_SOCKET)
+  {
+    if (options)
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--SOCKET=\"%s\" %s",
+                                     memcached_server_name(instance), options);
+    }
+    else
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--SOCKET=\"%s\"",
+                                     memcached_server_name(instance));
+    }
+  }
+  else
+  {
+    if (options)
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--server=%s:%d %s",
+                                     memcached_server_name(instance), int(memcached_server_port(instance)),
+                                     options);
+    }
+    else
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--server=%s:%d",
+                                     memcached_server_name(instance), int(memcached_server_port(instance)));
+    }
+  }
+
+  if (server_string_length <= 0)
+  {
+    return NULL;
+  }
+
+  char errror_buffer[1024];
+  if (memcached_failed(libmemcached_check_configuration(server_string, server_string_length, errror_buffer, sizeof(errror_buffer))))
+  {
+    Error << "Failed to parse (" << server_string << ") " << errror_buffer;
+    return NULL;
+  }
+
+  return memcached(server_string, server_string_length);
+}
+
+
+test_return_t init_test(memcached_st *not_used)
+{
+  memcached_st memc;
+  (void)not_used;
+
+  (void)memcached_create(&memc);
+  memcached_free(&memc);
+
+  return TEST_SUCCESS;
+}
+
+#define TEST_PORT_COUNT 7
+in_port_t test_ports[TEST_PORT_COUNT];
+
+static memcached_return_t server_display_function(const memcached_st *ptr,
+                                                  const memcached_instance_st * server,
+                                                  void *context)
+{
+  /* Do Nothing */
+  size_t bigger= *((size_t *)(context));
+  (void)ptr;
+  fatal_assert(bigger <= memcached_server_port(server));
+  *((size_t *)(context))= memcached_server_port(server);
+
+  return MEMCACHED_SUCCESS;
+}
+
+static memcached_return_t dump_server_information(const memcached_st *ptr,
+                                                  const memcached_instance_st * instance,
+                                                  void *context)
+{
+  /* Do Nothing */
+  FILE *stream= (FILE *)context;
+  (void)ptr;
+
+  fprintf(stream, "Memcached Server: %s %u Version %u.%u.%u\n",
+          memcached_server_name(instance),
+          memcached_server_port(instance),
+          instance->major_version,
+          instance->minor_version,
+          instance->micro_version);
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t server_sort_test(memcached_st *ptr)
+{
+  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
+
+  memcached_return_t rc;
+  memcached_server_fn callbacks[1];
+  memcached_st *local_memc;
+  (void)ptr;
+
+  local_memc= memcached_create(NULL);
+  test_true(local_memc);
+  memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
+
+  for (uint32_t x= 0; x < TEST_PORT_COUNT; x++)
+  {
+    test_ports[x]= (in_port_t)random() % 64000;
+    rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
+    test_compare(memcached_server_count(local_memc), x +1);
+#if 0 // Rewrite
+    test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
+#endif
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  callbacks[0]= server_display_function;
+  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
+
+
+  memcached_free(local_memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t server_sort2_test(memcached_st *ptr)
+{
+  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
+  memcached_server_fn callbacks[1];
+  memcached_st *local_memc;
+  const memcached_instance_st * instance;
+  (void)ptr;
+
+  local_memc= memcached_create(NULL);
+  test_true(local_memc);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43043, 0));
+  instance= memcached_server_instance_by_position(local_memc, 0);
+  test_compare(in_port_t(43043), memcached_server_port(instance));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43042, 0));
+
+  instance= memcached_server_instance_by_position(local_memc, 0);
+  test_compare(in_port_t(43042), memcached_server_port(instance));
+
+  instance= memcached_server_instance_by_position(local_memc, 1);
+  test_compare(in_port_t(43043), memcached_server_port(instance));
+
+  callbacks[0]= server_display_function;
+  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
+
+
+  memcached_free(local_memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_server_remove_test(memcached_st*)
+{
+  const char *server_string= "--server=localhost:4444 --server=localhost:4445 --server=localhost:4446 --server=localhost:4447 --server=localhost --server=memcache1.memcache.bk.sapo.pt:11211 --server=memcache1.memcache.bk.sapo.pt:11212 --server=memcache1.memcache.bk.sapo.pt:11213 --server=memcache1.memcache.bk.sapo.pt:11214 --server=memcache2.memcache.bk.sapo.pt:11211 --server=memcache2.memcache.bk.sapo.pt:11212 --server=memcache2.memcache.bk.sapo.pt:11213 --server=memcache2.memcache.bk.sapo.pt:11214";
+  char buffer[BUFSIZ];
+
+  test_compare(MEMCACHED_SUCCESS,
+               libmemcached_check_configuration(server_string, strlen(server_string), buffer, sizeof(buffer)));
+  memcached_st *memc= memcached(server_string, strlen(server_string));
+  test_true(memc);
+
+  memcached_server_fn callbacks[1];
+  callbacks[0]= server_print_callback;
+  memcached_server_cursor(memc, callbacks, NULL,  1);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t server_display_unsort_function(const memcached_st*,
+                                                         const memcached_instance_st * server,
+                                                         void *context)
+{
+  /* Do Nothing */
+  uint32_t x= *((uint32_t *)(context));
+
+  if (! (test_ports[x] == memcached_server_port(server)))
+  {
+    fprintf(stderr, "%lu -> %lu\n", (unsigned long)test_ports[x], (unsigned long)memcached_server_port(server));
+    return MEMCACHED_FAILURE;
+  }
+
+  *((uint32_t *)(context))= ++x;
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t server_unsort_test(memcached_st *ptr)
+{
+  size_t counter= 0; /* Prime the value for the test_true in server_display_function */
+  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
+  memcached_server_fn callbacks[1];
+  memcached_st *local_memc;
+  (void)ptr;
+
+  local_memc= memcached_create(NULL);
+  test_true(local_memc);
+
+  for (uint32_t x= 0; x < TEST_PORT_COUNT; x++)
+  {
+    test_ports[x]= (in_port_t)(random() % 64000);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0));
+    test_compare(memcached_server_count(local_memc), x +1);
+#if 0 // Rewrite
+    test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
+#endif
+  }
+
+  callbacks[0]= server_display_unsort_function;
+  memcached_server_cursor(local_memc, callbacks, (void *)&counter,  1);
+
+  /* Now we sort old data! */
+  memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
+  callbacks[0]= server_display_function;
+  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
+
+
+  memcached_free(local_memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t allocation_test(memcached_st *not_used)
+{
+  (void)not_used;
+  memcached_st *memc;
+  memc= memcached_create(NULL);
+  test_true(memc);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t clone_test(memcached_st *memc)
+{
+  /* All null? */
+  {
+    memcached_st *memc_clone;
+    memc_clone= memcached_clone(NULL, NULL);
+    test_true(memc_clone);
+    memcached_free(memc_clone);
+  }
+
+  /* Can we init from null? */
+  {
+    memcached_st *memc_clone;
+    memc_clone= memcached_clone(NULL, memc);
+    test_true(memc_clone);
+
+    { // Test allocators
+      test_true(memc_clone->allocators.free == memc->allocators.free);
+      test_true(memc_clone->allocators.malloc == memc->allocators.malloc);
+      test_true(memc_clone->allocators.realloc == memc->allocators.realloc);
+      test_true(memc_clone->allocators.calloc == memc->allocators.calloc);
+    }
+
+    test_true(memc_clone->connect_timeout == memc->connect_timeout);
+    test_true(memc_clone->delete_trigger == memc->delete_trigger);
+    test_true(memc_clone->distribution == memc->distribution);
+    { // Test all of the flags
+      test_true(memc_clone->flags.no_block == memc->flags.no_block);
+      test_true(memc_clone->flags.tcp_nodelay == memc->flags.tcp_nodelay);
+      test_true(memc_clone->flags.support_cas == memc->flags.support_cas);
+      test_true(memc_clone->flags.buffer_requests == memc->flags.buffer_requests);
+      test_true(memc_clone->flags.use_sort_hosts == memc->flags.use_sort_hosts);
+      test_true(memc_clone->flags.verify_key == memc->flags.verify_key);
+      test_true(memc_clone->ketama.weighted_ == memc->ketama.weighted_);
+      test_true(memc_clone->flags.binary_protocol == memc->flags.binary_protocol);
+      test_true(memc_clone->flags.hash_with_namespace == memc->flags.hash_with_namespace);
+      test_true(memc_clone->flags.reply == memc->flags.reply);
+      test_true(memc_clone->flags.use_udp == memc->flags.use_udp);
+      test_true(memc_clone->flags.auto_eject_hosts == memc->flags.auto_eject_hosts);
+      test_true(memc_clone->flags.randomize_replica_read == memc->flags.randomize_replica_read);
+    }
+    test_true(memc_clone->get_key_failure == memc->get_key_failure);
+    test_true(hashkit_compare(&memc_clone->hashkit, &memc->hashkit));
+    test_true(memc_clone->io_bytes_watermark == memc->io_bytes_watermark);
+    test_true(memc_clone->io_msg_watermark == memc->io_msg_watermark);
+    test_true(memc_clone->io_key_prefetch == memc->io_key_prefetch);
+    test_true(memc_clone->on_cleanup == memc->on_cleanup);
+    test_true(memc_clone->on_clone == memc->on_clone);
+    test_true(memc_clone->poll_timeout == memc->poll_timeout);
+    test_true(memc_clone->rcv_timeout == memc->rcv_timeout);
+    test_true(memc_clone->recv_size == memc->recv_size);
+    test_true(memc_clone->retry_timeout == memc->retry_timeout);
+    test_true(memc_clone->send_size == memc->send_size);
+    test_true(memc_clone->server_failure_limit == memc->server_failure_limit);
+    test_true(memc_clone->server_timeout_limit == memc->server_timeout_limit);
+    test_true(memc_clone->snd_timeout == memc->snd_timeout);
+    test_true(memc_clone->user_data == memc->user_data);
+
+    memcached_free(memc_clone);
+  }
+
+  /* Can we init from struct? */
+  {
+    memcached_st declared_clone;
+    memcached_st *memc_clone;
+    memset(&declared_clone, 0 , sizeof(memcached_st));
+    memc_clone= memcached_clone(&declared_clone, NULL);
+    test_true(memc_clone);
+    memcached_free(memc_clone);
+  }
+
+  /* Can we init from struct? */
+  {
+    memcached_st declared_clone;
+    memcached_st *memc_clone;
+    memset(&declared_clone, 0 , sizeof(memcached_st));
+    memc_clone= memcached_clone(&declared_clone, memc);
+    test_true(memc_clone);
+    memcached_free(memc_clone);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t userdata_test(memcached_st *memc)
+{
+  void* foo= NULL;
+  test_false(memcached_set_user_data(memc, foo));
+  test_true(memcached_get_user_data(memc) == foo);
+  test_true(memcached_set_user_data(memc, NULL) == foo);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t connection_test(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_with_weight(memc, "localhost", 0, 0));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t libmemcached_string_behavior_test(memcached_st *)
+{
+  for (int x= MEMCACHED_BEHAVIOR_NO_BLOCK; x < int(MEMCACHED_BEHAVIOR_MAX); ++x)
+  {
+    test_true(libmemcached_string_behavior(memcached_behavior_t(x)));
+  }
+  test_compare(37, int(MEMCACHED_BEHAVIOR_MAX));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t libmemcached_string_distribution_test(memcached_st *)
+{
+  for (int x= MEMCACHED_DISTRIBUTION_MODULA; x < int(MEMCACHED_DISTRIBUTION_CONSISTENT_MAX); ++x)
+  {
+    test_true(libmemcached_string_distribution(memcached_server_distribution_t(x)));
+  }
+  test_compare(7, int(MEMCACHED_DISTRIBUTION_CONSISTENT_MAX));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_return_t_TEST(memcached_st *memc)
+{
+  uint32_t values[] = { 851992627U, 2337886783U, 4109241422U, 4001849190U,
+                        982370485U, 1263635348U, 4242906218U, 3829656100U,
+                        1891735253U, 334139633U, 2257084983U, 3351789013U,
+                        13199785U, 2542027183U, 1097051614U, 199566778U,
+                        2748246961U, 2465192557U, 1664094137U, 2405439045U,
+                        1842224848U, 692413798U, 3479807801U, 919913813U,
+                        4269430871U, 610793021U, 527273862U, 1437122909U,
+                        2300930706U, 2943759320U, 674306647U, 2400528935U,
+                        54481931U, 4186304426U, 1741088401U, 2979625118U,
+                        4159057246U, 3425930182U, 2593724503U,  1868899624U,
+                        1769812374U, 2302537950U, 1110330676U, 3365377466U, 
+                        1336171666U, 3021258493U, 2334992265U, 3861994737U, 
+                        3582734124U, 3365377466U };
+
+  // You have updated the memcache_error messages but not updated docs/tests.
+  for (int rc= int(MEMCACHED_SUCCESS); rc < int(MEMCACHED_MAXIMUM_RETURN); ++rc)
+  {
+    uint32_t hash_val;
+    const char *msg=  memcached_strerror(memc, memcached_return_t(rc));
+    hash_val= memcached_generate_hash_value(msg, strlen(msg),
+                                            MEMCACHED_HASH_JENKINS);
+    if (values[rc] != hash_val)
+    {
+      fprintf(stderr, "\n\nYou have updated memcached_return_t without updating the memcached_return_t_TEST\n");
+      fprintf(stderr, "%u, %s, (%u)\n\n", (uint32_t)rc, memcached_strerror(memc, memcached_return_t(rc)), hash_val);
+    }
+    test_compare(values[rc], hash_val);
+  }
+  test_compare(49, int(MEMCACHED_MAXIMUM_RETURN));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t set_test(memcached_st *memc)
+{
+  memcached_return_t rc= memcached_set(memc,
+                                       test_literal_param("foo"),
+                                       test_literal_param("when we sanitize"),
+                                       time_t(0), (uint32_t)0);
+  test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t append_test(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const char *in_value= "we";
+  size_t value_length;
+  uint32_t flags;
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             in_value, strlen(in_value),
+                             time_t(0), uint32_t(0)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_append(memc,
+                                test_literal_param(__func__),
+                                " the", strlen(" the"),
+                                time_t(0), uint32_t(0)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_append(memc,
+                                test_literal_param(__func__),
+                                " people", strlen(" people"),
+                                time_t(0), uint32_t(0)));
+
+  char *out_value= memcached_get(memc,
+                                 test_literal_param(__func__),
+                                 &value_length, &flags, &rc);
+  test_memcmp(out_value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(out_value);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t append_binary_test(memcached_st *memc)
+{
+  uint32_t store_list[] = { 23, 56, 499, 98, 32847, 0 };
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             NULL, 0,
+                             time_t(0), uint32_t(0)));
+
+  size_t count= 0;
+  for (uint32_t x= 0; store_list[x] ; x++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_append(memc,
+                         test_literal_param(__func__),
+                         (char *)&store_list[x], sizeof(uint32_t),
+                         time_t(0), uint32_t(0)));
+    count++;
+  }
+
+  size_t value_length;
+  uint32_t flags;
+  memcached_return_t rc;
+  uint32_t *value= (uint32_t *)memcached_get(memc,
+                                             test_literal_param(__func__),
+                                             &value_length, &flags, &rc);
+  test_compare(value_length, sizeof(uint32_t) * count);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  for (uint32_t counter= uint32_t(count), *ptr= value; counter; counter--)
+  {
+    test_compare(*ptr, store_list[count - counter]);
+    ptr++;
+  }
+  free(value);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_mget_mixed_memcached_get_TEST(memcached_st *memc)
+{
+  keys_st keys(200);
+
+  for (libtest::vchar_ptr_t::iterator iter= keys.begin();
+       iter != keys.end(); 
+       ++iter)
+  {
+    test_compare_hint(MEMCACHED_SUCCESS,
+                      memcached_set(memc,
+                                    (*iter), 36,
+                                    NULL, 0,
+                                    time_t(0), uint32_t(0)),
+                      memcached_last_error_message(memc));
+  }
+
+  for (ptrdiff_t loop= 0; loop < 20; loop++)
+  {
+    if (random() %2)
+    {
+      test_compare(MEMCACHED_SUCCESS, 
+                   memcached_mget(memc, keys.keys_ptr(), keys.lengths_ptr(), keys.size()));
+
+      memcached_result_st *results= memcached_result_create(memc, NULL);
+      test_true(results);
+
+      size_t result_count= 0;
+      memcached_return_t rc;
+      while (memcached_fetch_result(memc, results, &rc))
+      {
+        result_count++;
+      }
+      test_true(keys.size() >= result_count);
+    }
+    else
+    {
+      int which_key= random() % int(keys.size());
+      size_t value_length;
+      uint32_t flags;
+      memcached_return_t rc;
+      char *out_value= memcached_get(memc, keys.key_at(which_key), keys.length_at(which_key),
+                                     &value_length, &flags, &rc);
+      if (rc == MEMCACHED_NOTFOUND)
+      { } // It is possible that the value has been purged.
+      else
+      {
+        test_compare(MEMCACHED_SUCCESS, rc);
+      }
+      test_null(out_value);
+      test_zero(value_length);
+      test_zero(flags);
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t cas2_test(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+  const char *value= "we the people";
+  size_t value_length= strlen("we the people");
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, true));
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               keys[x], key_length[x],
+                               time_t(50), uint32_t(9)));
+  }
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_mget(memc, keys, key_length, 3));
+
+  memcached_result_st *results= memcached_result_create(memc, NULL);
+  test_true(results);
+
+  memcached_return_t rc;
+  results= memcached_fetch_result(memc, results, &rc);
+  test_true(results);
+  test_true(results->item_cas);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(memcached_result_cas(results));
+
+  test_memcmp(value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  memcached_result_free(results);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t cas_test(memcached_st *memc)
+{
+  const char* keys[2] = { __func__, NULL };
+  size_t keylengths[2] = { strlen(__func__), 0 };
+
+  memcached_result_st results_obj;
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  test_skip(true, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, true));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("we the people"),
+                             (time_t)0, (uint32_t)0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, keylengths, 1));
+
+  memcached_result_st *results= memcached_result_create(memc, &results_obj);
+  test_true(results);
+
+  memcached_return_t rc;
+  results= memcached_fetch_result(memc, &results_obj, &rc);
+  test_true(results);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(memcached_result_cas(results));
+  test_memcmp("we the people", memcached_result_value(results), test_literal_param_size("we the people"));
+  test_compare(test_literal_param_size("we the people"),
+               strlen(memcached_result_value(results)));
+
+  uint64_t cas= memcached_result_cas(results);
+
+#if 0
+  results= memcached_fetch_result(memc, &results_obj, &rc);
+  test_true(rc == MEMCACHED_END);
+  test_true(results == NULL);
+#endif
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_cas(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("change the value"),
+                             0, 0, cas));
+
+  /*
+   * The item will have a new cas value, so try to set it again with the old
+   * value. This should fail!
+   */
+  test_compare(MEMCACHED_DATA_EXISTS,
+               memcached_cas(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("change the value"),
+                             0, 0, cas));
+
+  memcached_result_free(&results_obj);
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t prepend_test(memcached_st *memc)
+{
+  const char *key= "fig";
+  const char *value= "people";
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc, key, strlen(key),
+                             value, strlen(value),
+                             time_t(0), uint32_t(0)));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_prepend(memc, key, strlen(key),
+                                 "the ", strlen("the "),
+                                 time_t(0), uint32_t(0)));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_prepend(memc, key, strlen(key),
+                                 "we ", strlen("we "),
+                                 time_t(0), uint32_t(0)));
+
+  size_t value_length;
+  uint32_t flags;
+  memcached_return_t rc;
+  char *out_value= memcached_get(memc, key, strlen(key),
+                       &value_length, &flags, &rc);
+  test_memcmp(out_value, "we the people", strlen("we the people"));
+  test_compare(strlen("we the people"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(out_value);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Set the value, then quit to make sure it is flushed.
+  Come back in and test that add fails.
+*/
+test_return_t memcached_add_SUCCESS_TEST(memcached_st *memc)
+{
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param(__func__), NULL, NULL, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_add(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("try something else"),
+                             time_t(0), uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_1067242_TEST(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc,
+                                                test_literal_param(__func__), 
+                                                test_literal_param("-2"),
+                                                0, 0));
+
+  memcached_return_t rc;
+  char* value;
+  test_true((value= memcached_get(memc, test_literal_param(__func__), NULL, NULL, &rc)));
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(value);
+
+  for (size_t x= 0; x < 10; x++)
+  {
+    uint64_t new_number;
+    test_compare(MEMCACHED_CLIENT_ERROR,
+                 memcached_increment(memc, 
+                                     test_literal_param(__func__), 1, &new_number));
+    test_compare(MEMCACHED_CLIENT_ERROR, memcached_last_error(memc));
+    test_true((value= memcached_get(memc, test_literal_param(__func__), NULL, NULL, &rc)));
+    test_compare(MEMCACHED_SUCCESS, rc);
+    free(value);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Set the value, then quit to make sure it is flushed.
+  Come back in and test that add fails.
+*/
+test_return_t add_test(memcached_st *memc)
+{
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("when we sanitize"),
+                             time_t(0), uint32_t(0)));
+
+  memcached_quit(memc);
+
+  size_t value_length;
+  uint32_t flags;
+  memcached_return_t rc;
+  char *check_value= memcached_get(memc,
+                                   test_literal_param(__func__),
+                                   &value_length, &flags, &rc);
+  test_memcmp(check_value, "when we sanitize", strlen("when we sanitize"));
+  test_compare(test_literal_param_size("when we sanitize"), value_length);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(check_value);
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) ? MEMCACHED_DATA_EXISTS : MEMCACHED_NOTSTORED,
+               memcached_add(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("try something else"),
+                             time_t(0), uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+/*
+** There was a problem of leaking filedescriptors in the initial release
+** of MacOSX 10.5. This test case triggers the problem. On some Solaris
+** systems it seems that the kernel is slow on reclaiming the resources
+** because the connects starts to time out (the test doesn't do much
+** anyway, so just loop 10 iterations)
+*/
+test_return_t add_wrapper(memcached_st *memc)
+{
+  unsigned int max= 10000;
+#ifdef __sun
+  max= 10;
+#endif
+#ifdef __APPLE__
+  max= 10;
+#endif
+
+  for (uint32_t x= 0; x < max; x++)
+  {
+    add_test(memc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replace_test(memcached_st *memc)
+{
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("when we sanitize"),
+                             time_t(0), uint32_t(0)));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_replace(memc,
+                                 test_literal_param(__func__),
+                                 test_literal_param("first we insert some data"),
+                                 time_t(0), uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t delete_test(memcached_st *memc)
+{
+  test_compare(return_value_based_on_buffering(memc), 
+               memcached_set(memc, 
+                             test_literal_param(__func__),
+                             test_literal_param("when we sanitize"),
+                             time_t(0), uint32_t(0)));
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_delete(memc, 
+                                test_literal_param(__func__),
+                                time_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t flush_test(memcached_st *memc)
+{
+  uint64_t query_id= memcached_query_id(memc);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+  test_compare(query_id +1, memcached_query_id(memc));
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t  server_function(const memcached_st *,
+                                           const memcached_instance_st *,
+                                           void *)
+{
+  /* Do Nothing */
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t memcached_server_cursor_test(memcached_st *memc)
+{
+  char context[10];
+  strncpy(context, "foo bad", sizeof(context));
+  memcached_server_fn callbacks[1];
+
+  callbacks[0]= server_function;
+  memcached_server_cursor(memc, callbacks, context,  1);
+  return TEST_SUCCESS;
+}
+
+test_return_t bad_key_test(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const char *key= "foo bad";
+  uint32_t flags;
+
+  uint64_t query_id= memcached_query_id(memc);
+  
+  // Just skip if we are in binary mode.
+  test_skip(false, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  test_compare(query_id, memcached_query_id(memc)); // We should not increase the query_id for memcached_behavior_get()
+
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+
+  query_id= memcached_query_id(memc_clone);
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, true));
+  test_compare(query_id, memcached_query_id(memc_clone)); // We should not increase the query_id for memcached_behavior_set()
+  ASSERT_TRUE(memcached_behavior_get(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY));
+
+  /* All keys are valid in the binary protocol (except for length) */
+  if (memcached_behavior_get(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == false)
+  {
+    uint64_t before_query_id= memcached_query_id(memc_clone);
+    {
+      size_t string_length;
+      char *string= memcached_get(memc_clone, key, strlen(key),
+                                  &string_length, &flags, &rc);
+      test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+      test_zero(string_length);
+      test_false(string);
+    }
+    test_compare(before_query_id +1, memcached_query_id(memc_clone));
+
+    query_id= memcached_query_id(memc_clone);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, false));
+    test_compare(query_id, memcached_query_id(memc_clone)); // We should not increase the query_id for memcached_behavior_set()
+    {
+      size_t string_length;
+      char *string= memcached_get(memc_clone, key, strlen(key),
+                                  &string_length, &flags, &rc);
+      test_compare(MEMCACHED_NOTFOUND, rc);
+      test_zero(string_length);
+      test_false(string);
+    }
+
+    /* Test multi key for bad keys */
+    const char *keys[] = { "GoodKey", "Bad Key", "NotMine" };
+    size_t key_lengths[] = { 7, 7, 7 };
+    query_id= memcached_query_id(memc_clone);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, true));
+    test_compare(query_id, memcached_query_id(memc_clone));
+
+    query_id= memcached_query_id(memc_clone);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_mget(memc_clone, keys, key_lengths, 3));
+    test_compare(query_id +1, memcached_query_id(memc_clone));
+
+    query_id= memcached_query_id(memc_clone);
+    // Grouping keys are not required to follow normal key behaviors
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget_by_key(memc_clone, "foo daddy", 9, keys, key_lengths, 1));
+    test_compare(query_id +1, memcached_query_id(memc_clone));
+
+    /* The following test should be moved to the end of this function when the
+       memcached server is updated to allow max size length of the keys in the
+       binary protocol
+    */
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_callback_set(memc_clone, MEMCACHED_CALLBACK_NAMESPACE, NULL));
+
+    libtest::vchar_t longkey;
+    {
+      libtest::vchar_t::iterator it= longkey.begin();
+      longkey.insert(it, MEMCACHED_MAX_KEY, 'a');
+    }
+
+    test_compare(longkey.size(), size_t(MEMCACHED_MAX_KEY));
+    {
+      size_t string_length;
+      // We subtract 1
+      test_null(memcached_get(memc_clone, &longkey[0], longkey.size() -1, &string_length, &flags, &rc));
+      test_compare(MEMCACHED_NOTFOUND, rc);
+      test_zero(string_length);
+
+      test_null(memcached_get(memc_clone, &longkey[0], longkey.size(), &string_length, &flags, &rc));
+      test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+      test_zero(string_length);
+    }
+  }
+
+  /* Make sure zero length keys are marked as bad */
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, true));
+    size_t string_length;
+    char *string= memcached_get(memc_clone, key, 0,
+                                &string_length, &flags, &rc);
+    test_compare(MEMCACHED_BAD_KEY_PROVIDED, rc);
+    test_zero(string_length);
+    test_false(string);
+  }
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+#define READ_THROUGH_VALUE "set for me"
+static memcached_return_t read_through_trigger(memcached_st *, // memc
+                                               char *, // key
+                                               size_t, //  key_length,
+                                               memcached_result_st *result)
+{
+  return memcached_result_set_value(result, READ_THROUGH_VALUE, strlen(READ_THROUGH_VALUE));
+}
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+test_return_t read_through(memcached_st *memc)
+{
+  memcached_trigger_key_fn cb= (memcached_trigger_key_fn)read_through_trigger;
+
+  size_t string_length;
+  uint32_t flags;
+  memcached_return_t rc;
+  char *string= memcached_get(memc,
+                              test_literal_param(__func__),
+                              &string_length, &flags, &rc);
+
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  test_false(string_length);
+  test_false(string);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_GET_FAILURE, *(void **)&cb));
+
+  string= memcached_get(memc,
+                        test_literal_param(__func__),
+                        &string_length, &flags, &rc);
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_compare(sizeof(READ_THROUGH_VALUE) -1, string_length);
+  test_compare(0, string[sizeof(READ_THROUGH_VALUE) -1]);
+  test_strcmp(READ_THROUGH_VALUE, string);
+  free(string);
+
+  string= memcached_get(memc,
+                        test_literal_param(__func__),
+                        &string_length, &flags, &rc);
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(string);
+  test_compare(string_length, sizeof(READ_THROUGH_VALUE) -1);
+  test_true(string[sizeof(READ_THROUGH_VALUE) -1] == 0);
+  test_strcmp(READ_THROUGH_VALUE, string);
+  free(string);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t set_test2(memcached_st *memc)
+{
+  for (uint32_t x= 0; x < 10; x++)
+  {
+    test_compare(return_value_based_on_buffering(memc),
+                 memcached_set(memc,
+                               test_literal_param("foo"),
+                               test_literal_param("train in the brain"),
+                               time_t(0), uint32_t(0)));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t set_test3(memcached_st *memc)
+{
+  size_t value_length= 8191;
+
+  libtest::vchar_t value;
+  value.reserve(value_length);
+  for (uint32_t x= 0; x < value_length; x++)
+  {
+    value.push_back(char(x % 127));
+  }
+
+  /* The dump test relies on there being at least 32 items in memcached */
+  for (uint32_t x= 0; x < 32; x++)
+  {
+    char key[16];
+
+    snprintf(key, sizeof(key), "foo%u", x);
+
+    uint64_t query_id= memcached_query_id(memc);
+    test_compare(return_value_based_on_buffering(memc),
+                 memcached_set(memc, key, strlen(key),
+                               &value[0], value.size(),
+                               time_t(0), uint32_t(0)));
+    test_compare(query_id +1, memcached_query_id(memc));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_end(memcached_st *memc)
+{
+  const char *keys[]= { "foo", "foo2" };
+  size_t lengths[]= { 3, 4 };
+  const char *values[]= { "fjord", "41" };
+
+  // Set foo and foo2
+  for (size_t x= 0; x < test_array_length(keys); x++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc,
+                               keys[x], lengths[x],
+                               values[x], strlen(values[x]),
+                               time_t(0), uint32_t(0)));
+  }
+
+  char *string;
+  size_t string_length;
+  uint32_t flags;
+
+  // retrieve both via mget
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc,
+                              keys, lengths,
+                              test_array_length(keys)));
+
+  char key[MEMCACHED_MAX_KEY];
+  size_t key_length;
+  memcached_return_t rc;
+
+  // this should get both
+  for (size_t x= 0; x < test_array_length(keys); x++)
+  {
+    string= memcached_fetch(memc, key, &key_length, &string_length,
+                            &flags, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    int val = 0;
+    if (key_length == 4)
+    {
+      val= 1;
+    }
+
+    test_compare(string_length, strlen(values[val]));
+    test_true(strncmp(values[val], string, string_length) == 0);
+    free(string);
+  }
+
+  // this should indicate end
+  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
+  test_compare(MEMCACHED_END, rc);
+  test_null(string);
+
+  // now get just one
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, lengths, 1));
+
+  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
+  test_compare(key_length, lengths[0]);
+  test_true(strncmp(keys[0], key, key_length) == 0);
+  test_compare(string_length, strlen(values[0]));
+  test_true(strncmp(values[0], string, string_length) == 0);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(string);
+
+  // this should indicate end
+  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
+  test_compare(MEMCACHED_END, rc);
+  test_null(string);
+
+  return TEST_SUCCESS;
+}
+
+/* Do not copy the style of this code, I just access hosts to testthis function */
+test_return_t stats_servername_test(memcached_st *memc)
+{
+  memcached_stat_st memc_stat;
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  if (LIBMEMCACHED_WITH_SASL_SUPPORT and memcached_get_sasl_callbacks(memc))
+  {
+    return TEST_SKIPPED;
+  }
+
+  test_compare(MEMCACHED_SUCCESS, memcached_stat_servername(&memc_stat, NULL,
+                                                            memcached_server_name(instance),
+                                                            memcached_server_port(instance)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t increment_test(memcached_st *memc)
+{
+  uint64_t new_number;
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc, 
+                             test_literal_param("number"),
+                             test_literal_param("0"),
+                             (time_t)0, (uint32_t)0));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(memc, test_literal_param("number"), 1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(memc, test_literal_param("number"), 1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t __increment_with_initial_test(memcached_st *memc, uint64_t initial)
+{
+  uint64_t new_number;
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL))
+  {
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_increment_with_initial(memc, test_literal_param("number"), 1, initial, 0, &new_number));
+    test_compare(new_number, initial);
+
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_increment_with_initial(memc, test_literal_param("number"), 1, initial, 0, &new_number));
+    test_compare(new_number, (initial +1));
+  }
+  else
+  {
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, 
+                 memcached_increment_with_initial(memc, test_literal_param("number"), 1, initial, 0, &new_number));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t increment_with_initial_test(memcached_st *memc)
+{
+  return __increment_with_initial_test(memc, 0);
+}
+
+test_return_t increment_with_initial_999_test(memcached_st *memc)
+{
+  return __increment_with_initial_test(memc, 999);
+}
+
+test_return_t decrement_test(memcached_st *memc)
+{
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("3"),
+                             time_t(0), uint32_t(0)));
+  
+  // Make sure we flush the value we just set
+  test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+  uint64_t new_number;
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement(memc,
+                                   test_literal_param(__func__),
+                                   1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement(memc,
+                                   test_literal_param(__func__),
+                                   1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t __decrement_with_initial_test(memcached_st *memc, uint64_t initial)
+{
+  test_skip(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+  uint64_t new_number;
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement_with_initial(memc,
+                                                test_literal_param(__func__),
+                                                1, initial, 
+                                                0, &new_number));
+  test_compare(new_number, initial);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement_with_initial(memc,
+                                                test_literal_param(__func__),
+                                                1, initial, 
+                                                0, &new_number));
+  test_compare(new_number, (initial - 1));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t decrement_with_initial_test(memcached_st *memc)
+{
+  return __decrement_with_initial_test(memc, 3);
+}
+
+test_return_t decrement_with_initial_999_test(memcached_st *memc)
+{
+  return __decrement_with_initial_test(memc, 999);
+}
+
+test_return_t increment_by_key_test(memcached_st *memc)
+{
+  const char *master_key= "foo";
+  const char *key= "number";
+  const char *value= "0";
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set_by_key(memc, master_key, strlen(master_key),
+                                    key, strlen(key),
+                                    value, strlen(value),
+                                    time_t(0), uint32_t(0)));
+  
+  // Make sure we flush the value we just set
+  test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+  uint64_t new_number;
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_increment_by_key(memc, master_key, strlen(master_key),
+                                          key, strlen(key), 1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_increment_by_key(memc, master_key, strlen(master_key),
+                                          key, strlen(key), 1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t increment_with_initial_by_key_test(memcached_st *memc)
+{
+  uint64_t new_number;
+  const char *master_key= "foo";
+  const char *key= "number";
+  uint64_t initial= 0;
+
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL))
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
+                                                         key, strlen(key),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, initial);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
+                                                         key, strlen(key),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, (initial +1));
+  }
+  else
+  {
+    test_compare(MEMCACHED_INVALID_ARGUMENTS,
+                 memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
+                                                         key, strlen(key),
+                                                         1, initial, 0, &new_number));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t decrement_by_key_test(memcached_st *memc)
+{
+  uint64_t new_number;
+  const char *value= "3";
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set_by_key(memc,
+                                    test_literal_param("foo"),
+                                    test_literal_param("number"),
+                                    value, strlen(value),
+                                    (time_t)0, (uint32_t)0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement_by_key(memc,
+                                          test_literal_param("foo"),
+                                          test_literal_param("number"),
+                                          1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_decrement_by_key(memc,
+                                          test_literal_param("foo"),
+                                          test_literal_param("number"),
+                                          1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t decrement_with_initial_by_key_test(memcached_st *memc)
+{
+  test_skip(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  uint64_t new_number;
+  uint64_t initial= 3;
+
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL))
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_decrement_with_initial_by_key(memc,
+                                                         test_literal_param("foo"),
+                                                         test_literal_param("number"),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, initial);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_decrement_with_initial_by_key(memc,
+                                                         test_literal_param("foo"),
+                                                         test_literal_param("number"),
+                                                         1, initial, 0, &new_number));
+    test_compare(new_number, (initial - 1));
+  }
+  else
+  {
+    test_compare(MEMCACHED_INVALID_ARGUMENTS,
+                 memcached_decrement_with_initial_by_key(memc,
+                                                         test_literal_param("foo"),
+                                                         test_literal_param("number"),
+                                                         1, initial, 0, &new_number));
+  }
+
+  return TEST_SUCCESS;
+}
+test_return_t binary_increment_with_prefix_test(memcached_st *memc)
+{
+  test_skip(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, (void *)"namespace:"));
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param("number"),
+                             test_literal_param("0"),
+                             (time_t)0, (uint32_t)0));
+
+  uint64_t new_number;
+  test_compare(MEMCACHED_SUCCESS, memcached_increment(memc, 
+                                                      test_literal_param("number"), 
+                                                      1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_increment(memc,
+                                                      test_literal_param("number"),
+                                                      1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t quit_test(memcached_st *memc)
+{
+  const char *value= "sanford and sun";
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             value, strlen(value),
+                             time_t(10), uint32_t(3)));
+  memcached_quit(memc);
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             value, strlen(value),
+                             time_t(50), uint32_t(9)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_result_test(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+
+  memcached_result_st results_obj;
+  memcached_result_st *results= memcached_result_create(memc, &results_obj);
+  test_true(results);
+  test_true(&results_obj == results);
+
+  /* We need to empty the server before continueing test */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  memcached_return_t rc;
+  while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
+  {
+    test_true(results);
+  }
+
+  while ((results= memcached_fetch_result(memc, &results_obj, &rc))) { test_true(false); /* We should never see a value returned */ };
+  test_false(results);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    rc= memcached_set(memc, keys[x], key_length[x],
+                      keys[x], key_length[x],
+                      (time_t)50, (uint32_t)9);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
+  {
+    test_true(results);
+    test_true(&results_obj == results);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_memcmp(memcached_result_key_value(results),
+                memcached_result_value(results),
+                memcached_result_length(results));
+    test_compare(memcached_result_key_length(results), memcached_result_length(results));
+  }
+
+  memcached_result_free(&results_obj);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_result_alloc_test(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+
+  memcached_result_st *results;
+
+  /* We need to empty the server before continueing test */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  memcached_return_t rc;
+  while ((results= memcached_fetch_result(memc, NULL, &rc)))
+  {
+    test_true(results);
+  }
+  test_false(results);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    rc= memcached_set(memc, keys[x], key_length[x],
+                      keys[x], key_length[x],
+                      (time_t)50, (uint32_t)9);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  uint32_t x= 0;
+  while ((results= memcached_fetch_result(memc, NULL, &rc)))
+  {
+    test_true(results);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(memcached_result_key_length(results), memcached_result_length(results));
+    test_memcmp(memcached_result_key_value(results),
+                memcached_result_value(results),
+                memcached_result_length(results));
+    memcached_result_free(results);
+    x++;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_result_function(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+  size_t counter;
+  memcached_execute_fn callbacks[1];
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    test_compare(return_value_based_on_buffering(memc), 
+                 memcached_set(memc, keys[x], key_length[x],
+                               keys[x], key_length[x],
+                               time_t(50), uint32_t(9)));
+  }
+  test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+  memcached_quit(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  callbacks[0]= &callback_counter;
+  counter= 0;
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+
+  test_compare(size_t(3), counter);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_test(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  char *return_value;
+  size_t return_value_length;
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  uint32_t flags;
+  memcached_return_t rc;
+  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                        &return_value_length, &flags, &rc)))
+  {
+    test_true(return_value);
+  }
+  test_false(return_value);
+  test_zero(return_value_length);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    rc= memcached_set(memc, keys[x], key_length[x],
+                      keys[x], key_length[x],
+                      (time_t)50, (uint32_t)9);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  uint32_t x= 0;
+  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                        &return_value_length, &flags, &rc)))
+  {
+    test_true(return_value);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    if (not memc->_namespace)
+    {
+      test_compare(return_key_length, return_value_length);
+      test_memcmp(return_value, return_key, return_value_length);
+    }
+    free(return_value);
+    x++;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t mget_execute(memcached_st *original_memc)
+{
+  test_skip(true, memcached_behavior_get(original_memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  memcached_st *memc= create_single_instance_memcached(original_memc, "--BINARY-PROTOCOL");
+  test_true(memc);
+
+  keys_st keys(20480);
+
+  /* First add all of the items.. */
+  char blob[1024] = {0};
+
+  for (size_t x= 0; x < keys.size(); ++x)
+  {
+    uint64_t query_id= memcached_query_id(memc);
+    memcached_return_t rc= memcached_add(memc,
+                                         keys.key_at(x), keys.length_at(x),
+                                         blob, sizeof(blob),
+                                         0, 0);
+    ASSERT_TRUE_(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, "Returned %s", memcached_strerror(NULL, rc));
+    test_compare(query_id +1, memcached_query_id(memc));
+  }
+
+  /* Try to get all of them with a large multiget */
+  size_t counter= 0;
+  memcached_execute_fn callbacks[]= { &callback_counter };
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_mget_execute(memc,
+                                      keys.keys_ptr(), keys.lengths_ptr(),
+                                      keys.size(), callbacks, &counter, 1));
+
+  {
+    uint64_t query_id= memcached_query_id(memc);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+    test_compare(query_id, memcached_query_id(memc));
+
+    /* Verify that we got all of the items */
+    test_compare(keys.size(), counter);
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH_TEST(memcached_st *original_memc)
+{
+  test_skip(true, memcached_behavior_get(original_memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  memcached_st *memc= create_single_instance_memcached(original_memc, "--BINARY-PROTOCOL");
+  test_true(memc);
+
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, 8));
+
+  keys_st keys(20480);
+
+  /* First add all of the items.. */
+  char blob[1024] = {0};
+
+  for (size_t x= 0; x < keys.size(); ++x)
+  {
+    uint64_t query_id= memcached_query_id(memc);
+    memcached_return_t rc= memcached_add(memc,
+                                         keys.key_at(x), keys.length_at(x),
+                                         blob, sizeof(blob),
+                                         0, 0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+    test_compare(query_id +1, memcached_query_id(memc));
+  }
+
+  /* Try to get all of them with a large multiget */
+  size_t counter= 0;
+  memcached_execute_fn callbacks[]= { &callback_counter };
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_mget_execute(memc,
+                                      keys.keys_ptr(), keys.lengths_ptr(),
+                                      keys.size(), callbacks, &counter, 1));
+
+  {
+    uint64_t query_id= memcached_query_id(memc);
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+    test_compare(query_id, memcached_query_id(memc));
+
+    /* Verify that we got all of the items */
+    test_compare(keys.size(), counter);
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+#define REGRESSION_BINARY_VS_BLOCK_COUNT  20480
+static pairs_st *global_pairs= NULL;
+
+test_return_t key_setup(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_binary(memc));
+
+  global_pairs= pairs_generate(REGRESSION_BINARY_VS_BLOCK_COUNT, 0);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t key_teardown(memcached_st *)
+{
+  pairs_free(global_pairs);
+  global_pairs= NULL;
+
+  return TEST_SUCCESS;
+}
+
+test_return_t block_add_regression(memcached_st *memc)
+{
+  /* First add all of the items.. */
+  for (ptrdiff_t x= 0; x < REGRESSION_BINARY_VS_BLOCK_COUNT; ++x)
+  {
+    libtest::vchar_t blob;
+    libtest::vchar::make(blob, 1024);
+
+    memcached_return_t rc= memcached_add_by_key(memc,
+                                                test_literal_param("bob"),
+                                                global_pairs[x].key, global_pairs[x].key_length,
+                                                &blob[0], blob.size(),
+                                                time_t(0), uint32_t(0));
+    if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+    {
+      Error << memcached_last_error_message(memc);
+      return TEST_SKIPPED;
+    }
+    test_compare(*memc, MEMCACHED_SUCCESS);
+    test_compare(rc, MEMCACHED_SUCCESS);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t binary_add_regression(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
+  return block_add_regression(memc);
+}
+
+test_return_t get_stats_keys(memcached_st *memc)
+{
+ char **stat_list;
+ char **ptr;
+ memcached_stat_st memc_stat;
+ memcached_return_t rc;
+
+ stat_list= memcached_stat_get_keys(memc, &memc_stat, &rc);
+ test_compare(MEMCACHED_SUCCESS, rc);
+ for (ptr= stat_list; *ptr; ptr++)
+   test_true(*ptr);
+
+ free(stat_list);
+
+ return TEST_SUCCESS;
+}
+
+test_return_t version_string_test(memcached_st *)
+{
+  test_strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version());
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_stats(memcached_st *memc)
+{
+ memcached_return_t rc;
+
+ memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
+ test_compare(MEMCACHED_SUCCESS, rc);
+ test_true(memc_stat);
+
+ for (uint32_t x= 0; x < memcached_server_count(memc); x++)
+ {
+   char **stat_list= memcached_stat_get_keys(memc, memc_stat+x, &rc);
+   test_compare(MEMCACHED_SUCCESS, rc);
+   for (char **ptr= stat_list; *ptr; ptr++) {};
+
+   free(stat_list);
+ }
+
+ memcached_stat_free(NULL, memc_stat);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t add_host_test(memcached_st *memc)
+{
+  char servername[]= "0.example.com";
+
+  memcached_return_t rc;
+  memcached_server_st *servers= memcached_server_list_append_with_weight(NULL, servername, 400, 0, &rc);
+  test_compare(1U, memcached_server_list_count(servers));
+
+  for (unsigned int x= 2; x < 20; x++)
+  {
+    char buffer[SMALL_STRING_LEN];
+
+    snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
+    servers= memcached_server_list_append_with_weight(servers, buffer, 401, 0,
+                                     &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(x, memcached_server_list_count(servers));
+  }
+
+  test_compare(MEMCACHED_SUCCESS, memcached_server_push(memc, servers));
+  test_compare(MEMCACHED_SUCCESS, memcached_server_push(memc, servers));
+
+  memcached_server_list_free(servers);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_1048945_TEST(memcached_st*)
+{
+  memcached_return status;
+
+  memcached_server_st* list= memcached_server_list_append_with_weight(NULL, "a", 11211, 0, &status);
+  test_compare(status, MEMCACHED_SUCCESS);
+
+  list= memcached_server_list_append_with_weight(list, "b", 11211, 0, &status);
+  test_compare(status, MEMCACHED_SUCCESS);
+
+  list= memcached_server_list_append_with_weight(list, "c", 11211, 0, &status);
+  test_compare(status, MEMCACHED_SUCCESS);
+
+  memcached_st* memc= memcached_create(NULL);
+
+  status= memcached_server_push(memc, list);
+  memcached_server_list_free(list);
+  test_compare(status, MEMCACHED_SUCCESS);
+
+  const memcached_instance_st * server= memcached_server_by_key(memc, test_literal_param(__func__), &status);
+  test_true(server);
+  test_compare(status, MEMCACHED_SUCCESS);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_fetch_result_NOT_FOUND(memcached_st *memc)
+{
+  memcached_return_t rc;
+
+  const char *key= "not_found";
+  size_t key_length= test_literal_param_size("not_found");
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, &key, &key_length, 1));
+
+  memcached_result_st *result= memcached_fetch_result(memc, NULL, &rc);
+  test_null(result);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  memcached_result_free(result);
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t  clone_test_callback(memcached_st *, memcached_st *)
+{
+  return MEMCACHED_SUCCESS;
+}
+
+static memcached_return_t  cleanup_test_callback(memcached_st *)
+{
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t callback_test(memcached_st *memc)
+{
+  /* Test User Data */
+  {
+    int x= 5;
+    int *test_ptr;
+    memcached_return_t rc;
+
+    test_compare(MEMCACHED_SUCCESS, memcached_callback_set(memc, MEMCACHED_CALLBACK_USER_DATA, &x));
+    test_ptr= (int *)memcached_callback_get(memc, MEMCACHED_CALLBACK_USER_DATA, &rc);
+    test_true(*test_ptr == x);
+  }
+
+  /* Test Clone Callback */
+  {
+    memcached_clone_fn clone_cb= (memcached_clone_fn)clone_test_callback;
+    void *clone_cb_ptr= *(void **)&clone_cb;
+    void *temp_function= NULL;
+
+    test_compare(MEMCACHED_SUCCESS, memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, clone_cb_ptr));
+    memcached_return_t rc;
+    temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+    test_true(temp_function == clone_cb_ptr);
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  /* Test Cleanup Callback */
+  {
+    memcached_cleanup_fn cleanup_cb= (memcached_cleanup_fn)cleanup_test_callback;
+    void *cleanup_cb_ptr= *(void **)&cleanup_cb;
+    void *temp_function= NULL;
+    memcached_return_t rc;
+
+    test_compare(MEMCACHED_SUCCESS, memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, cleanup_cb_ptr));
+    temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+    test_true(temp_function == cleanup_cb_ptr);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/* We don't test the behavior itself, we test the switches */
+test_return_t behavior_test(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 1);
+  test_compare(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
+  test_compare(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, MEMCACHED_HASH_MD5);
+  test_compare(uint64_t(MEMCACHED_HASH_MD5), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
+  test_zero(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 0);
+  test_zero(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, MEMCACHED_HASH_DEFAULT);
+  test_compare(uint64_t(MEMCACHED_HASH_DEFAULT), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, MEMCACHED_HASH_CRC);
+  test_compare(uint64_t(MEMCACHED_HASH_CRC), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH));
+
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE));
+
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE));
+
+  uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, value +1);
+  test_compare((value +1),  memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t MEMCACHED_BEHAVIOR_CORK_test(memcached_st *memc)
+{
+  test_compare(MEMCACHED_DEPRECATED, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CORK, true));
+
+  // Platform dependent
+#if 0
+  bool value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_CORK);
+  test_false(value);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test(memcached_st *memc)
+{
+  memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_KEEPALIVE, true);
+  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED);
+
+  bool value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_KEEPALIVE);
+
+  if (memcached_success(rc))
+  {
+    test_true(value);
+  }
+  else
+  {
+    test_false(value);
+  }
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test(memcached_st *memc)
+{
+  memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_KEEPIDLE, true);
+  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED);
+
+  bool value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_KEEPIDLE);
+
+  if (memcached_success(rc))
+  {
+    test_true(value);
+  }
+  else
+  {
+    test_false(value);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/* Make sure we behave properly if server list has no values */
+test_return_t user_supplied_bug4(memcached_st *memc)
+{
+  const char *keys[]= {"fudge", "son", "food"};
+  size_t key_length[]= {5, 3, 4};
+
+  /* Here we free everything before running a bunch of mget tests */
+  memcached_servers_reset(memc);
+
+
+  /* We need to empty the server before continueing test */
+  test_compare(MEMCACHED_NO_SERVERS,
+               memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_NO_SERVERS,
+               memcached_mget(memc, keys, key_length, 3));
+
+  {
+    unsigned int keys_returned;
+    memcached_return_t rc;
+    test_compare(TEST_SUCCESS, fetch_all_results(memc, keys_returned, rc));
+    test_compare(MEMCACHED_NOTFOUND, rc);
+    test_zero(keys_returned);
+  }
+
+  for (uint32_t x= 0; x < 3; x++)
+  {
+    test_compare(MEMCACHED_NO_SERVERS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               keys[x], key_length[x],
+                               (time_t)50, (uint32_t)9));
+  }
+
+  test_compare(MEMCACHED_NO_SERVERS, 
+               memcached_mget(memc, keys, key_length, 3));
+
+  {
+    char *return_value;
+    char return_key[MEMCACHED_MAX_KEY];
+    memcached_return_t rc;
+    size_t return_key_length;
+    size_t return_value_length;
+    uint32_t flags;
+    uint32_t x= 0;
+    while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                          &return_value_length, &flags, &rc)))
+    {
+      test_true(return_value);
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_true(return_key_length == return_value_length);
+      test_memcmp(return_value, return_key, return_value_length);
+      free(return_value);
+      x++;
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+#define VALUE_SIZE_BUG5 1048064
+test_return_t user_supplied_bug5(memcached_st *memc)
+{
+  const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
+  size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
+  char *value;
+  size_t value_length;
+  uint32_t flags;
+  char *insert_data= new (std::nothrow) char[VALUE_SIZE_BUG5];
+
+  for (uint32_t x= 0; x < VALUE_SIZE_BUG5; x++)
+  {
+    insert_data[x]= (signed char)rand();
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_flush(memc, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, keys[0], key_length[0], &value_length, &flags, &rc));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 4));
+
+  unsigned int count;
+  test_compare(TEST_SUCCESS, fetch_all_results(memc, count, rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  test_zero(count);
+
+  for (uint32_t x= 0; x < 4; x++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               insert_data, VALUE_SIZE_BUG5,
+                               (time_t)0, (uint32_t)0));
+  }
+
+  for (uint32_t x= 0; x < 10; x++)
+  {
+    value= memcached_get(memc, keys[0], key_length[0],
+                         &value_length, &flags, &rc);
+    test_compare(rc, MEMCACHED_SUCCESS);
+    test_true(value);
+    ::free(value);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, keys, key_length, 4));
+
+    test_compare(TEST_SUCCESS, fetch_all_results(memc, count));
+    test_compare(4U, count);
+  }
+  delete [] insert_data;
+
+  return TEST_SUCCESS;
+}
+
+test_return_t user_supplied_bug6(memcached_st *memc)
+{
+  const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
+  size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  char *value;
+  size_t value_length;
+  uint32_t flags;
+  char *insert_data= new (std::nothrow) char[VALUE_SIZE_BUG5];
+
+  for (uint32_t x= 0; x < VALUE_SIZE_BUG5; x++)
+  {
+    insert_data[x]= (signed char)rand();
+  }
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  test_compare(TEST_SUCCESS, confirm_keys_dont_exist(memc, keys, test_array_length(keys)));
+
+  // We will now confirm that memcached_mget() returns success, but we will
+  // then check to make sure that no actual keys are returned.
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 4));
+
+  memcached_return_t rc;
+  uint32_t count= 0;
+  while ((value= memcached_fetch(memc, return_key, &return_key_length,
+                                 &value_length, &flags, &rc)))
+  {
+    count++;
+  }
+  test_zero(count);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  for (uint32_t x= 0; x < test_array_length(keys); x++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], key_length[x],
+                               insert_data, VALUE_SIZE_BUG5,
+                               (time_t)0, (uint32_t)0));
+  }
+  test_compare(TEST_SUCCESS, confirm_keys_exist(memc, keys, test_array_length(keys)));
+
+  for (uint32_t x= 0; x < 2; x++)
+  {
+    value= memcached_get(memc, keys[0], key_length[0],
+                         &value_length, &flags, &rc);
+    test_true(value);
+    free(value);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, keys, key_length, 4));
+    /* We test for purge of partial complete fetches */
+    for (count= 3; count; count--)
+    {
+      value= memcached_fetch(memc, return_key, &return_key_length,
+                             &value_length, &flags, &rc);
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_memcmp(value, insert_data, value_length);
+      test_true(value_length);
+      free(value);
+    }
+  }
+  delete [] insert_data;
+
+  return TEST_SUCCESS;
+}
+
+test_return_t user_supplied_bug8(memcached_st *)
+{
+  memcached_return_t rc;
+  memcached_st *mine;
+  memcached_st *memc_clone;
+
+  memcached_server_st *servers;
+  const char *server_list= "memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
+
+  servers= memcached_servers_parse(server_list);
+  test_true(servers);
+
+  mine= memcached_create(NULL);
+  rc= memcached_server_push(mine, servers);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  memcached_server_list_free(servers);
+
+  test_true(mine);
+  memc_clone= memcached_clone(NULL, mine);
+
+  memcached_quit(mine);
+  memcached_quit(memc_clone);
+
+
+  memcached_free(mine);
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+/* Test flag store/retrieve */
+test_return_t user_supplied_bug7(memcached_st *memc)
+{
+  char *insert_data= new (std::nothrow) char[VALUE_SIZE_BUG5];
+  test_true(insert_data);
+
+  for (size_t x= 0; x < VALUE_SIZE_BUG5; x++)
+  {
+    insert_data[x]= (signed char)rand();
+  }
+
+  memcached_flush(memc, 0);
+
+  const char *keys= "036790384900";
+  size_t key_length=  strlen(keys);
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc, keys, key_length,
+                                                insert_data, VALUE_SIZE_BUG5,
+                                                time_t(0), 245U));
+
+  memcached_return_t rc;
+  size_t value_length;
+  uint32_t flags= 0;
+  char *value= memcached_get(memc, keys, key_length,
+                             &value_length, &flags, &rc);
+  test_compare(245U, flags);
+  test_true(value);
+  free(value);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_mget(memc, &keys, &key_length, 1));
+
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  flags= 0;
+  value= memcached_fetch(memc, return_key, &return_key_length,
+                         &value_length, &flags, &rc);
+  test_compare(uint32_t(245), flags);
+  test_true(value);
+  free(value);
+  delete [] insert_data;
+
+
+  return TEST_SUCCESS;
+}
+
+test_return_t user_supplied_bug9(memcached_st *memc)
+{
+  const char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};
+  size_t key_length[3];
+  uint32_t flags;
+  unsigned count= 0;
+
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  char *return_value;
+  size_t return_value_length;
+
+
+  key_length[0]= strlen("UDATA:edevil@sapo.pt");
+  key_length[1]= strlen("fudge&*@#");
+  key_length[2]= strlen("for^#@&$not");
+
+
+  for (unsigned int x= 0; x < 3; x++)
+  {
+    memcached_return_t rc= memcached_set(memc, keys[x], key_length[x],
+                                         keys[x], key_length[x],
+                                         (time_t)50, (uint32_t)9);
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  memcached_return_t rc= memcached_mget(memc, keys, key_length, 3);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  /* We need to empty the server before continueing test */
+  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                        &return_value_length, &flags, &rc)) != NULL)
+  {
+    test_true(return_value);
+    free(return_value);
+    count++;
+  }
+  test_compare(3U, count);
+
+  return TEST_SUCCESS;
+}
+
+/* We are testing with aggressive timeout to get failures */
+test_return_t user_supplied_bug10(memcached_st *memc)
+{
+  test_skip(memc->servers[0].type, MEMCACHED_CONNECTION_TCP);
+
+  size_t value_length= 512;
+  unsigned int set= 1;
+  memcached_st *mclone= memcached_clone(NULL, memc);
+
+  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
+  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
+  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, uint64_t(0));
+
+  libtest::vchar_t value;
+  value.reserve(value_length);
+  for (uint32_t x= 0; x < value_length; x++)
+  {
+    value.push_back(char(x % 127));
+  }
+
+  for (unsigned int x= 1; x <= 100000; ++x)
+  {
+    memcached_return_t rc= memcached_set(mclone, 
+                                         test_literal_param("foo"),
+                                         &value[0], value.size(),
+                                         0, 0);
+
+    test_true((rc == MEMCACHED_SUCCESS or rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_BUFFERED or rc == MEMCACHED_TIMEOUT or rc == MEMCACHED_CONNECTION_FAILURE 
+               or rc == MEMCACHED_SERVER_TEMPORARILY_DISABLED));
+
+    if (rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_TIMEOUT)
+    {
+      x--;
+    }
+  }
+
+  memcached_free(mclone);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  We are looking failures in the async protocol
+*/
+test_return_t user_supplied_bug11(memcached_st *memc)
+{
+  (void)memc;
+#ifndef __APPLE__
+  test::Memc mclone(memc);
+
+  memcached_behavior_set(&mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, true);
+  memcached_behavior_set(&mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, true);
+  memcached_behavior_set(&mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, size_t(-1));
+
+  test_compare(-1, int32_t(memcached_behavior_get(&mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT)));
+
+  libtest::vchar_t value;
+  value.reserve(512);
+  for (unsigned int x= 0; x < 512; x++)
+  {
+    value.push_back(char(x % 127));
+  }
+
+  for (unsigned int x= 1; x <= 100000; ++x)
+  {
+    memcached_return_t rc= memcached_set(&mclone, test_literal_param("foo"), &value[0], value.size(), 0, 0);
+    (void)rc;
+  }
+
+#endif
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Bug found where incr was not returning MEMCACHED_NOTFOUND when object did not exist.
+*/
+test_return_t user_supplied_bug12(memcached_st *memc)
+{
+  memcached_return_t rc;
+  uint32_t flags;
+  size_t value_length;
+  char *value;
+  uint64_t number_value;
+
+  value= memcached_get(memc, "autoincrement", strlen("autoincrement"),
+                       &value_length, &flags, &rc);
+  test_null(value);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  rc= memcached_increment(memc, "autoincrement", strlen("autoincrement"),
+                          1, &number_value);
+  test_null(value);
+  /* The binary protocol will set the key if it doesn't exist */
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1)
+  {
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+  else
+  {
+    test_compare(MEMCACHED_NOTFOUND, rc);
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, "autoincrement", strlen("autoincrement"), "1", 1, 0, 0));
+
+  value= memcached_get(memc, "autoincrement", strlen("autoincrement"), &value_length, &flags, &rc);
+  test_true(value);
+  free(value);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_increment(memc, "autoincrement", strlen("autoincrement"), 1, &number_value));
+  test_compare(2UL, number_value);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Bug found where command total one more than MEMCACHED_MAX_BUFFER
+  set key34567890 0 0 8169 \r\n is sent followed by buffer of size 8169, followed by 8169
+*/
+test_return_t user_supplied_bug13(memcached_st *memc)
+{
+  char key[] = "key34567890";
+
+  char commandFirst[]= "set key34567890 0 0 ";
+  char commandLast[] = " \r\n"; /* first line of command sent to server */
+  size_t commandLength;
+
+  commandLength = strlen(commandFirst) + strlen(commandLast) + 4; /* 4 is number of characters in size, probably 8196 */
+
+  size_t overflowSize = MEMCACHED_MAX_BUFFER - commandLength;
+
+  for (size_t testSize= overflowSize - 1; testSize < overflowSize + 1; testSize++)
+  {
+    char *overflow= new (std::nothrow) char[testSize];
+    test_true(overflow);
+
+    memset(overflow, 'x', testSize);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, key, strlen(key),
+                               overflow, testSize, 0, 0));
+    delete [] overflow;
+  }
+
+  return TEST_SUCCESS;
+}
+
+
+/*
+  Test values of many different sizes
+  Bug found where command total one more than MEMCACHED_MAX_BUFFER
+  set key34567890 0 0 8169 \r\n
+  is sent followed by buffer of size 8169, followed by 8169
+*/
+test_return_t user_supplied_bug14(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, true);
+
+  libtest::vchar_t value;
+  value.reserve(18000);
+  for (ptrdiff_t x= 0; x < 18000; x++)
+  {
+    value.push_back((char) (x % 127));
+  }
+
+  for (size_t current_length= 1; current_length < value.size(); current_length++)
+  {
+    memcached_return_t rc= memcached_set(memc, test_literal_param("foo"),
+                                         &value[0], current_length,
+                                         (time_t)0, (uint32_t)0);
+    ASSERT_TRUE_(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, "Instead got %s", memcached_strerror(NULL, rc));
+
+    size_t string_length;
+    uint32_t flags;
+    char *string= memcached_get(memc, test_literal_param("foo"),
+                                &string_length, &flags, &rc);
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(string_length, current_length);
+    char buffer[1024];
+    snprintf(buffer, sizeof(buffer), "%u", uint32_t(string_length));
+    test_memcmp(string, &value[0], string_length);
+
+    free(string);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Look for zero length value problems
+*/
+test_return_t user_supplied_bug15(memcached_st *memc)
+{
+  for (uint32_t x= 0; x < 2; x++)
+  {
+    memcached_return_t rc= memcached_set(memc, test_literal_param("mykey"),
+                                         NULL, 0,
+                                         (time_t)0, (uint32_t)0);
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+
+    size_t length;
+    uint32_t flags;
+    char *value= memcached_get(memc, test_literal_param("mykey"),
+                               &length, &flags, &rc);
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_false(value);
+    test_zero(length);
+    test_zero(flags);
+
+    value= memcached_get(memc, test_literal_param("mykey"),
+                         &length, &flags, &rc);
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_null(value);
+    test_zero(length);
+    test_zero(flags);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
+test_return_t user_supplied_bug16(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc, test_literal_param("mykey"),
+                                                NULL, 0,
+                                                (time_t)0, UINT32_MAX));
+
+
+  size_t length;
+  uint32_t flags;
+  memcached_return_t rc;
+  char *value= memcached_get(memc, test_literal_param("mykey"),
+                             &length, &flags, &rc);
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_null(value);
+  test_zero(length);
+  test_compare(flags, UINT32_MAX);
+
+  return TEST_SUCCESS;
+}
+
+#if !defined(__sun) && !defined(__OpenBSD__)
+/* Check the validity of chinese key*/
+test_return_t user_supplied_bug17(memcached_st *memc)
+{
+  const char *key= "豆瓣";
+  const char *value="我们在炎热抑郁的夏天无法停止豆瓣";
+  memcached_return_t rc= memcached_set(memc, key, strlen(key),
+                                       value, strlen(value),
+                                       (time_t)0, 0);
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  size_t length;
+  uint32_t flags;
+  char *value2= memcached_get(memc, key, strlen(key),
+                              &length, &flags, &rc);
+
+  test_compare(length, strlen(value));
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_memcmp(value, value2, length);
+  free(value2);
+
+  return TEST_SUCCESS;
+}
+#endif
+
+/*
+  From Andrei on IRC
+*/
+
+test_return_t user_supplied_bug19(memcached_st *)
+{
+  memcached_return_t res;
+
+  memcached_st *memc= memcached(test_literal_param("--server=localhost:11311/?100 --server=localhost:11312/?100"));
+
+  const memcached_instance_st * server= memcached_server_by_key(memc, "a", 1, &res);
+  test_true(server);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+/* CAS test from Andei */
+test_return_t user_supplied_bug20(memcached_st *memc)
+{
+  const char *key= "abc";
+  size_t key_len= strlen("abc");
+
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, true));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc,
+                             test_literal_param("abc"),
+                             test_literal_param("foobar"),
+                             (time_t)0, (uint32_t)0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, &key, &key_len, 1));
+
+  memcached_result_st result_obj;
+  memcached_result_st *result= memcached_result_create(memc, &result_obj);
+  test_true(result);
+
+  memcached_result_create(memc, &result_obj);
+  memcached_return_t status;
+  result= memcached_fetch_result(memc, &result_obj, &status);
+
+  test_true(result);
+  test_compare(MEMCACHED_SUCCESS, status);
+
+  memcached_result_free(result);
+
+  return TEST_SUCCESS;
+}
+
+/* Large mget() of missing keys with binary proto
+ *
+ * If many binary quiet commands (such as getq's in an mget) fill the output
+ * buffer and the server chooses not to respond, memcached_flush hangs. See
+ * http://lists.tangent.org/pipermail/libmemcached/2009-August/000918.html
+ */
+
+/* sighandler_t function that always asserts false */
+static __attribute__((noreturn)) void fail(int)
+{
+  fatal_assert(0);
+}
+
+
+test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count)
+{
+#ifdef WIN32
+  (void)memc;
+  (void)key_count;
+  return TEST_SKIPPED;
+#else
+  void (*oldalarm)(int);
+
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+
+  /* only binproto uses getq for mget */
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
+
+  /* empty the cache to ensure misses (hence non-responses) */
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc_clone, 0));
+
+  keys_st keys(key_count);
+
+  oldalarm= signal(SIGALRM, fail);
+  alarm(5);
+
+  test_compare_got(MEMCACHED_SUCCESS,
+                   memcached_mget(memc_clone, keys.keys_ptr(), keys.lengths_ptr(), keys.size()),
+                   memcached_last_error_message(memc_clone));
+
+  alarm(0);
+  signal(SIGALRM, oldalarm);
+
+  memcached_return_t rc;
+  uint32_t flags;
+  char return_key[MEMCACHED_MAX_KEY];
+  size_t return_key_length;
+  char *return_value;
+  size_t return_value_length;
+  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
+                                        &return_value_length, &flags, &rc)))
+  {
+    test_false(return_value); // There are no keys to fetch, so the value should never be returned
+  }
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  test_zero(return_value_length);
+  test_zero(return_key_length);
+  test_false(return_key[0]);
+  test_false(return_value);
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+#endif
+}
+
+test_return_t user_supplied_bug21(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_binary(memc));
+
+  /* should work as of r580 */
+  test_compare(TEST_SUCCESS,
+               _user_supplied_bug21(memc, 10));
+
+  /* should fail as of r580 */
+  test_compare(TEST_SUCCESS,
+               _user_supplied_bug21(memc, 1000));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t comparison_operator_memcached_st_and__memcached_return_t_TEST(memcached_st *)
+{
+  test::Memc memc_;
+
+  memcached_st *memc= &memc_;
+
+  ASSERT_EQ(memc, MEMCACHED_SUCCESS);
+  test_compare(memc, MEMCACHED_SUCCESS);
+
+  ASSERT_NEQ(memc, MEMCACHED_FAILURE);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t ketama_TEST(memcached_st *)
+{
+  test::Memc memc("--server=10.0.1.1:11211 --server=10.0.1.2:11211");
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, true));
+
+  test_compare(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED), uint64_t(1));
+
+  test_compare(memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5), MEMCACHED_SUCCESS);
+
+  test_compare(memcached_hash_t(memcached_behavior_get(&memc, MEMCACHED_BEHAVIOR_KETAMA_HASH)), MEMCACHED_HASH_MD5);
+
+  test_compare(memcached_behavior_set_distribution(&memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY), MEMCACHED_SUCCESS);
+
+
+  return TEST_SUCCESS;
+}
+
+test_return_t output_ketama_weighted_keys(memcached_st *)
+{
+  memcached_st *memc= memcached_create(NULL);
+  test_true(memc);
+
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, true));
+
+  uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
+  test_compare(value, uint64_t(1));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5));
+
+  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
+  test_true(value == MEMCACHED_HASH_MD5);
+
+
+  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY) == MEMCACHED_SUCCESS);
+
+  memcached_server_st *server_pool;
+  server_pool = memcached_servers_parse("10.0.1.1:11211,10.0.1.2:11211,10.0.1.3:11211,10.0.1.4:11211,10.0.1.5:11211,10.0.1.6:11211,10.0.1.7:11211,10.0.1.8:11211,192.168.1.1:11211,192.168.100.1:11211");
+  memcached_server_push(memc, server_pool);
+
+  // @todo this needs to be refactored to actually test something.
+#if 0
+  FILE *fp;
+  if ((fp = fopen("ketama_keys.txt", "w")))
+  {
+    // noop
+  } else {
+    printf("cannot write to file ketama_keys.txt");
+    return TEST_FAILURE;
+  }
+
+  for (int x= 0; x < 10000; x++)
+  {
+    char key[10];
+    snprintf(key, sizeof(key), "%d", x);
+
+    uint32_t server_idx = memcached_generate_hash(memc, key, strlen(key));
+    char *hostname = memc->hosts[server_idx].hostname;
+    in_port_t port = memc->hosts[server_idx].port;
+    fprintf(fp, "key %s is on host /%s:%u\n", key, hostname, port);
+    const memcached_instance_st * instance=
+      memcached_server_instance_by_position(memc, host_index);
+  }
+  fclose(fp);
+#endif
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t result_static(memcached_st *memc)
+{
+  memcached_result_st result;
+  memcached_result_st *result_ptr= memcached_result_create(memc, &result);
+  test_false(result.options.is_allocated);
+  test_true(memcached_is_initialized(&result));
+  test_true(result_ptr);
+  test_true(result_ptr == &result);
+
+  memcached_result_free(&result);
+
+  test_false(result.options.is_allocated);
+  test_false(memcached_is_initialized(&result));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t result_alloc(memcached_st *memc)
+{
+  memcached_result_st *result_ptr= memcached_result_create(memc, NULL);
+  test_true(result_ptr);
+  test_true(result_ptr->options.is_allocated);
+  test_true(memcached_is_initialized(result_ptr));
+  memcached_result_free(result_ptr);
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t add_host_test1(memcached_st *memc)
+{
+  memcached_return_t rc;
+  char servername[]= "0.example.com";
+
+  memcached_server_st *servers= memcached_server_list_append_with_weight(NULL, servername, 400, 0, &rc);
+  test_true(servers);
+  test_compare(1U, memcached_server_list_count(servers));
+
+  for (uint32_t x= 2; x < 20; x++)
+  {
+    char buffer[SMALL_STRING_LEN];
+
+    snprintf(buffer, SMALL_STRING_LEN, "%lu.example.com", (unsigned long)(400 +x));
+    servers= memcached_server_list_append_with_weight(servers, buffer, 401, 0,
+                                                      &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(x, memcached_server_list_count(servers));
+  }
+
+  test_compare(MEMCACHED_SUCCESS, memcached_server_push(memc, servers));
+  test_compare(MEMCACHED_SUCCESS, memcached_server_push(memc, servers));
+
+  memcached_server_list_free(servers);
+
+  return TEST_SUCCESS;
+}
+
+
+static void my_free(const memcached_st *ptr, void *mem, void *context)
+{
+  (void)context;
+  (void)ptr;
+#ifdef HARD_MALLOC_TESTS
+  void *real_ptr= (mem == NULL) ? mem : (void*)((caddr_t)mem - 8);
+  free(real_ptr);
+#else
+  free(mem);
+#endif
+}
+
+
+static void *my_malloc(const memcached_st *ptr, const size_t size, void *context)
+{
+  (void)context;
+  (void)ptr;
+#ifdef HARD_MALLOC_TESTS
+  void *ret= malloc(size + 8);
+  if (ret != NULL)
+  {
+    ret= (void*)((caddr_t)ret + 8);
+  }
+#else
+  void *ret= malloc(size);
+#endif
+
+  if (ret != NULL)
+  {
+    memset(ret, 0xff, size);
+  }
+
+  return ret;
+}
+
+
+static void *my_realloc(const memcached_st *ptr, void *mem, const size_t size, void *)
+{
+#ifdef HARD_MALLOC_TESTS
+  void *real_ptr= (mem == NULL) ? NULL : (void*)((caddr_t)mem - 8);
+  void *nmem= realloc(real_ptr, size + 8);
+
+  void *ret= NULL;
+  if (nmem != NULL)
+  {
+    ret= (void*)((caddr_t)nmem + 8);
+  }
+
+  return ret;
+#else
+  (void)ptr;
+  return realloc(mem, size);
+#endif
+}
+
+
+static void *my_calloc(const memcached_st *ptr, size_t nelem, const size_t size, void *)
+{
+#ifdef HARD_MALLOC_TESTS
+  void *mem= my_malloc(ptr, nelem * size);
+  if (mem)
+  {
+    memset(mem, 0, nelem * size);
+  }
+
+  return mem;
+#else
+  (void)ptr;
+  return calloc(nelem, size);
+#endif
+}
+
+test_return_t selection_of_namespace_tests(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const char *key= "mine";
+  char *value;
+
+  /* Make sure by default none exists */
+  value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  test_null(value);
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+
+  /* Test a clean set */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, (void *)key));
+
+  value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  test_true(value);
+  test_memcmp(value, key, strlen(key));
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+
+  /* Test that we can turn it off */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, NULL));
+
+  value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  test_null(value);
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+
+  /* Now setup for main test */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, (void *)key));
+
+  value= (char *)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  test_true(value);
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+  test_memcmp(value, key, strlen(key));
+
+  /* Set to Zero, and then Set to something too large */
+  {
+    char long_key[255];
+    memset(long_key, 0, 255);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, NULL));
+
+    ASSERT_NULL_(memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc), "Setting namespace to NULL did not work");
+
+    /* Test a long key for failure */
+    /* TODO, extend test to determine based on setting, what result should be */
+    strncpy(long_key, "Thisismorethentheallottednumberofcharacters", sizeof(long_key));
+    test_compare(MEMCACHED_SUCCESS, 
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, long_key));
+
+    /* Now test a key with spaces (which will fail from long key, since bad key is not set) */
+    strncpy(long_key, "This is more then the allotted number of characters", sizeof(long_key));
+    test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) ? MEMCACHED_SUCCESS : MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, long_key));
+
+    /* Test for a bad prefix, but with a short key */
+    test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) ? MEMCACHED_INVALID_ARGUMENTS : MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1));
+
+    test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) ? MEMCACHED_SUCCESS : MEMCACHED_BAD_KEY_PROVIDED,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, "dog cat"));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t set_namespace(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const char *key= "mine";
+
+  // Make sure we default to a null namespace
+  char* value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  ASSERT_NULL_(value, "memc had a value for namespace when none should exist");
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+
+  /* Test a clean set */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_callback_set(memc, MEMCACHED_CALLBACK_NAMESPACE, (void *)key));
+
+  value= (char*)memcached_callback_get(memc, MEMCACHED_CALLBACK_NAMESPACE, &rc);
+  ASSERT_TRUE(value);
+  test_memcmp(value, key, strlen(key));
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t set_namespace_and_binary(memcached_st *memc)
+{
+  test_return_if(pre_binary(memc));
+  test_return_if(set_namespace(memc));
+
+  return TEST_SUCCESS;
+}
+
+#ifdef MEMCACHED_ENABLE_DEPRECATED
+test_return_t deprecated_set_memory_alloc(memcached_st *memc)
+{
+  void *test_ptr= NULL;
+  void *cb_ptr= NULL;
+  {
+    memcached_malloc_fn malloc_cb= (memcached_malloc_fn)my_malloc;
+    cb_ptr= *(void **)&malloc_cb;
+    memcached_return_t rc;
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, cb_ptr));
+    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(test_ptr == cb_ptr);
+  }
+
+  {
+    memcached_realloc_fn realloc_cb=
+      (memcached_realloc_fn)my_realloc;
+    cb_ptr= *(void **)&realloc_cb;
+    memcached_return_t rc;
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, cb_ptr));
+    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(test_ptr == cb_ptr);
+  }
+
+  {
+    memcached_free_fn free_cb=
+      (memcached_free_fn)my_free;
+    cb_ptr= *(void **)&free_cb;
+    memcached_return_t rc;
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_callback_set(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, cb_ptr));
+    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(test_ptr == cb_ptr);
+  }
+
+  return TEST_SUCCESS;
+}
+#endif
+
+
+test_return_t set_memory_alloc(memcached_st *memc)
+{
+  test_compare(MEMCACHED_INVALID_ARGUMENTS,
+               memcached_set_memory_allocators(memc, NULL, my_free,
+                                               my_realloc, my_calloc, NULL));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set_memory_allocators(memc, my_malloc, my_free,
+                                               my_realloc, my_calloc, NULL));
+
+  memcached_malloc_fn mem_malloc;
+  memcached_free_fn mem_free;
+  memcached_realloc_fn mem_realloc;
+  memcached_calloc_fn mem_calloc;
+  memcached_get_memory_allocators(memc, &mem_malloc, &mem_free,
+                                  &mem_realloc, &mem_calloc);
+
+  test_true(mem_malloc == my_malloc);
+  test_true(mem_realloc == my_realloc);
+  test_true(mem_calloc == my_calloc);
+  test_true(mem_free == my_free);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t enable_consistent_crc(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, MEMCACHED_DISTRIBUTION_CONSISTENT));
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION),  uint64_t(MEMCACHED_DISTRIBUTION_CONSISTENT));
+
+  test_return_t rc;
+  if ((rc= pre_crc(memc)) != TEST_SUCCESS)
+  {
+    return rc;
+  }
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION),  uint64_t(MEMCACHED_DISTRIBUTION_CONSISTENT));
+
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH) != MEMCACHED_HASH_CRC)
+  {
+    return TEST_SKIPPED;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t enable_consistent_hsieh(memcached_st *memc)
+{
+  test_return_t rc;
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, MEMCACHED_DISTRIBUTION_CONSISTENT);
+  if ((rc= pre_hsieh(memc)) != TEST_SUCCESS)
+  {
+    return rc;
+  }
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION), uint64_t(MEMCACHED_DISTRIBUTION_CONSISTENT));
+
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH) != MEMCACHED_HASH_HSIEH)
+  {
+    return TEST_SKIPPED;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t enable_cas(memcached_st *memc)
+{
+  if (libmemcached_util_version_check(memc, 1, 2, 4))
+  {
+    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, true);
+
+    return TEST_SUCCESS;
+  }
+
+  return TEST_SKIPPED;
+}
+
+test_return_t check_for_1_2_3(memcached_st *memc)
+{
+  memcached_version(memc);
+
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  if ((instance->major_version >= 1 && (instance->minor_version == 2 && instance->micro_version >= 4))
+      or instance->minor_version > 2)
+  {
+    return TEST_SUCCESS;
+  }
+
+  return TEST_SKIPPED;
+}
+
+test_return_t MEMCACHED_BEHAVIOR_POLL_TIMEOUT_test(memcached_st *memc)
+{
+  const uint64_t timeout= 100; // Not using, just checking that it sets
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, timeout);
+
+  test_compare(timeout, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t noreply_test(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, true));
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true));
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, true));
+  test_compare(1LLU, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NOREPLY));
+  test_compare(1LLU, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS));
+  test_compare(1LLU, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS));
+
+  memcached_return_t ret;
+  for (int count= 0; count < 5; ++count)
+  {
+    for (size_t x= 0; x < 100; ++x)
+    {
+      char key[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1];
+      int check_length= snprintf(key, sizeof(key), "%lu", (unsigned long)x);
+      test_false((size_t)check_length >= sizeof(key) || check_length < 0);
+
+      size_t len= (size_t)check_length;
+
+      switch (count)
+      {
+      case 0:
+        ret= memcached_add(memc, key, len, key, len, 0, 0);
+        break;
+      case 1:
+        ret= memcached_replace(memc, key, len, key, len, 0, 0);
+        break;
+      case 2:
+        ret= memcached_set(memc, key, len, key, len, 0, 0);
+        break;
+      case 3:
+        ret= memcached_append(memc, key, len, key, len, 0, 0);
+        break;
+      case 4:
+        ret= memcached_prepend(memc, key, len, key, len, 0, 0);
+        break;
+      default:
+        test_true(count);
+        break;
+      }
+      test_true_got(ret == MEMCACHED_SUCCESS or ret == MEMCACHED_BUFFERED,
+                    memcached_strerror(NULL, ret));
+    }
+
+    /*
+     ** NOTE: Don't ever do this in your code! this is not a supported use of the
+     ** API and is _ONLY_ done this way to verify that the library works the
+     ** way it is supposed to do!!!!
+   */
+#if 0
+    int no_msg=0;
+    for (uint32_t x= 0; x < memcached_server_count(memc); ++x)
+    {
+      const memcached_instance_st * instance=
+        memcached_server_instance_by_position(memc, x);
+      no_msg+=(int)(instance->cursor_active);
+    }
+
+    test_true(no_msg == 0);
+#endif
+    test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+    /*
+     ** Now validate that all items was set properly!
+   */
+    for (size_t x= 0; x < 100; ++x)
+    {
+      char key[10];
+
+      int check_length= snprintf(key, sizeof(key), "%lu", (unsigned long)x);
+
+      test_false((size_t)check_length >= sizeof(key) || check_length < 0);
+
+      size_t len= (size_t)check_length;
+      size_t length;
+      uint32_t flags;
+      char* value=memcached_get(memc, key, strlen(key),
+                                &length, &flags, &ret);
+      // For the moment we will just go to the next key
+      if (MEMCACHED_TIMEOUT == ret)
+      {
+        continue;
+      }
+      test_true(ret == MEMCACHED_SUCCESS and value != NULL);
+      switch (count)
+      {
+      case 0: /* FALLTHROUGH */
+      case 1: /* FALLTHROUGH */
+      case 2:
+        test_true(strncmp(value, key, len) == 0);
+        test_true(len == length);
+        break;
+      case 3:
+        test_true(length == len * 2);
+        break;
+      case 4:
+        test_true(length == len * 3);
+        break;
+      default:
+        test_true(count);
+        break;
+      }
+      free(value);
+    }
+  }
+
+  /* Try setting an illegal cas value (should not return an error to
+   * the caller (because we don't expect a return message from the server)
+ */
+  const char* keys[]= {"0"};
+  size_t lengths[]= {1};
+  size_t length;
+  uint32_t flags;
+  memcached_result_st results_obj;
+  memcached_result_st *results;
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_mget(memc, keys, lengths, 1));
+
+  results= memcached_result_create(memc, &results_obj);
+  test_true(results);
+  results= memcached_fetch_result(memc, &results_obj, &ret);
+  test_true(results);
+  test_compare(MEMCACHED_SUCCESS, ret);
+  uint64_t cas= memcached_result_cas(results);
+  memcached_result_free(&results_obj);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_cas(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0, cas));
+
+  /*
+   * The item will have a new cas value, so try to set it again with the old
+   * value. This should fail!
+ */
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_cas(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0, cas));
+  test_true(memcached_flush_buffers(memc) == MEMCACHED_SUCCESS);
+  char* value=memcached_get(memc, keys[0], lengths[0], &length, &flags, &ret);
+  test_true(ret == MEMCACHED_SUCCESS && value != NULL);
+  free(value);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t analyzer_test(memcached_st *memc)
+{
+  memcached_analysis_st *report;
+  memcached_return_t rc;
+
+  memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(memc_stat);
+
+  report= memcached_analyze(memc, memc_stat, &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(report);
+
+  free(report);
+  memcached_stat_free(NULL, memc_stat);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t util_version_test(memcached_st *memc)
+{
+  test_compare(memcached_version(memc), MEMCACHED_SUCCESS);
+  test_true(libmemcached_util_version_check(memc, 0, 0, 0));
+
+  bool if_successful= libmemcached_util_version_check(memc, 9, 9, 9);
+
+  // We expect failure
+  if (if_successful)
+  {
+    fprintf(stderr, "\n----------------------------------------------------------------------\n");
+    fprintf(stderr, "\nDumping Server Information\n\n");
+    memcached_server_fn callbacks[1];
+
+    callbacks[0]= dump_server_information;
+    memcached_server_cursor(memc, callbacks, (void *)stderr,  1);
+    fprintf(stderr, "\n----------------------------------------------------------------------\n");
+  }
+  test_true(if_successful == false);
+
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  memcached_version(memc);
+
+  // We only use one binary when we test, so this should be just fine.
+  if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, instance->micro_version);
+  test_true(if_successful == true);
+
+  if (instance->micro_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, (uint8_t)(instance->micro_version -1));
+  }
+  else if (instance->minor_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, instance->major_version, (uint8_t)(instance->minor_version - 1), instance->micro_version);
+  }
+  else if (instance->major_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, (uint8_t)(instance->major_version -1), instance->minor_version, instance->micro_version);
+  }
+
+  test_true(if_successful == true);
+
+  if (instance->micro_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, (uint8_t)(instance->micro_version +1));
+  }
+  else if (instance->minor_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, instance->major_version, (uint8_t)(instance->minor_version +1), instance->micro_version);
+  }
+  else if (instance->major_version > 0)
+  {
+    if_successful= libmemcached_util_version_check(memc, (uint8_t)(instance->major_version +1), instance->minor_version, instance->micro_version);
+  }
+
+  test_true(if_successful == false);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t getpid_connection_failure_test(memcached_st *memc)
+{
+  test_skip(memc->servers[0].type, MEMCACHED_CONNECTION_TCP);
+  memcached_return_t rc;
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  // Test both the version that returns a code, and the one that does not.
+  test_true(libmemcached_util_getpid(memcached_server_name(instance),
+                                     memcached_server_port(instance) -1, NULL) == -1);
+
+  test_true(libmemcached_util_getpid(memcached_server_name(instance),
+                                     memcached_server_port(instance) -1, &rc) == -1);
+  test_compare_got(MEMCACHED_CONNECTION_FAILURE, rc, memcached_strerror(memc, rc));
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t getpid_test(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  // Test both the version that returns a code, and the one that does not.
+  test_true(libmemcached_util_getpid(memcached_server_name(instance),
+                                     memcached_server_port(instance), NULL) > -1);
+
+  test_true(libmemcached_util_getpid(memcached_server_name(instance),
+                                     memcached_server_port(instance), &rc) > -1);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t ping_each_server(const memcached_st*,
+                                           const memcached_instance_st * instance,
+                                           void*)
+{
+  // Test both the version that returns a code, and the one that does not.
+  memcached_return_t rc;
+  if (libmemcached_util_ping(memcached_server_name(instance),
+                             memcached_server_port(instance), &rc) == false)
+  {
+    throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "%s:%d %s", memcached_server_name(instance),
+                         memcached_server_port(instance), memcached_strerror(NULL, rc));
+  }
+
+  if (libmemcached_util_ping(memcached_server_name(instance),
+                                   memcached_server_port(instance), NULL) == false)
+  {
+    throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "%s:%d", memcached_server_name(instance), memcached_server_port(instance));
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t libmemcached_util_ping_TEST(memcached_st *memc)
+{
+  memcached_server_fn callbacks[1]= { ping_each_server };
+  memcached_server_cursor(memc, callbacks, NULL,  1);
+
+  return TEST_SUCCESS;
+}
+
+
+#if 0
+test_return_t hash_sanity_test (memcached_st *memc)
+{
+  (void)memc;
+
+  assert(MEMCACHED_HASH_DEFAULT == MEMCACHED_HASH_DEFAULT);
+  assert(MEMCACHED_HASH_MD5 == MEMCACHED_HASH_MD5);
+  assert(MEMCACHED_HASH_CRC == MEMCACHED_HASH_CRC);
+  assert(MEMCACHED_HASH_FNV1_64 == MEMCACHED_HASH_FNV1_64);
+  assert(MEMCACHED_HASH_FNV1A_64 == MEMCACHED_HASH_FNV1A_64);
+  assert(MEMCACHED_HASH_FNV1_32 == MEMCACHED_HASH_FNV1_32);
+  assert(MEMCACHED_HASH_FNV1A_32 == MEMCACHED_HASH_FNV1A_32);
+#ifdef HAVE_HSIEH_HASH
+  assert(MEMCACHED_HASH_HSIEH == MEMCACHED_HASH_HSIEH);
+#endif
+  assert(MEMCACHED_HASH_MURMUR == MEMCACHED_HASH_MURMUR);
+  assert(MEMCACHED_HASH_JENKINS == MEMCACHED_HASH_JENKINS);
+  assert(MEMCACHED_HASH_MAX == MEMCACHED_HASH_MAX);
+
+  return TEST_SUCCESS;
+}
+#endif
+
+test_return_t hsieh_avaibility_test (memcached_st *memc)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_HSIEH));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH,
+                                      (uint64_t)MEMCACHED_HASH_HSIEH));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t murmur_avaibility_test (memcached_st *memc)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t one_at_a_time_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(one_at_a_time_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_DEFAULT));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t md5_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(md5_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MD5));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t crc_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(crc_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_CRC));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t fnv1_64_run (memcached_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_FNV1_64));
+
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1_64_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1_64));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t fnv1a_64_run (memcached_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_FNV1A_64));
+
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1a_64_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1A_64));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t fnv1_32_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1_32_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1_32));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t fnv1a_32_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(fnv1a_32_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1A_32));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t hsieh_run (memcached_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_HSIEH));
+
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(hsieh_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_HSIEH));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t murmur_run (memcached_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR));
+
+#ifdef WORDS_BIGENDIAN
+  (void)murmur_values;
+  return TEST_SKIPPED;
+#else
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(murmur_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MURMUR));
+  }
+
+  return TEST_SUCCESS;
+#endif
+}
+
+test_return_t murmur3_TEST(hashkit_st *)
+{
+  test_skip(true, libhashkit_has_algorithm(HASHKIT_HASH_MURMUR3));
+
+#ifdef WORDS_BIGENDIAN
+  (void)murmur3_values;
+  return TEST_SKIPPED;
+#else
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(murmur3_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MURMUR3));
+  }
+
+  return TEST_SUCCESS;
+#endif
+}
+
+test_return_t jenkins_run (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    test_compare(jenkins_values[x],
+                 memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_JENKINS));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static uint32_t hash_md5_test_function(const char *string, size_t string_length, void *)
+{
+  return libhashkit_md5(string, string_length);
+}
+
+static uint32_t hash_crc_test_function(const char *string, size_t string_length, void *)
+{
+  return libhashkit_crc32(string, string_length);
+}
+
+test_return_t memcached_get_hashkit_test (memcached_st *)
+{
+  uint32_t x;
+  const char **ptr;
+  hashkit_st new_kit;
+
+  memcached_st *memc= memcached(test_literal_param("--server=localhost:1 --server=localhost:2 --server=localhost:3 --server=localhost:4 --server=localhost5 --DISTRIBUTION=modula"));
+
+  uint32_t md5_hosts[]= {4U, 1U, 0U, 1U, 4U, 2U, 0U, 3U, 0U, 0U, 3U, 1U, 0U, 0U, 1U, 3U, 0U, 0U, 0U, 3U, 1U, 0U, 4U, 4U, 3U};
+  uint32_t crc_hosts[]= {2U, 4U, 1U, 0U, 2U, 4U, 4U, 4U, 1U, 2U, 3U, 4U, 3U, 4U, 1U, 3U, 3U, 2U, 0U, 0U, 0U, 1U, 2U, 4U, 0U};
+
+  const hashkit_st *kit= memcached_get_hashkit(memc);
+
+  hashkit_clone(&new_kit, kit);
+  test_compare(HASHKIT_SUCCESS, hashkit_set_custom_function(&new_kit, hash_md5_test_function, NULL));
+
+  memcached_set_hashkit(memc, &new_kit);
+
+  /*
+    Verify Setting the hash.
+  */
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    uint32_t hash_val;
+
+    hash_val= hashkit_digest(kit, *ptr, strlen(*ptr));
+    test_compare_got(md5_values[x], hash_val, *ptr);
+  }
+
+
+  /*
+    Now check memcached_st.
+  */
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    uint32_t hash_val;
+
+    hash_val= memcached_generate_hash(memc, *ptr, strlen(*ptr));
+    test_compare_got(md5_hosts[x], hash_val, *ptr);
+  }
+
+  test_compare(HASHKIT_SUCCESS, hashkit_set_custom_function(&new_kit, hash_crc_test_function, NULL));
+
+  memcached_set_hashkit(memc, &new_kit);
+
+  /*
+    Verify Setting the hash.
+  */
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    uint32_t hash_val;
+
+    hash_val= hashkit_digest(kit, *ptr, strlen(*ptr));
+    test_true(crc_values[x] == hash_val);
+  }
+
+  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
+  {
+    uint32_t hash_val;
+
+    hash_val= memcached_generate_hash(memc, *ptr, strlen(*ptr));
+    test_compare(crc_hosts[x], hash_val);
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Test case adapted from John Gorman <johngorman2@gmail.com>
+
+  We are testing the error condition when we connect to a server via memcached_get()
+  but find that the server is not available.
+*/
+test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *)
+{
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  // Create a handle.
+  memcached_st *tl_memc_h= memcached(test_literal_param("--server=localhost:9898 --server=localhost:9899")); // This server should not exist
+
+  // See if memcached is reachable.
+  char *value= memcached_get(tl_memc_h, 
+                             test_literal_param(__func__),
+                             &len, &flags, &rc);
+
+  test_false(value);
+  test_zero(len);
+  test_true(memcached_failed(rc));
+
+  memcached_free(tl_memc_h);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  We connect to a server which exists, but search for a key that does not exist.
+*/
+test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
+{
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  // See if memcached is reachable.
+  char *value= memcached_get(memc,
+                             test_literal_param(__func__),
+                             &len, &flags, &rc);
+
+  test_false(value);
+  test_zero(len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  Test case adapted from John Gorman <johngorman2@gmail.com>
+
+  We are testing the error condition when we connect to a server via memcached_get_by_key()
+  but find that the server is not available.
+*/
+test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *)
+{
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  // Create a handle.
+  memcached_st *tl_memc_h= memcached_create(NULL);
+  memcached_server_st *servers= memcached_servers_parse("localhost:9898,localhost:9899"); // This server should not exist
+  memcached_server_push(tl_memc_h, servers);
+  memcached_server_list_free(servers);
+
+  // See if memcached is reachable.
+  char *value= memcached_get_by_key(tl_memc_h, 
+                                    test_literal_param(__func__), // Key
+                                    test_literal_param(__func__), // Value
+                                    &len, &flags, &rc);
+
+  test_false(value);
+  test_zero(len);
+  test_true(memcached_failed(rc));
+
+  memcached_free(tl_memc_h);
+
+  return TEST_SUCCESS;
+}
+
+/*
+  We connect to a server which exists, but search for a key that does not exist.
+*/
+test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc)
+{
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  // See if memcached is reachable.
+  char *value= memcached_get_by_key(memc, 
+                                    test_literal_param(__func__), // Key
+                                    test_literal_param(__func__), // Value
+                                    &len, &flags, &rc);
+
+  test_false(value);
+  test_zero(len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_434484(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_binary(memc));
+
+  test_compare(MEMCACHED_NOTSTORED, 
+               memcached_append(memc, 
+                                test_literal_param(__func__), // Key
+                                test_literal_param(__func__), // Value
+                                0, 0));
+
+  libtest::vchar_t data;
+  data.resize(2048 * 1024);
+  test_compare(MEMCACHED_E2BIG,
+               memcached_set(memc, 
+                             test_literal_param(__func__), // Key
+                             &data[0], data.size(), 0, 0));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_434843(memcached_st *original_memc)
+{
+  test_skip(TEST_SUCCESS, pre_binary(original_memc));
+
+  memcached_return_t rc;
+  size_t counter= 0;
+  memcached_execute_fn callbacks[]= { &callback_counter };
+
+  /*
+   * I only want to hit only _one_ server so I know the number of requests I'm
+   * sending in the pipleine to the server. Let's try to do a multiget of
+   * 1024 (that should satisfy most users don't you think?). Future versions
+   * will include a mget_execute function call if you need a higher number.
+ */
+  memcached_st *memc= create_single_instance_memcached(original_memc, "--BINARY-PROTOCOL");
+
+  keys_st keys(1024);
+
+  /*
+   * Run two times.. the first time we should have 100% cache miss,
+   * and the second time we should have 100% cache hits
+ */
+  for (ptrdiff_t y= 0; y < 2; y++)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget(memc, keys.keys_ptr(), keys.lengths_ptr(), keys.size()));
+
+    // One the first run we should get a NOT_FOUND, but on the second some data
+    // should be returned.
+    test_compare(y ?  MEMCACHED_SUCCESS : MEMCACHED_NOTFOUND, 
+                 memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+
+    if (y == 0)
+    {
+      /* The first iteration should give me a 100% cache miss. verify that*/
+      char blob[1024]= { 0 };
+
+      test_false(counter);
+
+      for (size_t x= 0; x < keys.size(); ++x)
+      {
+        rc= memcached_add(memc, 
+                          keys.key_at(x), keys.length_at(x),
+                          blob, sizeof(blob), 0, 0);
+        test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+      }
+    }
+    else
+    {
+      /* Verify that we received all of the key/value pairs */
+      test_compare(counter, keys.size());
+    }
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_434843_buffered(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true));
+
+  return regression_bug_434843(memc);
+}
+
+test_return_t regression_bug_421108(memcached_st *memc)
+{
+  memcached_return_t rc;
+  memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  char *bytes_str= memcached_stat_get_value(memc, memc_stat, "bytes", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_str);
+  char *bytes_read_str= memcached_stat_get_value(memc, memc_stat,
+                                                 "bytes_read", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_read_str);
+
+  char *bytes_written_str= memcached_stat_get_value(memc, memc_stat,
+                                                    "bytes_written", &rc);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(bytes_written_str);
+
+  unsigned long long bytes= strtoull(bytes_str, 0, 10);
+  unsigned long long bytes_read= strtoull(bytes_read_str, 0, 10);
+  unsigned long long bytes_written= strtoull(bytes_written_str, 0, 10);
+
+  test_true(bytes != bytes_read);
+  test_true(bytes != bytes_written);
+
+  /* Release allocated resources */
+  free(bytes_str);
+  free(bytes_read_str);
+  free(bytes_written_str);
+  memcached_stat_free(NULL, memc_stat);
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * The test case isn't obvious so I should probably document why
+ * it works the way it does. Bug 442914 was caused by a bug
+ * in the logic in memcached_purge (it did not handle the case
+ * where the number of bytes sent was equal to the watermark).
+ * In this test case, create messages so that we hit that case
+ * and then disable noreply mode and issue a new command to
+ * verify that it isn't stuck. If we change the format for the
+ * delete command or the watermarks, we need to update this
+ * test....
+ */
+test_return_t regression_bug_442914(memcached_st *original_memc)
+{
+  test_skip(original_memc->servers[0].type, MEMCACHED_CONNECTION_TCP);
+
+  memcached_st* memc= create_single_instance_memcached(original_memc, "--NOREPLY --TCP-NODELAY");
+
+  for (uint32_t x= 0; x < 250; ++x)
+  {
+    char key[250];
+    size_t len= (size_t)snprintf(key, sizeof(key), "%0250u", x);
+    memcached_return_t rc= memcached_delete(memc, key, len, 0);
+    char error_buffer[2048]= { 0 };
+    snprintf(error_buffer, sizeof(error_buffer), "%s key: %s", memcached_last_error_message(memc), key);
+    test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, error_buffer);
+  }
+
+  // Delete, and then delete again to look for not found
+  {
+    char key[250];
+    size_t len= snprintf(key, sizeof(key), "%037u", 251U);
+    memcached_return_t rc= memcached_delete(memc, key, len, 0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, false));
+    test_compare(MEMCACHED_NOTFOUND, memcached_delete(memc, key, len, 0));
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_447342(memcached_st *memc)
+{
+  if (memcached_server_count(memc) < 3 or pre_replication(memc) != TEST_SUCCESS)
+  {
+    return TEST_SKIPPED;
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 2));
+
+  keys_st keys(100);
+
+  for (size_t x= 0; x < keys.size(); ++x)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, 
+                               keys.key_at(x), keys.length_at(x), // Keys
+                               keys.key_at(x), keys.length_at(x), // Values
+                               0, 0));
+  }
+
+  /*
+   ** We are using the quiet commands to store the replicas, so we need
+   ** to ensure that all of them are processed before we can continue.
+   ** In the test we go directly from storing the object to trying to
+   ** receive the object from all of the different servers, so we
+   ** could end up in a race condition (the memcached server hasn't yet
+   ** processed the quiet command from the replication set when it process
+   ** the request from the other client (created by the clone)). As a
+   ** workaround for that we call memcached_quit to send the quit command
+   ** to the server and wait for the response ;-) If you use the test code
+   ** as an example for your own code, please note that you shouldn't need
+   ** to do this ;-)
+ */
+  memcached_quit(memc);
+
+  /* Verify that all messages are stored, and we didn't stuff too much
+   * into the servers
+ */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, 
+                              keys.keys_ptr(), keys.lengths_ptr(), keys.size()));
+
+  unsigned int counter= 0;
+  memcached_execute_fn callbacks[]= { &callback_counter };
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+
+  /* Verify that we received all of the key/value pairs */
+  test_compare(counter, keys.size());
+
+  memcached_quit(memc);
+  /*
+   * Don't do the following in your code. I am abusing the internal details
+   * within the library, and this is not a supported interface.
+   * This is to verify correct behavior in the library. Fake that two servers
+   * are dead..
+ */
+  const memcached_instance_st * instance_one= memcached_server_instance_by_position(memc, 0);
+  const memcached_instance_st * instance_two= memcached_server_instance_by_position(memc, 2);
+  in_port_t port0= instance_one->port();
+  in_port_t port2= instance_two->port();
+
+  ((memcached_server_write_instance_st)instance_one)->port(0);
+  ((memcached_server_write_instance_st)instance_two)->port(0);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, 
+                              keys.keys_ptr(), keys.lengths_ptr(), keys.size()));
+
+  counter= 0;
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+  test_compare(counter, keys.size());
+
+  /* restore the memc handle */
+  ((memcached_server_write_instance_st)instance_one)->port(port0);
+  ((memcached_server_write_instance_st)instance_two)->port(port2);
+
+  memcached_quit(memc);
+
+  /* Remove half of the objects */
+  for (size_t x= 0; x < keys.size(); ++x)
+  {
+    if (x & 1)
+    {
+      test_compare(MEMCACHED_SUCCESS,
+                   memcached_delete(memc, keys.key_at(x), keys.length_at(x), 0));
+    }
+  }
+
+  memcached_quit(memc);
+  ((memcached_server_write_instance_st)instance_one)->port(0);
+  ((memcached_server_write_instance_st)instance_two)->port(0);
+
+  /* now retry the command, this time we should have cache misses */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc,
+                              keys.keys_ptr(), keys.lengths_ptr(), keys.size()));
+
+  counter= 0;
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_fetch_execute(memc, callbacks, (void *)&counter, 1));
+  test_compare(counter, (unsigned int)(keys.size() >> 1));
+
+  /* restore the memc handle */
+  ((memcached_server_write_instance_st)instance_one)->port(port0);
+  ((memcached_server_write_instance_st)instance_two)->port(port2);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_463297(memcached_st *memc)
+{
+  test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_delete(memc, "foo", 3, 1));
+
+  // Since we blocked timed delete, this test is no longer valid.
+#if 0
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+  test_true(memcached_version(memc_clone) == MEMCACHED_SUCCESS);
+
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc_clone, 0);
+
+  if (instance->major_version > 1 ||
+      (instance->major_version == 1 &&
+       instance->minor_version > 2))
+  {
+    /* Binary protocol doesn't support deferred delete */
+    memcached_st *bin_clone= memcached_clone(NULL, memc);
+    test_true(bin_clone);
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(bin_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_delete(bin_clone, "foo", 3, 1));
+    memcached_free(bin_clone);
+
+    memcached_quit(memc_clone);
+
+    /* If we know the server version, deferred delete should fail
+     * with invalid arguments */
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_delete(memc_clone, "foo", 3, 1));
+
+    /* If we don't know the server version, we should get a protocol error */
+    memcached_return_t rc= memcached_delete(memc, "foo", 3, 1);
+
+    /* but there is a bug in some of the memcached servers (1.4) that treats
+     * the counter as noreply so it doesn't send the proper error message
+   */
+    test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
+
+    /* And buffered mode should be disabled and we should get protocol error */
+    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1) == MEMCACHED_SUCCESS);
+    rc= memcached_delete(memc, "foo", 3, 1);
+    test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
+
+    /* Same goes for noreply... */
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1));
+    rc= memcached_delete(memc, "foo", 3, 1);
+    test_true_got(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR || rc == MEMCACHED_INVALID_ARGUMENTS, memcached_strerror(NULL, rc));
+
+    /* but a normal request should go through (and be buffered) */
+    test_compare(MEMCACHED_BUFFERED, (rc= memcached_delete(memc, "foo", 3, 0)));
+    test_compare(MEMCACHED_SUCCESS, memcached_flush_buffers(memc));
+
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0));
+    /* unbuffered noreply should be success */
+    test_compare(MEMCACHED_SUCCESS, memcached_delete(memc, "foo", 3, 0));
+    /* unbuffered with reply should be not found... */
+    test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0));
+    test_compare(MEMCACHED_NOTFOUND, memcached_delete(memc, "foo", 3, 0));
+  }
+
+  memcached_free(memc_clone);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+
+/* Test memcached_server_get_last_disconnect
+ * For a working server set, shall be NULL
+ * For a set of non existing server, shall not be NULL
+ */
+test_return_t test_get_last_disconnect(memcached_st *memc)
+{
+  memcached_return_t rc;
+  const memcached_instance_st * disconnected_server;
+
+  /* With the working set of server */
+  const char *key= "marmotte";
+  const char *value= "milka";
+
+  memcached_reset_last_disconnected_server(memc);
+  test_false(memc->last_disconnected_server);
+  rc= memcached_set(memc, key, strlen(key),
+                    value, strlen(value),
+                    (time_t)0, (uint32_t)0);
+  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+
+  disconnected_server = memcached_server_get_last_disconnect(memc);
+  test_false(disconnected_server);
+
+  /* With a non existing server */
+  memcached_st *mine;
+  memcached_server_st *servers;
+
+  const char *server_list= "localhost:9";
+
+  servers= memcached_servers_parse(server_list);
+  test_true(servers);
+  mine= memcached_create(NULL);
+  rc= memcached_server_push(mine, servers);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  memcached_server_list_free(servers);
+  test_true(mine);
+
+  rc= memcached_set(mine, key, strlen(key),
+                    value, strlen(value),
+                    (time_t)0, (uint32_t)0);
+  test_true(memcached_failed(rc));
+
+  disconnected_server= memcached_server_get_last_disconnect(mine);
+  test_true_got(disconnected_server, memcached_strerror(mine, rc));
+  test_compare(in_port_t(9), memcached_server_port(disconnected_server));
+  test_false(strncmp(memcached_server_name(disconnected_server),"localhost",9));
+
+  memcached_quit(mine);
+  memcached_free(mine);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_multiple_get_last_disconnect(memcached_st *)
+{
+  const char *server_string= "--server=localhost:8888 --server=localhost:8889 --server=localhost:8890 --server=localhost:8891 --server=localhost:8892";
+  char buffer[BUFSIZ];
+
+  test_compare(MEMCACHED_SUCCESS,
+               libmemcached_check_configuration(server_string, strlen(server_string), buffer, sizeof(buffer)));
+
+  memcached_st *memc= memcached(server_string, strlen(server_string));
+  test_true(memc);
+
+  // We will just use the error strings as our keys
+  uint32_t counter= 100;
+  while (--counter)
+  {
+    for (int x= int(MEMCACHED_SUCCESS); x < int(MEMCACHED_MAXIMUM_RETURN); ++x)
+    {
+      const char *msg=  memcached_strerror(memc, memcached_return_t(x));
+      memcached_return_t ret= memcached_set(memc, msg, strlen(msg), NULL, 0, (time_t)0, (uint32_t)0);
+      test_true_got((ret == MEMCACHED_CONNECTION_FAILURE or ret == MEMCACHED_SERVER_TEMPORARILY_DISABLED), memcached_last_error_message(memc));
+
+      const memcached_instance_st * disconnected_server= memcached_server_get_last_disconnect(memc);
+      test_true(disconnected_server);
+      test_strcmp("localhost", memcached_server_name(disconnected_server));
+      test_true(memcached_server_port(disconnected_server) >= 8888 and memcached_server_port(disconnected_server) <= 8892);
+
+      if (random() % 2)
+      {
+        memcached_reset_last_disconnected_server(memc);
+      }
+    }
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_verbosity(memcached_st *memc)
+{
+  memcached_verbosity(memc, 3);
+
+  return TEST_SUCCESS;
+}
+
+
+static memcached_return_t stat_printer(const memcached_instance_st * server,
+                                       const char *key, size_t key_length,
+                                       const char *value, size_t value_length,
+                                       void *context)
+{
+  (void)server;
+  (void)context;
+  (void)key;
+  (void)key_length;
+  (void)value;
+  (void)value_length;
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t memcached_stat_execute_test(memcached_st *memc)
+{
+  memcached_return_t rc= memcached_stat_execute(memc, NULL, stat_printer, NULL);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_stat_execute(memc, "slabs", stat_printer, NULL));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_stat_execute(memc, "items", stat_printer, NULL));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_stat_execute(memc, "sizes", stat_printer, NULL));
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * This test ensures that the failure counter isn't incremented during
+ * normal termination of the memcached instance.
+ */
+test_return_t wrong_failure_counter_test(memcached_st *original_memc)
+{
+  memcached_st* memc= create_single_instance_memcached(original_memc, NULL);
+
+  /* Ensure that we are connected to the server by setting a value */
+  memcached_return_t rc= memcached_set(memc,
+                                       test_literal_param(__func__), // Key
+                                       test_literal_param(__func__), // Value
+                                       time_t(0), uint32_t(0));
+  test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+
+
+  const memcached_instance_st * instance= memcached_server_instance_by_position(memc, 0);
+
+  /* The test is to see that the memcached_quit doesn't increase the
+   * the server failure conter, so let's ensure that it is zero
+   * before sending quit
+ */
+  ((memcached_server_write_instance_st)instance)->server_failure_counter= 0;
+
+  memcached_quit(memc);
+
+  /* Verify that it memcached_quit didn't increment the failure counter
+   * Please note that this isn't bullet proof, because an error could
+   * occur...
+ */
+  test_zero(instance->server_failure_counter);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * This tests ensures expected disconnections (for some behavior changes
+ * for instance) do not wrongly increase failure counter
+ */
+test_return_t wrong_failure_counter_two_test(memcached_st *memc)
+{
+  /* Set value to force connection to the server */
+  const char *key= "marmotte";
+  const char *value= "milka";
+
+  test_compare_hint(MEMCACHED_SUCCESS,
+                    memcached_set(memc, key, strlen(key),
+                                  value, strlen(value),
+                                  (time_t)0, (uint32_t)0),
+                    memcached_last_error_message(memc));
+
+
+  /* put failure limit to 1 */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, true));
+
+  /* Put a retry timeout to effectively activate failure_limit effect */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1));
+
+  /* change behavior that triggers memcached_quit()*/
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, true));
+
+
+  /* Check if we still are connected */
+  uint32_t flags;
+  size_t string_length;
+  memcached_return rc;
+  char *string= memcached_get(memc, key, strlen(key),
+                              &string_length, &flags, &rc);
+
+  test_compare_got(MEMCACHED_SUCCESS, rc, memcached_strerror(NULL, rc));
+  test_true(string);
+  free(string);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_996813_TEST(memcached_st *)
+{
+  memcached_st* memc= memcached_create(NULL);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 1));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 300));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 30));
+
+  // We will never connect to these servers
+  in_port_t base_port= 11211;
+  for (size_t x= 0; x < 17; x++)
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, "10.2.3.4", base_port +x));
+  }
+  test_compare(6U, memcached_generate_hash(memc, test_literal_param("SZ6hu0SHweFmpwpc0w2R")));
+  test_compare(1U, memcached_generate_hash(memc, test_literal_param("SQCK9eiCf53YxHWnYA.o")));
+  test_compare(9U, memcached_generate_hash(memc, test_literal_param("SUSDkGXuuZC9t9VhMwa.")));
+  test_compare(0U, memcached_generate_hash(memc, test_literal_param("SnnqnJARfaCNT679iAF_")));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+
+/*
+ * Test that ensures mget_execute does not end into recursive calls that finally fails
+ */
+test_return_t regression_bug_490486(memcached_st *original_memc)
+{
+
+#ifdef __APPLE__
+  return TEST_SKIPPED; // My MAC can't handle this test
+#endif
+
+  test_skip(TEST_SUCCESS, pre_binary(original_memc));
+
+  /*
+   * I only want to hit _one_ server so I know the number of requests I'm
+   * sending in the pipeline.
+ */
+  memcached_st *memc= create_single_instance_memcached(original_memc, "--BINARY-PROTOCOL --POLL-TIMEOUT=1000 --REMOVE-FAILED-SERVERS=1 --RETRY-TIMEOUT=3600");
+  test_true(memc);
+
+  keys_st keys(20480);
+
+  /* First add all of the items.. */
+  char blob[1024]= { 0 };
+  for (size_t x= 0; x < keys.size(); ++x)
+  {
+    memcached_return rc= memcached_set(memc,
+                                       keys.key_at(x), keys.length_at(x),
+                                       blob, sizeof(blob), 0, 0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED); // MEMCACHED_TIMEOUT <-- hash been observed on OSX
+  }
+
+  {
+
+    /* Try to get all of them with a large multiget */
+    size_t counter= 0;
+    memcached_execute_function callbacks[]= { &callback_counter };
+    memcached_return_t rc= memcached_mget_execute(memc,
+                                                  keys.keys_ptr(), keys.lengths_ptr(), keys.size(),
+                                                  callbacks, &counter, 1);
+    test_compare(MEMCACHED_SUCCESS, rc);
+
+    char* the_value= NULL;
+    char the_key[MEMCACHED_MAX_KEY];
+    size_t the_key_length;
+    size_t the_value_length;
+    uint32_t the_flags;
+
+    do {
+      the_value= memcached_fetch(memc, the_key, &the_key_length, &the_value_length, &the_flags, &rc);
+
+      if ((the_value!= NULL) && (rc == MEMCACHED_SUCCESS))
+      {
+        ++counter;
+        free(the_value);
+      }
+
+    } while ( (the_value!= NULL) && (rc == MEMCACHED_SUCCESS));
+
+
+    test_compare(MEMCACHED_END, rc);
+
+    /* Verify that we got all of the items */
+    test_compare(counter, keys.size());
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_1021819_TEST(memcached_st *original)
+{
+  memcached_st *memc= memcached_clone(NULL, original);
+  test_true(memc);
+
+  test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 2000000), MEMCACHED_SUCCESS);
+  test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 3000000), MEMCACHED_SUCCESS);
+
+  memcached_return_t rc;
+
+  memcached_get(memc,
+                test_literal_param(__func__),
+                NULL, NULL, &rc);
+
+  test_compare(rc, MEMCACHED_NOTFOUND);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_583031(memcached_st *)
+{
+  memcached_st *memc= memcached_create(NULL);
+  test_true(memc);
+  test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, "10.2.251.4", 11211));
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 3000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 3);
+
+  memcached_return_t rc;
+  size_t length;
+  uint32_t flags;
+
+  const char *value= memcached_get(memc, "dsf", 3, &length, &flags, &rc);
+  test_false(value);
+  test_zero(length);
+
+  test_compare(MEMCACHED_TIMEOUT, memc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_581030(memcached_st *)
+{
+#ifndef DEBUG
+  memcached_stat_st *local_stat= memcached_stat(NULL, NULL, NULL);
+  test_false(local_stat);
+
+  memcached_stat_free(NULL, NULL);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+#define regression_bug_655423_COUNT 6000
+test_return_t regression_bug_655423(memcached_st *memc)
+{
+  memcached_st *clone= memcached_clone(NULL, memc);
+  memc= NULL; // Just to make sure it is not used
+  test_true(clone);
+  char payload[100];
+
+#ifdef __APPLE__
+  return TEST_SKIPPED;
+#endif
+
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(clone, MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, 1));
+
+  memset(payload, int('x'), sizeof(payload));
+
+  keys_st keys(regression_bug_655423_COUNT);
+
+  for (size_t x= 0; x < keys.size(); x++)
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_set(clone, 
+                                                  keys.key_at(x),
+                                                  keys.length_at(x),
+                                                  payload, sizeof(payload), 0, 0));
+  }
+
+  for (size_t x= 0; x < keys.size(); x++)
+  {
+    size_t value_length;
+    memcached_return_t rc;
+    char *value= memcached_get(clone,
+                               keys.key_at(x),
+                               keys.length_at(x),
+                               &value_length, NULL, &rc);
+
+    if (rc == MEMCACHED_NOTFOUND)
+    {
+      test_false(value);
+      test_zero(value_length);
+      continue;
+    }
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(value);
+    test_compare(100LLU, value_length);
+    free(value);
+  }
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(clone,
+                              keys.keys_ptr(), keys.lengths_ptr(),
+                              keys.size()));
+
+  uint32_t count= 0;
+  memcached_result_st *result= NULL;
+  while ((result= memcached_fetch_result(clone, result, NULL)))
+  {
+    test_compare(size_t(100), memcached_result_length(result));
+    count++;
+  }
+
+  test_true(count > 100); // If we don't get back atleast this, something is up
+
+  memcached_free(clone);
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * Test that ensures that buffered set to not trigger problems during io_flush
+ */
+#define regression_bug_490520_COUNT 200480
+test_return_t regression_bug_490520(memcached_st *original_memc)
+{
+  memcached_st* memc= create_single_instance_memcached(original_memc, NULL);
+
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT,1);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 3600);
+
+  /* First add all of the items.. */
+  char blob[3333] = {0};
+  for (uint32_t x= 0; x < regression_bug_490520_COUNT; ++x)
+  {
+    char key[251];
+    int key_length= snprintf(key, sizeof(key), "0200%u", x);
+
+    memcached_return rc= memcached_set(memc, key, key_length, blob, sizeof(blob), 0, 0);
+    test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_last_error_message(memc));
+  }
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_1251482(memcached_st*)
+{
+  test::Memc memc("--server=localhost:5");
+
+  memcached_behavior_set(&memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 0);
+
+  for (size_t x= 4; x; --x)
+  {
+    size_t value_length;
+    memcached_return_t rc;
+    char *value= memcached_get(&memc,
+                               test_literal_param(__func__),
+                               &value_length, NULL, &rc);
+
+    test_false(value);
+    test_compare(0LLU, value_length);
+    test_compare(MEMCACHED_CONNECTION_FAILURE, rc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_1009493_TEST(memcached_st*)
+{
+  memcached_st* memc= memcached_create(NULL);
+  test_true(memc);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA, true));
+
+  memcached_st* clone= memcached_clone(NULL, memc);
+  test_true(clone);
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED),
+               memcached_behavior_get(clone, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED));
+
+  memcached_free(memc);
+  memcached_free(clone);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_994772_TEST(memcached_st* memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc,
+                             test_literal_param(__func__), // Key
+                             test_literal_param(__func__), // Value
+                             time_t(0), uint32_t(0)));
+
+  const char *keys[] = { __func__ };
+  size_t key_length[]= { strlen(__func__) };
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_mget(memc, keys, key_length, 1));
+
+  memcached_return_t rc;
+  memcached_result_st *results= memcached_fetch_result(memc, NULL, &rc);
+  test_true(results);
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  test_strcmp(__func__, memcached_result_value(results));
+  uint64_t cas_value= memcached_result_cas(results);
+  test_true(cas_value);
+
+  char* take_value= memcached_result_take_value(results);
+  test_strcmp(__func__, take_value);
+  free(take_value);
+
+  memcached_result_free(results);
+
+  // Bad cas value, sanity check 
+  test_true(cas_value != 9999);
+  test_compare(MEMCACHED_END,
+               memcached_cas(memc,
+                             test_literal_param(__func__), // Key
+                             test_literal_param(__FILE__), // Value
+                             time_t(0), uint32_t(0), 9999));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc,
+                                                "different", strlen("different"), // Key
+                                                test_literal_param(__FILE__), // Value
+                                                time_t(0), uint32_t(0)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_854604(memcached_st *)
+{
+  char buffer[1024];
+
+  test_compare(MEMCACHED_INVALID_ARGUMENTS, libmemcached_check_configuration(0, 0, buffer, 0));
+
+  test_compare(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("syntax error"), buffer, 0));
+
+  test_compare(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("syntax error"), buffer, 1));
+  test_compare(buffer[0], 0);
+
+  test_compare(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("syntax error"), buffer, 10));
+  test_true(strlen(buffer));
+
+  test_compare(MEMCACHED_PARSE_ERROR, libmemcached_check_configuration(test_literal_param("syntax error"), buffer, sizeof(buffer)));
+  test_true(strlen(buffer));
+
+  return TEST_SUCCESS;
+}
+
+static void die_message(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
+{
+  fprintf(stderr, "Iteration #%u: ", it);
+
+  if (error == MEMCACHED_ERRNO)
+  {
+    fprintf(stderr, "system error %d from %s: %s\n",
+            errno, what, strerror(errno));
+  }
+  else
+  {
+    fprintf(stderr, "error %d from %s: %s\n", error, what,
+            memcached_strerror(mc, error));
+  }
+}
+
+#define TEST_CONSTANT_CREATION 200
+
+test_return_t regression_bug_(memcached_st *memc)
+{
+  const char *remote_server;
+  (void)memc;
+
+  if (! (remote_server= getenv("LIBMEMCACHED_REMOTE_SERVER")))
+  {
+    return TEST_SKIPPED;
+  }
+
+  for (uint32_t x= 0; x < TEST_CONSTANT_CREATION; x++)
+  {
+    memcached_st* mc= memcached_create(NULL);
+    memcached_return rc;
+
+    rc= memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
+    if (rc != MEMCACHED_SUCCESS)
+    {
+      die_message(mc, rc, "memcached_behavior_set", x);
+    }
+
+    rc= memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, 1);
+    if (rc != MEMCACHED_SUCCESS)
+    {
+      die_message(mc, rc, "memcached_behavior_set", x);
+    }
+
+    rc= memcached_server_add(mc, remote_server, 0);
+    if (rc != MEMCACHED_SUCCESS)
+    {
+      die_message(mc, rc, "memcached_server_add", x);
+    }
+
+    const char *set_key= "akey";
+    const size_t set_key_len= strlen(set_key);
+    const char *set_value= "a value";
+    const size_t set_value_len= strlen(set_value);
+
+    if (rc == MEMCACHED_SUCCESS)
+    {
+      if (x > 0)
+      {
+        size_t get_value_len;
+        char *get_value;
+        uint32_t get_value_flags;
+
+        get_value= memcached_get(mc, set_key, set_key_len, &get_value_len,
+                                 &get_value_flags, &rc);
+        if (rc != MEMCACHED_SUCCESS)
+        {
+          die_message(mc, rc, "memcached_get", x);
+        }
+        else
+        {
+
+          if (x != 0 &&
+              (get_value_len != set_value_len
+               || 0!=strncmp(get_value, set_value, get_value_len)))
+          {
+            fprintf(stderr, "Values don't match?\n");
+            rc= MEMCACHED_FAILURE;
+          }
+          free(get_value);
+        }
+      }
+
+      rc= memcached_set(mc,
+                        set_key, set_key_len,
+                        set_value, set_value_len,
+                        0, /* time */
+                        0  /* flags */
+                       );
+      if (rc != MEMCACHED_SUCCESS)
+      {
+        die_message(mc, rc, "memcached_set", x);
+      }
+    }
+
+    memcached_quit(mc);
+    memcached_free(mc);
+
+    if (rc != MEMCACHED_SUCCESS)
+    {
+      break;
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t kill_HUP_TEST(memcached_st *original_memc)
+{
+  memcached_st *memc= create_single_instance_memcached(original_memc, 0);
+  test_true(memc);
+
+  const memcached_instance_st * instance= memcached_server_instance_by_position(memc, 0);
+
+  pid_t pid;
+  test_true((pid= libmemcached_util_getpid(memcached_server_name(instance),
+                                           memcached_server_port(instance), NULL)) > -1);
+
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, 
+                             test_literal_param(__func__), // Keys
+                             test_literal_param(__func__), // Values
+                             0, 0));
+  test_true_got(kill(pid, SIGHUP) == 0, strerror(errno));
+
+  memcached_return_t ret= memcached_set(memc, 
+                                        test_literal_param(__func__), // Keys
+                                        test_literal_param(__func__), // Values
+                                        0, 0);
+  test_compare(ret, memc);
+  test_compare(MEMCACHED_CONNECTION_FAILURE, memc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,190 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t MEMCACHED_BEHAVIOR_CORK_test(memcached_st *memc);
+test_return_t MEMCACHED_BEHAVIOR_POLL_TIMEOUT_test(memcached_st *memc);
+test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test(memcached_st *memc);
+test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test(memcached_st *memc);
+test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count);
+test_return_t add_host_test(memcached_st *memc);
+test_return_t add_host_test1(memcached_st *memc);
+test_return_t memcached_add_SUCCESS_TEST(memcached_st*);
+test_return_t add_test(memcached_st *memc);
+test_return_t add_wrapper(memcached_st *memc);
+test_return_t allocation_test(memcached_st *not_used);
+test_return_t analyzer_test(memcached_st *memc);
+test_return_t append_binary_test(memcached_st *memc);
+test_return_t append_test(memcached_st *memc);
+test_return_t bad_key_test(memcached_st *memc);
+test_return_t behavior_test(memcached_st *memc);
+test_return_t binary_add_regression(memcached_st *memc);
+test_return_t binary_increment_with_prefix_test(memcached_st *memc);
+test_return_t block_add_regression(memcached_st *memc);
+test_return_t callback_test(memcached_st *memc);
+test_return_t cas2_test(memcached_st *memc);
+test_return_t cas_test(memcached_st *memc);
+test_return_t check_for_1_2_3(memcached_st *memc);
+test_return_t clone_test(memcached_st *memc);
+test_return_t connection_test(memcached_st *memc);
+test_return_t crc_run (memcached_st *);
+test_return_t decrement_by_key_test(memcached_st *memc);
+test_return_t decrement_test(memcached_st *memc);
+test_return_t decrement_with_initial_by_key_test(memcached_st *memc);
+test_return_t decrement_with_initial_test(memcached_st *memc);
+test_return_t decrement_with_initial_999_test(memcached_st *memc);
+test_return_t delete_test(memcached_st *memc);
+test_return_t deprecated_set_memory_alloc(memcached_st *memc);
+test_return_t enable_cas(memcached_st *memc);
+test_return_t enable_consistent_crc(memcached_st *memc);
+test_return_t enable_consistent_hsieh(memcached_st *memc);
+test_return_t flush_test(memcached_st *memc);
+test_return_t fnv1_32_run (memcached_st *);
+test_return_t fnv1_64_run (memcached_st *);
+test_return_t fnv1a_32_run (memcached_st *);
+test_return_t fnv1a_64_run (memcached_st *);
+test_return_t get_stats(memcached_st *memc);
+test_return_t get_stats_keys(memcached_st *memc);
+test_return_t getpid_connection_failure_test(memcached_st *memc);
+test_return_t getpid_test(memcached_st *memc);
+test_return_t hash_sanity_test (memcached_st *memc);
+test_return_t hsieh_avaibility_test (memcached_st *memc);
+test_return_t hsieh_run (memcached_st *);
+test_return_t increment_by_key_test(memcached_st *memc);
+test_return_t increment_test(memcached_st *memc);
+test_return_t increment_with_initial_by_key_test(memcached_st *memc);
+test_return_t increment_with_initial_test(memcached_st *memc);
+test_return_t increment_with_initial_999_test(memcached_st *memc);
+test_return_t init_test(memcached_st *not_used);
+test_return_t jenkins_run (memcached_st *);
+test_return_t key_setup(memcached_st *memc);
+test_return_t key_teardown(memcached_st *);
+test_return_t libmemcached_string_behavior_test(memcached_st *);
+test_return_t libmemcached_string_distribution_test(memcached_st *);
+test_return_t md5_run (memcached_st *);
+test_return_t memcached_fetch_result_NOT_FOUND(memcached_st *memc);
+test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *);
+test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc);
+test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *memc);
+test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc);
+test_return_t memcached_get_hashkit_test (memcached_st *);
+test_return_t memcached_mget_mixed_memcached_get_TEST(memcached_st *memc);
+test_return_t memcached_return_t_TEST(memcached_st *memc);
+test_return_t memcached_server_cursor_test(memcached_st *memc);
+test_return_t memcached_server_remove_test(memcached_st*);
+test_return_t memcached_stat_execute_test(memcached_st *memc);
+test_return_t mget_end(memcached_st *memc);
+test_return_t mget_execute(memcached_st *original_memc);
+test_return_t MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH_TEST(memcached_st *original_memc);
+test_return_t mget_result_alloc_test(memcached_st *memc);
+test_return_t mget_result_function(memcached_st *memc);
+test_return_t mget_result_test(memcached_st *memc);
+test_return_t mget_test(memcached_st *memc);
+test_return_t murmur_avaibility_test (memcached_st *memc);
+test_return_t murmur_run (memcached_st *);
+test_return_t murmur3_TEST(hashkit_st *);
+test_return_t noreply_test(memcached_st *memc);
+test_return_t one_at_a_time_run (memcached_st *);
+test_return_t ketama_TEST(memcached_st *);
+test_return_t output_ketama_weighted_keys(memcached_st *);
+test_return_t libmemcached_util_ping_TEST(memcached_st*);
+test_return_t prepend_test(memcached_st *memc);
+test_return_t quit_test(memcached_st *memc);
+test_return_t read_through(memcached_st *memc);
+test_return_t regression_bug_(memcached_st*);
+test_return_t regression_bug_421108(memcached_st*);
+test_return_t regression_bug_434484(memcached_st*);
+test_return_t regression_bug_434843(memcached_st*);
+test_return_t regression_bug_434843_buffered(memcached_st*);
+test_return_t regression_bug_442914(memcached_st*);
+test_return_t regression_bug_447342(memcached_st*);
+test_return_t regression_bug_463297(memcached_st*);
+test_return_t regression_bug_490486(memcached_st*);
+test_return_t regression_bug_490520(memcached_st*);
+test_return_t regression_bug_581030(memcached_st*);
+test_return_t regression_bug_583031(memcached_st*);
+test_return_t regression_1021819_TEST(memcached_st*);
+test_return_t regression_bug_655423(memcached_st*);
+test_return_t regression_bug_854604(memcached_st*);
+test_return_t replace_test(memcached_st *memc);
+test_return_t result_alloc(memcached_st *memc);
+test_return_t result_static(memcached_st *memc);
+test_return_t selection_of_namespace_tests(memcached_st *memc);
+test_return_t server_sort2_test(memcached_st *ptr);
+test_return_t server_sort_test(memcached_st *ptr);
+test_return_t server_unsort_test(memcached_st *ptr);
+test_return_t set_memory_alloc(memcached_st *memc);
+test_return_t set_namespace(memcached_st *memc);
+test_return_t set_namespace_and_binary(memcached_st *memc);
+test_return_t set_test(memcached_st *memc);
+test_return_t set_test2(memcached_st *memc);
+test_return_t set_test3(memcached_st *memc);
+test_return_t stats_servername_test(memcached_st *memc);
+test_return_t test_get_last_disconnect(memcached_st *memc);
+test_return_t test_multiple_get_last_disconnect(memcached_st *);
+test_return_t test_verbosity(memcached_st *memc);
+test_return_t user_supplied_bug10(memcached_st *memc);
+test_return_t user_supplied_bug11(memcached_st *memc);
+test_return_t user_supplied_bug12(memcached_st *memc);
+test_return_t user_supplied_bug13(memcached_st *memc);
+test_return_t user_supplied_bug14(memcached_st *memc);
+test_return_t user_supplied_bug15(memcached_st *memc);
+test_return_t user_supplied_bug16(memcached_st *memc);
+test_return_t user_supplied_bug17(memcached_st *memc);
+test_return_t user_supplied_bug19(memcached_st *);
+test_return_t user_supplied_bug20(memcached_st *memc);
+test_return_t user_supplied_bug21(memcached_st *memc);
+test_return_t user_supplied_bug4(memcached_st *memc);
+test_return_t user_supplied_bug5(memcached_st *memc);
+test_return_t user_supplied_bug6(memcached_st *memc);
+test_return_t user_supplied_bug7(memcached_st *memc);
+test_return_t user_supplied_bug8(memcached_st *);
+test_return_t user_supplied_bug9(memcached_st *memc);
+test_return_t userdata_test(memcached_st *memc);
+test_return_t util_version_test(memcached_st *memc);
+test_return_t version_string_test(memcached_st *);
+test_return_t wrong_failure_counter_test(memcached_st *memc);
+test_return_t wrong_failure_counter_two_test(memcached_st *memc);
+test_return_t kill_HUP_TEST(memcached_st *memc);
+test_return_t regression_996813_TEST(memcached_st*);
+test_return_t regression_994772_TEST(memcached_st*);
+test_return_t regression_1009493_TEST(memcached_st*);
+test_return_t regression_1048945_TEST(memcached_st*);
+test_return_t regression_1067242_TEST(memcached_st*);
+test_return_t comparison_operator_memcached_st_and__memcached_return_t_TEST(memcached_st*);
+test_return_t regression_bug_1251482(memcached_st*);
@@ -0,0 +1,219 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+/*
+  Test cases
+*/
+
+#include <libmemcached-1.0/memcached.h>
+#include "tests/libmemcached-1.0/memcached_get.h"
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+
+test_return_t get_test(memcached_st *memc)
+{
+  uint64_t query_id= memcached_query_id(memc);
+  memcached_return_t rc= memcached_delete(memc,
+                                          test_literal_param(__func__),
+                                          time_t(0));
+  test_true(rc == MEMCACHED_BUFFERED or rc == MEMCACHED_NOTFOUND);
+  test_compare(query_id +1, memcached_query_id(memc));
+
+  size_t string_length;
+  uint32_t flags;
+  char *string= memcached_get(memc,
+                        test_literal_param(__func__),
+                        &string_length, &flags, &rc);
+
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  test_false(string_length);
+  test_false(string);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_test2(memcached_st *memc)
+{
+  const char *value= "when we sanitize";
+
+  uint64_t query_id= memcached_query_id(memc);
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             value, strlen(value),
+                             time_t(0), uint32_t(0)));
+  test_compare(query_id +1, memcached_query_id(memc));
+
+  query_id= memcached_query_id(memc);
+  test_true(query_id);
+
+  uint32_t flags;
+  size_t string_length;
+  memcached_return_t rc;
+  char *string= memcached_get(memc,
+                              test_literal_param(__func__),
+                              &string_length, &flags, &rc);
+  test_compare(query_id +1, memcached_query_id(memc));
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_compare(MEMCACHED_SUCCESS, memcached_last_error(memc));
+  test_true(string);
+  test_compare(strlen(value), string_length);
+  test_memcmp(string, value, string_length);
+
+  free(string);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_test3(memcached_st *memc)
+{
+  size_t value_length= 8191;
+
+  libtest::vchar_t value;
+  value.reserve(value_length);
+  for (uint32_t x= 0; x < value_length; x++)
+  {
+    value.push_back(char(x % 127));
+  }
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             &value[0], value.size(),
+                             time_t(0), uint32_t(0)));
+
+  size_t string_length;
+  uint32_t flags;
+  memcached_return_t rc;
+  char *string= memcached_get(memc,
+                              test_literal_param(__func__),
+                              &string_length, &flags, &rc);
+
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(string);
+  test_compare(value.size(), string_length);
+  test_memcmp(string, &value[0], string_length);
+
+  free(string);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t get_test4(memcached_st *memc)
+{
+  size_t value_length= 8191;
+
+  libtest::vchar_t value;
+  value.reserve(value_length);
+  for (uint32_t x= 0; x < value_length; x++)
+  {
+    value.push_back(char(x % 127));
+  }
+
+  test_compare(return_value_based_on_buffering(memc),
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             &value[0], value.size(),
+                             time_t(0), uint32_t(0)));
+
+  for (uint32_t x= 0; x < 10; x++)
+  {
+    uint32_t flags;
+    size_t string_length;
+    memcached_return_t rc;
+    char *string= memcached_get(memc,
+                                test_literal_param(__func__),
+                                &string_length, &flags, &rc);
+
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(string);
+    test_compare(value.size(), string_length);
+    test_memcmp(string, &value[0], string_length);
+    free(string);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * This test verifies that memcached_read_one_response doesn't try to
+ * dereference a NIL-pointer if you issue a multi-get and don't read out all
+ * responses before you execute a storage command.
+ */
+test_return_t get_test5(memcached_st *memc)
+{
+  /*
+  ** Request the same key twice, to ensure that we hash to the same server
+  ** (so that we have multiple response values queued up) ;-)
+  */
+  const char *keys[]= { "key", "key" };
+  size_t lengths[]= { 3, 3 };
+  uint32_t flags;
+  size_t rlen;
+
+  test_compare(return_value_based_on_buffering(memc),
+                    memcached_set(memc, keys[0], lengths[0],
+                                  keys[0], lengths[0],
+                                  time_t(0), uint32_t(0)));
+  test_compare(MEMCACHED_SUCCESS, memcached_mget(memc, keys, lengths, test_array_length(keys)));
+
+  memcached_result_st results_obj;
+  memcached_result_st *results= memcached_result_create(memc, &results_obj);
+  test_true(results);
+
+  memcached_return_t rc;
+  results= memcached_fetch_result(memc, &results_obj, &rc);
+  test_true(results);
+
+  memcached_result_free(&results_obj);
+
+  /* Don't read out the second result, but issue a set instead.. */
+  test_compare(MEMCACHED_SUCCESS, memcached_set(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0));
+
+  char *val= memcached_get_by_key(memc, keys[0], lengths[0], "yek", 3,
+                                  &rlen, &flags, &rc);
+  test_false(val);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+  val= memcached_get(memc, keys[0], lengths[0], &rlen, &flags, &rc);
+  test_true(val);
+  test_compare(MEMCACHED_SUCCESS, rc);
+  free(val);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,44 @@
+/*  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
+
+test_return_t get_test(memcached_st*);
+test_return_t get_test2(memcached_st*);
+test_return_t get_test3(memcached_st*);
+test_return_t get_test4(memcached_st*);
+test_return_t get_test5(memcached_st*);
+
@@ -0,0 +1,109 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+
+#include <tests/namespace.h>
+
+test_return_t memcached_increment_namespace(memcached_st *memc)
+{
+  uint64_t new_number;
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc, 
+                             test_literal_param("number"),
+                             test_literal_param("0"),
+                             (time_t)0, (uint32_t)0));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(memc,
+                                   test_literal_param("number"),
+                                   1, &new_number));
+  test_compare(uint64_t(1), new_number);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(memc,
+                                   test_literal_param("number"),
+                                   1, &new_number));
+  test_compare(uint64_t(2), new_number);
+
+  memcached_st *clone= memcached_clone(NULL, memc);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_callback_set(clone, MEMCACHED_CALLBACK_NAMESPACE, "all_your_bases"));
+
+  test_compare(MEMCACHED_NOTFOUND, 
+               memcached_increment(clone,
+                                   test_literal_param("number"),
+                                   1, &new_number));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_add(clone, 
+                             test_literal_param("number"),
+                             test_literal_param("10"),
+                             (time_t)0, (uint32_t)0));
+
+  char *value= memcached_get(clone, 
+                             test_literal_param("number"),
+                             0, 0, 0);
+  test_true(value);
+  test_compare(2UL, strlen(value));
+  test_strcmp("10", value);
+  free(value);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(clone,
+                                   test_literal_param("number"),
+                                   1, &new_number));
+  test_compare(uint64_t(11), new_number);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_increment(memc,
+                                   test_literal_param("number"),
+                                   1, &new_number));
+  test_compare(uint64_t(3), new_number);
+
+  memcached_free(clone);
+
+  return TEST_SUCCESS;
+}
+
@@ -0,0 +1,790 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <vector>
+#include <string>
+#include <cerrno>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+#include <tests/libmemcached-1.0/parser.h>
+#include <tests/print.h>
+#include "libmemcached/instance.hpp"
+
+enum scanner_type_t
+{
+  NIL,
+  UNSIGNED,
+  SIGNED,
+  ARRAY
+};
+
+
+struct scanner_string_st {
+  const char *c_str;
+  size_t size;
+};
+
+static inline scanner_string_st scanner_string(const char *arg, size_t arg_size)
+{
+  scanner_string_st local= { arg, arg_size };
+  return local;
+}
+
+#define make_scanner_string(X) scanner_string((X), static_cast<size_t>(sizeof(X) - 1))
+
+static struct scanner_string_st scanner_string_null= { 0, 0};
+
+struct scanner_variable_t {
+  enum scanner_type_t type;
+  struct scanner_string_st option;
+  struct scanner_string_st result;
+  test_return_t (*check_func)(memcached_st *memc, const scanner_string_st &hostname);
+};
+
+// Check and make sure the first host is what we expect it to be
+static test_return_t __check_host(memcached_st *memc, const scanner_string_st &hostname)
+{
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+
+  test_true(instance);
+
+  const char *first_hostname = memcached_server_name(instance);
+  test_true(first_hostname);
+  test_strcmp(first_hostname, hostname.c_str);
+
+  return TEST_SUCCESS;
+}
+
+// Check and make sure the prefix_key is what we expect it to be
+static test_return_t __check_namespace(memcached_st *, const scanner_string_st &)
+{
+#if 0
+  const char *_namespace = memcached_get_namespace(memc);
+  test_true(_namespace);
+  test_strcmp(_namespace, arg.c_str);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t __check_IO_MSG_WATERMARK(memcached_st *memc, const scanner_string_st &value)
+{
+  uint64_t value_number;
+
+  value_number= atoll(value.c_str);
+
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK) == value_number);
+  return TEST_SUCCESS;
+}
+
+static test_return_t __check_REMOVE_FAILED_SERVERS(memcached_st *memc, const scanner_string_st &)
+{
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS));
+  return TEST_SUCCESS;
+}
+
+static test_return_t __check_NOREPLY(memcached_st *memc, const scanner_string_st &)
+{
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NOREPLY));
+  return TEST_SUCCESS;
+}
+
+static test_return_t __check_VERIFY_KEY(memcached_st *memc, const scanner_string_st &)
+{
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY));
+  return TEST_SUCCESS;
+}
+
+static test_return_t __check_distribution_RANDOM(memcached_st *memc, const scanner_string_st &)
+{
+  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION) == MEMCACHED_DISTRIBUTION_RANDOM);
+  return TEST_SUCCESS;
+}
+
+scanner_variable_t test_server_strings[]= {
+  { ARRAY, make_scanner_string("--server=localhost"), make_scanner_string("localhost"), __check_host },
+  { ARRAY, make_scanner_string("--server=10.0.2.1"), make_scanner_string("10.0.2.1"), __check_host },
+  { ARRAY, make_scanner_string("--server=example.com"), make_scanner_string("example.com"), __check_host },
+  { ARRAY, make_scanner_string("--server=localhost:30"), make_scanner_string("localhost"), __check_host },
+  { ARRAY, make_scanner_string("--server=10.0.2.1:20"), make_scanner_string("10.0.2.1"), __check_host },
+  { ARRAY, make_scanner_string("--server=example.com:1024"), make_scanner_string("example.com"), __check_host },
+  { NIL, scanner_string_null, scanner_string_null, NULL }
+};
+
+scanner_variable_t test_server_strings_with_weights[]= {
+  { ARRAY, make_scanner_string("--server=10.0.2.1:30/?40"), make_scanner_string("10.0.2.1"), __check_host },
+  { ARRAY, make_scanner_string("--server=example.com:1024/?30"), make_scanner_string("example.com"), __check_host },
+  { ARRAY, make_scanner_string("--server=10.0.2.1/?20"), make_scanner_string("10.0.2.1"), __check_host },
+  { ARRAY, make_scanner_string("--server=example.com/?10"), make_scanner_string("example.com"), __check_host },
+  { NIL, scanner_string_null, scanner_string_null, NULL }
+};
+
+scanner_variable_t bad_test_strings[]= {
+  { ARRAY, make_scanner_string("-servers=localhost:11221,localhost:11222,localhost:11223,localhost:11224,localhost:11225"), scanner_string_null, NULL },
+  { ARRAY, make_scanner_string("-- servers=a.example.com:81,localhost:82,b.example.com"), scanner_string_null, NULL },
+  { ARRAY, make_scanner_string("--servers=localhost:+80"), scanner_string_null, NULL},
+  { ARRAY, make_scanner_string("--servers=localhost.com."), scanner_string_null, NULL},
+  { ARRAY, make_scanner_string("--server=localhost.com."), scanner_string_null, NULL},
+  { ARRAY, make_scanner_string("--server=localhost.com.:80"), scanner_string_null, NULL},
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+scanner_variable_t test_number_options[]= {
+  { ARRAY,  make_scanner_string("--CONNECT-TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--IO-BYTES-WATERMARK=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--IO-KEY-PREFETCH=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--IO-MSG-WATERMARK=456"), make_scanner_string("456"), __check_IO_MSG_WATERMARK },
+  { ARRAY,  make_scanner_string("--NUMBER-OF-REPLICAS=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--POLL-TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--RCV-TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--REMOVE-FAILED-SERVERS=3"), scanner_string_null, __check_REMOVE_FAILED_SERVERS },
+  { ARRAY,  make_scanner_string("--RETRY-TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--SND-TIMEOUT=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--SOCKET-RECV-SIZE=456"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--SOCKET-SEND-SIZE=456"), scanner_string_null, NULL },
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+scanner_variable_t test_boolean_options[]= {
+  { ARRAY,  make_scanner_string("--FETCH-VERSION"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--BINARY-PROTOCOL"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--BUFFER-REQUESTS"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--HASH-WITH-NAMESPACE"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--NOREPLY"), scanner_string_null, __check_NOREPLY },
+  { ARRAY,  make_scanner_string("--RANDOMIZE-REPLICA-READ"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--SORT-HOSTS"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--SUPPORT-CAS"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--TCP-NODELAY"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--TCP-KEEPALIVE"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--TCP-KEEPIDLE"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--USE-UDP"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--VERIFY-KEY"), scanner_string_null, __check_VERIFY_KEY },
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+scanner_variable_t namespace_strings[]= {
+  { ARRAY, make_scanner_string("--NAMESPACE=foo"), make_scanner_string("foo"), __check_namespace },
+  { ARRAY, make_scanner_string("--NAMESPACE=\"foo\""), make_scanner_string("foo"), __check_namespace },
+  { ARRAY, make_scanner_string("--NAMESPACE=\"This_is_a_very_long_key\""), make_scanner_string("This_is_a_very_long_key"), __check_namespace },
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+scanner_variable_t distribution_strings[]= {
+  { ARRAY,  make_scanner_string("--DISTRIBUTION=consistent"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--DISTRIBUTION=consistent,CRC"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--DISTRIBUTION=consistent,MD5"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--DISTRIBUTION=random"), scanner_string_null, __check_distribution_RANDOM },
+  { ARRAY,  make_scanner_string("--DISTRIBUTION=modula"), scanner_string_null, NULL },
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+scanner_variable_t hash_strings[]= {
+  { ARRAY,  make_scanner_string("--HASH=CRC"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--HASH=FNV1A_32"), scanner_string_null, NULL },
+  { ARRAY,  make_scanner_string("--HASH=FNV1_32"), scanner_string_null, NULL },
+#if 0
+  { ARRAY,  make_scanner_string("--HASH=JENKINS"), scanner_string_null, NULL },
+#endif
+  { ARRAY,  make_scanner_string("--HASH=MD5"), scanner_string_null, NULL },
+  { NIL, scanner_string_null, scanner_string_null, NULL}
+};
+
+
+static test_return_t _test_option(scanner_variable_t *scanner, bool test_true_opt= true)
+{
+  for (scanner_variable_t *ptr= scanner; ptr->type != NIL; ptr++)
+  {
+    memcached_st *memc= memcached(ptr->option.c_str, ptr->option.size);
+
+    // The case that it should have parsed, but it didn't. We will inspect for
+    // an error with libmemcached_check_configuration()
+    if (memc == NULL and test_true_opt)
+    {
+      char buffer[2048];
+      bool success= libmemcached_check_configuration(ptr->option.c_str, ptr->option.size, buffer, sizeof(buffer));
+
+      std::string temp(buffer);
+      temp+= " with option string:";
+      temp+= ptr->option.c_str;
+      test_true_got(success, temp.c_str());
+      Error << "Failed for " << temp;
+
+      return TEST_FAILURE; // The line above should fail since memc should be null
+    }
+
+    if (test_true_opt)
+    {
+      if (ptr->check_func)
+      {
+        test_return_t test_rc= (*ptr->check_func)(memc, ptr->result);
+        if (test_rc != TEST_SUCCESS)
+        {
+          memcached_free(memc);
+          return test_rc;
+        }
+      }
+
+      memcached_free(memc);
+    }
+    else
+    {
+      test_false_with(memc, ptr->option.c_str);
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t server_test(memcached_st *)
+{
+  return _test_option(test_server_strings);
+}
+
+test_return_t server_with_weight_test(memcached_st *)
+{
+  return _test_option(test_server_strings_with_weights);
+}
+
+test_return_t servers_bad_test(memcached_st *)
+{
+  test_return_t rc;
+  if ((rc= _test_option(bad_test_strings, false)) != TEST_SUCCESS)
+  {
+    return rc;
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t parser_number_options_test(memcached_st*)
+{
+  return _test_option(test_number_options);
+}
+
+test_return_t parser_boolean_options_test(memcached_st*)
+{
+  return _test_option(test_boolean_options);
+}
+
+test_return_t behavior_parser_test(memcached_st*)
+{
+  return TEST_SUCCESS;
+}
+
+test_return_t parser_hash_test(memcached_st*)
+{
+  return _test_option(hash_strings);
+}
+
+test_return_t parser_distribution_test(memcached_st*)
+{
+  return _test_option(distribution_strings);
+}
+
+test_return_t parser_key_prefix_test(memcached_st*)
+{
+  return _test_option(distribution_strings);
+}
+
+test_return_t test_namespace_keyword(memcached_st*)
+{
+  return _test_option(namespace_strings);
+}
+
+#define SUPPORT_EXAMPLE_CNF "support/example.cnf"
+
+test_return_t memcached_create_with_options_with_filename(memcached_st*)
+{
+  test_skip(0, access(SUPPORT_EXAMPLE_CNF, R_OK));
+
+  memcached_st *memc_ptr= memcached(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""));
+  test_true_got(memc_ptr, "memcached() failed");
+  memcached_free(memc_ptr);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t libmemcached_check_configuration_with_filename_test(memcached_st*)
+{
+  test_skip(0, access(SUPPORT_EXAMPLE_CNF, R_OK));
+
+  char buffer[BUFSIZ];
+
+  test_compare_hint(MEMCACHED_SUCCESS,
+                    libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"support/example.cnf\""), buffer, sizeof(buffer)),
+                    buffer);
+
+  test_compare_hint(MEMCACHED_SUCCESS,
+                    libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=support/example.cnf"), buffer, sizeof(buffer)),
+                    buffer);
+
+  test_compare_hint(MEMCACHED_ERRNO,
+                    libmemcached_check_configuration(test_literal_param("--CONFIGURE-FILE=\"bad-path/example.cnf\""), buffer, sizeof(buffer)),
+                    buffer) ;
+
+  return TEST_SUCCESS;
+}
+
+test_return_t libmemcached_check_configuration_test(memcached_st*)
+{
+  char buffer[BUFSIZ];
+  test_compare(MEMCACHED_SUCCESS,
+               libmemcached_check_configuration(test_literal_param("--server=localhost"), buffer, sizeof(buffer)));
+
+  test_compare_hint(MEMCACHED_PARSE_ERROR,
+                    libmemcached_check_configuration(test_literal_param("--dude=localhost"), buffer, sizeof(buffer)),
+                    buffer);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_create_with_options_test(memcached_st*)
+{
+  {
+    memcached_st *memc_ptr;
+    memc_ptr= memcached(test_literal_param("--server=localhost"));
+    test_true_got(memc_ptr, memcached_last_error_message(memc_ptr));
+    memcached_free(memc_ptr);
+  }
+
+  {
+    memcached_st *memc_ptr= memcached(test_literal_param("--dude=localhost"));
+    test_false_with(memc_ptr, memcached_last_error_message(memc_ptr));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_include_keyword(memcached_st*)
+{
+  test_skip(0, access(SUPPORT_EXAMPLE_CNF, R_OK));
+
+  char buffer[BUFSIZ];
+  test_compare(MEMCACHED_SUCCESS, 
+               libmemcached_check_configuration(test_literal_param("INCLUDE \"support/example.cnf\""), buffer, sizeof(buffer)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_end_keyword(memcached_st*)
+{
+  char buffer[BUFSIZ];
+  test_compare(MEMCACHED_SUCCESS, 
+               libmemcached_check_configuration(test_literal_param("--server=localhost END bad keywords"), buffer, sizeof(buffer)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_reset_keyword(memcached_st*)
+{
+  char buffer[BUFSIZ];
+  test_compare(MEMCACHED_SUCCESS,
+               libmemcached_check_configuration(test_literal_param("--server=localhost reset --server=bad.com"), buffer, sizeof(buffer)));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_error_keyword(memcached_st*)
+{
+  char buffer[BUFSIZ];
+  memcached_return_t rc;
+  rc= libmemcached_check_configuration(test_literal_param("--server=localhost ERROR --server=bad.com"), buffer, sizeof(buffer));
+  test_true_got(rc != MEMCACHED_SUCCESS, buffer);
+
+  return TEST_SUCCESS;
+}
+
+#define RANDOM_STRINGS 1000
+test_return_t random_statement_build_test(memcached_st*)
+{
+  std::vector<scanner_string_st *> option_list;
+
+  for (scanner_variable_t *ptr= test_server_strings; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  for (scanner_variable_t *ptr= test_number_options; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  for (scanner_variable_t *ptr= test_boolean_options; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  for (scanner_variable_t *ptr= namespace_strings; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  for (scanner_variable_t *ptr= distribution_strings; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  for (scanner_variable_t *ptr= hash_strings; ptr->type != NIL; ptr++)
+    option_list.push_back(&ptr->option);
+
+  std::vector<bool> used_list;
+  used_list.resize(option_list.size());
+
+  struct used_options_st {
+    bool has_hash;
+    bool has_namespace;
+    bool has_distribution;
+    bool has_buffer_requests;
+    bool has_udp;
+    bool has_binary;
+    bool has_verify_key;
+
+    used_options_st() :
+      has_hash(false),
+      has_namespace(false),
+      has_distribution(false),
+      has_buffer_requests(false),
+      has_udp(false),
+      has_binary(false),
+      has_verify_key(false)
+    {
+    }
+  } used_options;
+
+  for (uint32_t x= 0; x < RANDOM_STRINGS; x++)
+  {
+    std::string random_options;
+
+    uint32_t number_of= random() % uint32_t(option_list.size());
+    for (uint32_t options= 0; options < number_of; options++)
+    {
+      size_t option_list_position= random() % option_list.size();
+
+      if (used_list[option_list_position])
+      {
+        continue;
+      }
+      used_list[option_list_position]= true;
+
+      std::string random_string= option_list[option_list_position]->c_str;
+
+      if (random_string.compare(0, test_literal_compare_param("--HASH")) == 0)
+      {
+        if (used_options.has_hash)
+        {
+          continue;
+        }
+
+        if (used_options.has_distribution)
+        {
+          continue;
+        }
+        used_options.has_hash= true;
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--NAMESPACE")) == 0)
+      {
+        if (used_options.has_namespace)
+        {
+          continue;
+        }
+        used_options.has_namespace= true;
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--USE-UDP")) == 0)
+      {
+        if (used_options.has_udp)
+        {
+          continue;
+        }
+        used_options.has_udp= true;
+
+        if (used_options.has_buffer_requests)
+        {
+          continue;
+        }
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--BUFFER-REQUESTS")) == 0)
+      {
+        if (used_options.has_buffer_requests)
+        {
+          continue;
+        }
+        used_options.has_buffer_requests= true;
+
+        if (used_options.has_udp)
+        {
+          continue;
+        }
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--BINARY-PROTOCOL")) == 0)
+      {
+        if (used_options.has_binary)
+        {
+          continue;
+        }
+        used_options.has_binary= true;
+
+        if (used_options.has_verify_key)
+        {
+          continue;
+        }
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--VERIFY-KEY")) == 0)
+      {
+        if (used_options.has_verify_key)
+        {
+          continue;
+        }
+        used_options.has_verify_key= true;
+
+        if (used_options.has_binary)
+        {
+          continue;
+        }
+      }
+
+      if (random_string.compare(0, test_literal_compare_param("--DISTRIBUTION")) == 0)
+      {
+        if (used_options.has_distribution)
+        {
+          continue;
+        }
+
+        if (used_options.has_hash)
+        {
+          continue;
+        }
+        used_options.has_distribution= true;
+      }
+
+      random_options+= random_string;
+      random_options+= " ";
+    }
+
+    if (random_options.size() <= 1)
+    {
+      continue;
+    }
+
+    random_options.resize(random_options.size() -1);
+
+    char buffer[BUFSIZ];
+    memcached_return_t rc= libmemcached_check_configuration(random_options.c_str(), random_options.size(), buffer, sizeof(buffer));
+    if (memcached_failed(rc))
+    {
+      Error << "libmemcached_check_configuration(" << random_options << ") : " << buffer;
+      return TEST_FAILURE;
+    }
+  }
+
+  return TEST_SUCCESS;
+}
+
+static memcached_return_t dump_server_information(const memcached_st *,
+                                                  const memcached_instance_st * instance,
+                                                  void *)
+{
+  if (strcmp(memcached_server_name(instance), "localhost")) 
+  {
+    fatal_assert(not memcached_server_name(instance));
+    return MEMCACHED_FAILURE;
+  }
+
+  if (memcached_server_port(instance) < 8888 or memcached_server_port(instance) > 8892)
+  {
+    fatal_assert(not memcached_server_port(instance));
+    return MEMCACHED_FAILURE;
+  }
+
+  if (instance->weight > 5 or instance->weight < 2)
+  {
+    fatal_assert(not instance->weight);
+    return MEMCACHED_FAILURE;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t test_hostname_port_weight(memcached_st *)
+{
+  const char *server_string= "--server=localhost:8888/?2 --server=localhost:8889/?3 --server=localhost:8890/?4 --server=localhost:8891/?5 --server=localhost:8892/?3";
+  char buffer[BUFSIZ];
+
+  test_compare_got(MEMCACHED_SUCCESS,
+                   libmemcached_check_configuration(server_string, strlen(server_string), buffer, sizeof(buffer)), buffer);
+
+  memcached_st *memc= memcached(server_string, strlen(server_string));
+  test_true(memc);
+
+  memcached_server_fn callbacks[]= { dump_server_information };
+  test_true(memcached_success(memcached_server_cursor(memc, callbacks, NULL, 1)));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+struct socket_weight_t {
+  const char *socket;
+  size_t weight;
+  const char* type;
+};
+
+static memcached_return_t dump_socket_information(const memcached_st *,
+                                                  const memcached_instance_st * instance,
+                                                  void *context)
+{
+  socket_weight_t *check= (socket_weight_t *)context;
+
+  if (strcmp(memcached_server_type(instance), check->type) == 0)
+  {
+    if (strcmp(memcached_server_name(instance), check->socket) == 0)
+    {
+      if (instance->weight == check->weight)
+      {
+        return MEMCACHED_SUCCESS;
+      }
+      else
+      {
+        Error << instance->weight << " != " << check->weight;
+      }
+    }
+    else
+    {
+      Error << "'" << memcached_server_name(instance) << "'" << " != " << "'" << check->socket << "'";
+    }
+  }
+  else
+  {
+    Error << "'" << memcached_server_type(instance) << "'" << " != " << "'" << check->type << "'";
+  }
+
+  return MEMCACHED_FAILURE;
+}
+
+test_return_t test_parse_socket(memcached_st *)
+{
+  char buffer[BUFSIZ];
+
+  memcached_server_fn callbacks[]= { dump_socket_information };
+  {
+    test_compare_got(MEMCACHED_SUCCESS,
+                     libmemcached_check_configuration(test_literal_param("--socket=\"/tmp/foo\""), buffer, sizeof(buffer)),
+                     buffer);
+
+    memcached_st *memc= memcached(test_literal_param("--socket=\"/tmp/foo\""));
+    test_true(memc);
+    socket_weight_t check= { "/tmp/foo", 1, "SOCKET"};
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_server_cursor(memc, callbacks, &check, 1));
+    memcached_free(memc);
+  }
+
+  {
+    test_compare_got(MEMCACHED_SUCCESS,
+                     libmemcached_check_configuration(test_literal_param("--socket=\"/tmp/foo\"/?23"), buffer, sizeof(buffer)),
+                     buffer);
+
+    memcached_st *memc= memcached(test_literal_param("--socket=\"/tmp/foo\"/?23"));
+    test_true(memc);
+    socket_weight_t check= { "/tmp/foo", 23, "SOCKET"};
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_server_cursor(memc, callbacks, &check, 1));
+    memcached_free(memc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+/*
+  By setting the timeout value to zero, we force poll() to return immediatly.
+*/
+test_return_t regression_bug_71231153_connect(memcached_st *)
+{
+  if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
+    return TEST_SKIPPED;
+
+  { // Test the connect-timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
+    memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --CONNECT-TIMEOUT=0"));
+    test_true(memc);
+    test_zero(memc->connect_timeout);
+    test_compare(MEMCACHED_DEFAULT_TIMEOUT, memc->poll_timeout);
+
+    memcached_return_t rc;
+    size_t value_len;
+    char *value= memcached_get(memc, test_literal_param("test"), &value_len, NULL, &rc);
+    test_false(value);
+    test_zero(value_len);
+    test_compare_got(MEMCACHED_TIMEOUT, rc, memcached_last_error_message(memc));
+
+    memcached_free(memc);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t regression_bug_71231153_poll(memcached_st *)
+{
+  if (libmemcached_util_ping("10.0.2.252", 0, NULL)) // If for whatever reason someone has a host at this address, skip
+  {
+    return TEST_SKIPPED;
+  }
+
+  { // Test the poll timeout, on a bad host we should get MEMCACHED_CONNECTION_FAILURE
+    memcached_st *memc= memcached(test_literal_param("--SERVER=10.0.2.252 --POLL-TIMEOUT=0"));
+    test_true(memc);
+    test_compare(MEMCACHED_DEFAULT_CONNECT_TIMEOUT, memc->connect_timeout);
+    test_zero(memc->poll_timeout);
+
+    memcached_return_t rc;
+    size_t value_len;
+    char *value= memcached_get(memc, test_literal_param("test"), &value_len, NULL, &rc);
+    test_false(value);
+    test_zero(value_len);
+#ifdef __APPLE__
+    test_compare_got(MEMCACHED_CONNECTION_FAILURE, rc, memcached_last_error_message(memc));
+#else
+    test_compare_got(MEMCACHED_TIMEOUT, rc, memcached_last_error_message(memc));
+#endif
+
+    memcached_free(memc);
+  }
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,118 @@
+/*  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
+
+test_return_t memcached_NULL_string_TEST(memcached_st*);
+test_return_t memcached_zero_string_length_TEST(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t server_test(memcached_st *memc);
+
+LIBTEST_LOCAL
+test_return_t servers_bad_test(memcached_st *memc);
+
+LIBTEST_LOCAL
+test_return_t behavior_parser_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t parser_number_options_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t parser_distribution_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t parser_hash_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t parser_boolean_options_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t parser_key_prefix_test(memcached_st*);
+
+LIBTEST_LOCAL
+  test_return_t libmemcached_check_configuration_test(memcached_st*);
+
+LIBTEST_LOCAL
+  test_return_t memcached_create_with_options_test(memcached_st*);
+
+LIBTEST_LOCAL
+  test_return_t memcached_create_with_options_with_filename(memcached_st*);
+
+LIBTEST_LOCAL
+  test_return_t libmemcached_check_configuration_with_filename_test(memcached_st*);
+
+LIBTEST_LOCAL
+  test_return_t random_statement_build_test(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t test_include_keyword(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t test_end_keyword(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t test_reset_keyword(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t test_error_keyword(memcached_st*);
+
+LIBTEST_LOCAL
+test_return_t server_with_weight_test(memcached_st *);
+
+LIBTEST_LOCAL
+test_return_t test_hostname_port_weight(memcached_st *);
+
+LIBTEST_LOCAL
+test_return_t regression_bug_71231153_connect(memcached_st *);
+
+LIBTEST_LOCAL
+test_return_t regression_bug_71231153_poll(memcached_st *);
+
+LIBTEST_LOCAL
+test_return_t test_parse_socket(memcached_st *);
+
+LIBTEST_LOCAL
+test_return_t test_namespace_keyword(memcached_st*);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -0,0 +1,340 @@
+/*  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>
+
+/*
+  C++ interface test
+*/
+#include <libmemcached-1.0/memcached.hpp>
+#include <libtest/test.hpp>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <ctime>
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+using namespace memcache;
+using namespace libtest;
+
+static void populate_vector(vector<char> &vec, const string &str)
+{
+  vec.reserve(str.length());
+  vec.assign(str.begin(), str.end());
+}
+
+static void copy_vec_to_string(vector<char> &vec, string &str)
+{
+  str.clear();
+  if (not vec.empty())
+  {
+    str.assign(vec.begin(), vec.end());
+  }
+}
+
+static test_return_t basic_test(memcached_st *memc)
+{
+  Memcache foo(memc);
+  const string value_set("This is some data");
+  std::vector<char> value;
+  std::vector<char> test_value;
+
+  populate_vector(value, value_set);
+
+  test_true(foo.set("mine", value, 0, 0));
+  test_true(foo.get("mine", test_value));
+
+  test_compare(test_value.size(), value.size());
+  test_memcmp(&test_value[0], &value[0], test_value.size());
+  test_false(foo.set("", value, 0, 0));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t increment_test(memcached_st *original)
+{
+  Memcache mcach(original);
+  const string key("blah");
+  const string inc_value("1");
+  std::vector<char> inc_val;
+  vector<char> ret_value;
+  string ret_string;
+  uint64_t int_inc_value;
+  uint64_t int_ret_value;
+
+  populate_vector(inc_val, inc_value);
+
+  test_true(mcach.set(key, inc_val, 0, 0));
+
+  test_true(mcach.get(key, ret_value));
+  test_false(ret_value.empty());
+  copy_vec_to_string(ret_value, ret_string);
+
+  int_inc_value= uint64_t(atol(inc_value.c_str()));
+  int_ret_value= uint64_t(atol(ret_string.c_str()));
+  test_compare(int_inc_value, int_ret_value);
+
+  test_true(mcach.increment(key, 1, &int_ret_value));
+  test_compare(uint64_t(2), int_ret_value);
+
+  test_true(mcach.increment(key, 1, &int_ret_value));
+  test_compare(uint64_t(3), int_ret_value);
+
+  test_true(mcach.increment(key, 5, &int_ret_value));
+  test_compare(uint64_t(8), int_ret_value);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t basic_master_key_test(memcached_st *original)
+{
+  Memcache foo(original);
+  const string value_set("Data for server A");
+  vector<char> value;
+  vector<char> test_value;
+  const string master_key_a("server-a");
+  const string master_key_b("server-b");
+  const string key("xyz");
+
+  populate_vector(value, value_set);
+
+  test_true(foo.setByKey(master_key_a, key, value, 0, 0));
+  test_true(foo.getByKey(master_key_a, key, test_value));
+
+  test_compare(value.size(), test_value.size());
+  test_memcmp(&value[0], &test_value[0], value.size());
+
+  test_value.clear();
+
+#if 0
+  test_false(foo.getByKey(master_key_b, key, test_value));
+  test_zero(test_value.size());
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t mget_test(memcached_st *original)
+{
+  Memcache memc(original);
+  memcached_return_t mc_rc;
+  vector<string> keys;
+  vector< vector<char> *> values;
+  keys.reserve(3);
+  keys.push_back("fudge");
+  keys.push_back("son");
+  keys.push_back("food");
+  vector<char> val1;
+  vector<char> val2;
+  vector<char> val3;
+  populate_vector(val1, "fudge");
+  populate_vector(val2, "son");
+  populate_vector(val3, "food");
+  values.reserve(3);
+  values.push_back(&val1);
+  values.push_back(&val2);
+  values.push_back(&val3);
+
+  string return_key;
+  vector<char> return_value;
+
+  /* We need to empty the server before we continue the test */
+  bool flush_res= memc.flush();
+  if (flush_res == false)
+  {
+    std::string error_string;
+    ASSERT_TRUE(memc.error(error_string));
+    Error << error_string;
+  }
+  test_true(memc.flush());
+
+  test_true(memc.mget(keys));
+
+  test_compare(MEMCACHED_NOTFOUND, 
+               memc.fetch(return_key, return_value));
+
+  test_true(memc.setAll(keys, values, 50, 9));
+
+  test_true(memc.mget(keys));
+  size_t count= 0;
+  while (memcached_success(mc_rc= memc.fetch(return_key, return_value)))
+  {
+    test_compare(return_key.length(), return_value.size());
+    test_memcmp(&return_value[0], return_key.c_str(), return_value.size());
+    count++;
+  }
+  test_compare(values.size(), count);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t lp_1010899_TEST(void*)
+{
+  // Check to see everything is setup internally even when no initial hosts are
+  // given.
+  Memcache memc;
+
+  test_false(memc.increment(__func__, 0, NULL));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t lp_1010899_with_args_TEST(memcached_st *original)
+{
+  // Check to see everything is setup internally even when a host is specified
+  // on creation.
+  const memcached_instance_st* instance= memcached_server_instance_by_position(original, 0);
+  Memcache memc(memcached_server_name(instance), memcached_server_port(instance));
+
+  test_false(memc.increment(__func__, 0, NULL));
+  test_true(memc.set(__func__, test_literal_param("12"), 0, 0)); 
+  test_true(memc.increment(__func__, 3, NULL));
+
+  std::vector<char> ret_val;
+  test_true(memc.get(__func__, ret_val));
+
+  test_strcmp(&ret_val[0], "15");
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t basic_behavior(memcached_st *original)
+{
+  Memcache memc(original);
+  test_true(memc.setBehavior(MEMCACHED_BEHAVIOR_VERIFY_KEY, true));
+  test_compare(true, memc.getBehavior(MEMCACHED_BEHAVIOR_VERIFY_KEY));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t error_test(memcached_st *)
+{
+  Memcache memc("--server=localhost:178");
+  std::vector<char> value;
+
+  test_false(memc.set("key", value, time_t(0), uint32_t(0)));
+
+  test_true(memc.error());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t error_std_string_test(memcached_st *)
+{
+  Memcache memc("--server=localhost:178");
+  std::vector<char> value;
+
+  test_false(memc.set("key", value, time_t(0), uint32_t(0)));
+
+  std::string error_message;
+  test_true(memc.error(error_message));
+  test_false(error_message.empty());
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t error_memcached_return_t_test(memcached_st *)
+{
+  Memcache memc("--server=localhost:178");
+  std::vector<char> value;
+
+  test_false(memc.set("key", value, time_t(0), uint32_t(0)));
+
+  memcached_return_t rc;
+  test_true(memc.error(rc));
+  test_compare(MEMCACHED_CONNECTION_FAILURE, rc);
+
+  return TEST_SUCCESS;
+}
+
+test_st error_tests[] ={
+  { "error()", false, reinterpret_cast<test_callback_fn*>(error_test) },
+  { "error(std::string&)", false, reinterpret_cast<test_callback_fn*>(error_std_string_test) },
+  { "error(memcached_return_t&)", false, reinterpret_cast<test_callback_fn*>(error_memcached_return_t_test) },
+  {0, 0, 0}
+};
+
+test_st tests[] ={
+  { "basic", false,
+    reinterpret_cast<test_callback_fn*>(basic_test) },
+  { "basic_master_key", false,
+    reinterpret_cast<test_callback_fn*>(basic_master_key_test) },
+  { "increment_test", false,
+    reinterpret_cast<test_callback_fn*>(increment_test) },
+  { "mget", true,
+    reinterpret_cast<test_callback_fn*>(mget_test) },
+  { "basic_behavior", false,
+    reinterpret_cast<test_callback_fn*>(basic_behavior) },
+  {0, 0, 0}
+};
+
+test_st regression_TESTS[] ={
+  { "lp:1010899 Memcache()", false, lp_1010899_TEST },
+  { "lp:1010899 Memcache(localhost, port)", false,
+    reinterpret_cast<test_callback_fn*>(lp_1010899_with_args_TEST) },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"block", 0, 0, tests},
+  {"error()", 0, 0, error_tests},
+  {"regression", 0, 0, regression_TESTS},
+  {0, 0, 0, 0}
+};
+
+#define SERVERS_TO_CREATE 5
+
+#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10
+#include "tests/libmemcached_world.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+}
@@ -0,0 +1,497 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <vector>
+#include <iostream>
+#include <string>
+#include <cerrno>
+
+#include <semaphore.h>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+#include <libmemcached/is.h>
+#include <tests/pool.h>
+
+#include <pthread.h>
+#include <poll.h>
+
+#include "libmemcached/instance.hpp"
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+
+test_return_t memcached_pool_test(memcached_st *)
+{
+  const char *config_string= "--SERVER=host10.example.com --SERVER=host11.example.com --SERVER=host10.example.com --POOL-MIN=10 --POOL-MAX=32";
+
+  char buffer[2048];
+
+  test_compare(libmemcached_check_configuration(config_string, sizeof(config_string) -1, buffer, sizeof(buffer)), MEMCACHED_PARSE_ERROR);
+
+  memcached_pool_st* pool= memcached_pool(config_string, strlen(config_string));
+  test_true(pool);
+
+  memcached_return_t rc;
+  memcached_st *memc= memcached_pool_pop(pool, false, &rc);
+
+  test_compare(rc, MEMCACHED_SUCCESS);
+  test_true(memc);
+
+  /*
+    Release the memc_ptr that was pulled from the pool
+  */
+  memcached_pool_push(pool, memc);
+
+  /*
+    Destroy the pool.
+  */
+  memcached_pool_destroy(pool);
+
+  return TEST_SUCCESS;
+}
+
+
+#define POOL_SIZE 10
+test_return_t connection_pool_test(memcached_st *memc)
+{
+  memcached_pool_st* pool= memcached_pool_create(memc, 5, POOL_SIZE);
+  test_true(pool);
+  memcached_st *mmc[POOL_SIZE];
+
+  // Fill up our array that we will store the memc that are in the pool
+  for (size_t x= 0; x < POOL_SIZE; ++x)
+  {
+    memcached_return_t rc;
+    mmc[x]= memcached_pool_fetch(pool, NULL, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(mmc[x]);
+  }
+
+  // All memc should be gone
+  {
+    memcached_return_t rc;
+    test_null(memcached_pool_fetch(pool, NULL, &rc));
+    test_compare(MEMCACHED_NOTFOUND, rc);
+  }
+
+  // Release them..
+  for (size_t x= 0; x < POOL_SIZE; ++x)
+  {
+    if (mmc[x])
+    {
+      test_compare(MEMCACHED_SUCCESS, memcached_pool_release(pool, mmc[x]));
+    }
+  }
+  test_true(memcached_pool_destroy(pool) == memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t connection_pool2_test(memcached_st *memc)
+{
+  memcached_pool_st* pool= memcached_pool_create(memc, 5, POOL_SIZE);
+  test_true(pool);
+  memcached_st *mmc[POOL_SIZE];
+
+  // Fill up our array that we will store the memc that are in the pool
+  for (size_t x= 0; x < POOL_SIZE; ++x)
+  {
+    memcached_return_t rc;
+    mmc[x]= memcached_pool_fetch(pool, NULL, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(mmc[x]);
+  }
+
+  // All memc should be gone
+  {
+    memcached_return_t rc;
+    test_null(memcached_pool_fetch(pool, NULL, &rc));
+    test_compare(MEMCACHED_NOTFOUND, rc);
+  }
+
+  // verify that I can do ops with all connections
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(mmc[0],
+                             test_literal_param("key"),
+                             "0", 1, 0, 0));
+
+  for (uint64_t x= 0; x < POOL_SIZE; ++x)
+  {
+    uint64_t number_value;
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_increment(mmc[x], 
+                                     test_literal_param("key"),
+                                     1, &number_value));
+    test_compare(number_value, (x+1));
+  }
+
+  // Release them..
+  for (size_t x= 0; x < POOL_SIZE; ++x)
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_pool_release(pool, mmc[x]));
+  }
+
+
+  /* verify that I can set behaviors on the pool when I don't have all
+   * of the connections in the pool. It should however be enabled
+   * when I push the item into the pool
+ */
+  mmc[0]= memcached_pool_fetch(pool, NULL, NULL);
+  test_true(mmc[0]);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_pool_behavior_set(pool, MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, 9999));
+
+  {
+    memcached_return_t rc;
+    mmc[1]= memcached_pool_fetch(pool, NULL, &rc);
+    test_true(mmc[1]);
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  test_compare(UINT64_C(9999), memcached_behavior_get(mmc[1], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_release(pool, mmc[1]));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_release(pool, mmc[0]));
+
+  {
+    memcached_return_t rc;
+    mmc[0]= memcached_pool_fetch(pool, NULL, &rc);
+    test_true(mmc[0]);
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  test_compare(UINT64_C(9999), memcached_behavior_get(mmc[0], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK));
+  test_compare(MEMCACHED_SUCCESS, memcached_pool_release(pool, mmc[0]));
+
+  test_true(memcached_pool_destroy(pool) == memc);
+
+  return TEST_SUCCESS;
+}
+
+struct test_pool_context_st {
+  volatile memcached_return_t rc;
+  memcached_pool_st* pool;
+  memcached_st* mmc;
+  sem_t _lock;
+
+  test_pool_context_st(memcached_pool_st *pool_arg, memcached_st *memc_arg):
+    rc(MEMCACHED_FAILURE),
+    pool(pool_arg),
+    mmc(memc_arg)
+  {
+    sem_init(&_lock, 0, 0);
+  }
+
+  void wait()
+  {
+    sem_wait(&_lock);
+  }
+
+  void release()
+  {
+    sem_post(&_lock);
+  }
+
+  ~test_pool_context_st()
+  {
+    sem_destroy(&_lock);
+  }
+};
+
+static __attribute__((noreturn)) void* connection_release(void *arg)
+{
+  test_pool_context_st *resource= static_cast<test_pool_context_st *>(arg);
+  FATAL_IF(resource == NULL);
+
+  // Release all of the memc we are holding 
+  resource->rc= memcached_pool_release(resource->pool, resource->mmc);
+  resource->release();
+
+  pthread_exit(arg);
+}
+
+test_return_t connection_pool3_test(memcached_st *memc)
+{
+#ifdef __APPLE__
+  return TEST_SKIPPED;
+#endif
+
+  memcached_pool_st* pool= memcached_pool_create(memc, 1, 1);
+  test_true(pool);
+
+  memcached_st *pool_memc;
+  {
+    memcached_return_t rc;
+    pool_memc= memcached_pool_fetch(pool, NULL, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(pool_memc);
+  }
+
+  /*
+    @note This comment was written to describe what was believed to be the original authors intent.
+
+    This portion of the test creates a thread that will wait until told to free a memcached_st
+    that will be grabbed by the main thread.
+
+    It is believed that this tests whether or not we are handling ownership correctly.
+  */
+  pthread_t tid;
+  test_pool_context_st item(pool, pool_memc);
+
+  test_zero(pthread_create(&tid, NULL, connection_release, &item));
+  item.wait();
+
+  memcached_return_t rc;
+  memcached_st *pop_memc;
+  // We do a hard loop, and try N times
+  int counter= 5;
+  do
+  {
+    struct timespec relative_time= { 0, 0 };
+    pop_memc= memcached_pool_fetch(pool, &relative_time, &rc);
+
+    if (memcached_success(rc))
+    {
+      break;
+    }
+
+    if (memcached_failed(rc))
+    {
+      test_null(pop_memc);
+      test_true(rc != MEMCACHED_TIMEOUT); // As long as relative_time is zero, MEMCACHED_TIMEOUT is invalid
+    }
+  } while (--counter);
+
+  if (memcached_failed(rc)) // Cleanup thread since we will exit once we test.
+  {
+    pthread_join(tid, NULL);
+    test_compare(MEMCACHED_SUCCESS, rc);
+  }
+
+  {
+    int pthread_ret= pthread_join(tid, NULL);
+    test_true(pthread_ret == 0 or pthread_ret == ESRCH);
+  }
+  test_compare(MEMCACHED_SUCCESS, rc);
+  test_true(pool_memc == pop_memc);
+
+  test_true(memcached_pool_destroy(pool) == memc);
+
+  return TEST_SUCCESS;
+}
+
+static memcached_st * create_single_instance_memcached(const memcached_st *original_memc, const char *options)
+{
+  /*
+    If no options are given, copy over at least the binary flag.
+  */
+  char options_buffer[1024]= { 0 };
+  if (options == NULL)
+  {
+    if (memcached_is_binary(original_memc))
+    {
+      snprintf(options_buffer, sizeof(options_buffer), "--BINARY");
+    }
+  }
+
+  /*
+   * I only want to hit _one_ server so I know the number of requests I'm
+   * sending in the pipeline.
+   */
+  const memcached_instance_st * instance= memcached_server_instance_by_position(original_memc, 0);
+
+  char server_string[1024];
+  int server_string_length;
+  if (instance->type == MEMCACHED_CONNECTION_UNIX_SOCKET)
+  {
+    if (options)
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--SOCKET=\"%s\" %s",
+                                     memcached_server_name(instance), options);
+    }
+    else
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--SOCKET=\"%s\"",
+                                     memcached_server_name(instance));
+    }
+  }
+  else
+  {
+    if (options)
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--server=%s:%d %s",
+                                     memcached_server_name(instance), int(memcached_server_port(instance)),
+                                     options);
+    }
+    else
+    {
+      server_string_length= snprintf(server_string, sizeof(server_string), "--server=%s:%d",
+                                     memcached_server_name(instance), int(memcached_server_port(instance)));
+    }
+  }
+
+  if (server_string_length <= 0)
+  {
+    return NULL;
+  }
+
+  char errror_buffer[1024];
+  if (memcached_failed(libmemcached_check_configuration(server_string, server_string_length, errror_buffer, sizeof(errror_buffer))))
+  {
+    Error << "Failed to parse (" << server_string << ") " << errror_buffer;
+    return NULL;
+  }
+
+  return memcached(server_string, server_string_length);
+}
+
+pthread_mutex_t mutex= PTHREAD_MUTEX_INITIALIZER;
+static bool _running= false;
+
+static void set_running(const bool arg)
+{
+  int error;
+  FATAL_IF_((error= pthread_mutex_lock(&mutex)) != 0, strerror(error));
+
+  _running= arg;
+
+  FATAL_IF_((error= pthread_mutex_unlock(&mutex)) != 0, strerror(error));
+}
+
+static bool running()
+{
+  int error;
+  bool ret;
+  
+  FATAL_IF_((error= pthread_mutex_lock(&mutex)) != 0, strerror(error));
+
+  ret= _running;
+
+  FATAL_IF_((error= pthread_mutex_unlock(&mutex)) != 0, strerror(error));
+
+  return ret;
+}
+
+static void *worker_thread(void *ctx)
+{
+  memcached_pool_st *pool= (memcached_pool_st *)ctx;
+
+  while (running())
+  {
+    memcached_return_t rc;
+    memcached_st *mc= memcached_pool_pop(pool, true, &rc);
+
+    if (mc == NULL)
+    {
+      Error << "failed to fetch a connection from the pool" << memcached_strerror(NULL, rc);
+      dream(1, 0);
+      continue;
+    }
+
+    rc= memcached_set(mc, "test:kv", 7, "value", 5, 600, 0);
+    if (memcached_failed(rc))
+    {
+      Out << "failed memcached_set()";
+    }
+
+    rc= memcached_pool_push(pool, mc);
+    if (memcached_failed(rc))
+    {
+      Error << "failed to release a connection to the pool" << memcached_strerror(NULL, rc);
+    }
+  }
+
+  return NULL;
+}
+
+#define NUM_THREADS 20
+test_return_t regression_bug_962815(memcached_st *memc)
+{
+  pthread_t pid[NUM_THREADS];
+
+  test_false(running());
+
+  memcached_st *master = create_single_instance_memcached(memc, 0);
+  test_true(master);
+
+  memcached_pool_st *pool= memcached_pool_create(master, 5, 10);
+
+  test_true(pool);
+
+  set_running(true);
+
+  for (size_t x=0; x < NUM_THREADS; x++)
+  {
+    test_compare(0, pthread_create(&pid[x], NULL, worker_thread, (void*)pool));
+  }
+
+  {
+    pollfd fds[1];
+    memset(fds, 0, sizeof(pollfd));
+    fds[0].fd= -1; //STDIN_FILENO;
+    fds[0].events= POLLIN;
+    fds[0].revents= 0;
+
+    int active_fd;
+    if ((active_fd= poll(fds, 1, 5000)) == -1)
+    {
+      Error << "poll() failed with:" << strerror(errno);
+    }
+    test_zero(active_fd);
+
+    set_running(false);
+  }
+
+  for (size_t x=0; x < NUM_THREADS; x++)
+  {
+    test_compare(0, pthread_join(pid[x], NULL));
+  }
+
+  memcached_pool_destroy(pool);
+
+  memcached_free(master);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,82 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+
+#include <iostream>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include "tests/print.h"
+
+memcached_return_t server_print_callback(const memcached_st*,
+                                         const memcached_instance_st * server,
+                                         void *context)
+{
+  if (context)
+  {
+    std::cerr << memcached_server_name(server) << ":" << memcached_server_port(server) << std::endl;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+memcached_return_t server_print_version_callback(const memcached_st *,
+                                                 const memcached_instance_st * server,
+                                                 void *)
+{
+  std::cerr << "Server: " << memcached_server_name(server) << ":" << memcached_server_port(server) << " " 
+    << int(memcached_server_major_version(server)) << "."
+    << int(memcached_server_minor_version(server)) << "."
+    << int(memcached_server_micro_version(server))
+    << std::endl;
+
+  return MEMCACHED_SUCCESS;
+}
+
+const char * print_version(memcached_st *memc)
+{
+  memcached_server_fn callbacks[1];
+  callbacks[0]= server_print_version_callback;
+  memcached_server_cursor(memc, callbacks, NULL,  1);
+
+  return "print_version()";
+}
@@ -0,0 +1,446 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+
+#include "libmemcached/server_instance.h"
+
+#include <tests/replication.h>
+#include <tests/debug.h>
+
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+
+test_return_t check_replication_sanity_TEST(memcached_st *memc)
+{
+  test_true(memc);
+  test_compare(uint64_t(1), 
+               memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  /*
+   * Make sure that we store the item on all servers
+   * (master + replicas == number of servers)
+ */
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS), uint64_t(memcached_server_count(memc) - 1));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replication_set_test(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0));
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc, "bubba", 5, "0", 1, 0, 0));
+
+  /*
+  ** We are using the quiet commands to store the replicas, so we need
+  ** to ensure that all of them are processed before we can continue.
+  ** In the test we go directly from storing the object to trying to
+  ** receive the object from all of the different servers, so we
+  ** could end up in a race condition (the memcached server hasn't yet
+  ** processed the quiet command from the replication set when it process
+  ** the request from the other client (created by the clone)). As a
+  ** workaround for that we call memcached_quit to send the quit command
+  ** to the server and wait for the response ;-) If you use the test code
+  ** as an example for your own code, please note that you shouldn't need
+  ** to do this ;-)
+  */
+  memcached_quit(memc);
+
+  /*
+  ** "bubba" should now be stored on all of our servers. We don't have an
+  ** easy to use API to address each individual server, so I'll just iterate
+  ** through a bunch of "master keys" and I should most likely hit all of the
+  ** servers...
+  */
+  for (int x= 'a'; x <= 'z'; ++x)
+  {
+    const char key[2]= { (char)x, 0 };
+    size_t len;
+    uint32_t flags;
+    memcached_return_t rc;
+    char *val= memcached_get_by_key(memc_clone, key, 1, "bubba", 5,
+                                    &len, &flags, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_true(val);
+    free(val);
+  }
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+#include "libmemcached/instance.hpp"
+
+test_return_t replication_get_test(memcached_st *memc)
+{
+
+  /*
+   * Don't do the following in your code. I am abusing the internal details
+   * within the library, and this is not a supported interface.
+   * This is to verify correct behavior in the library
+   */
+  for (uint32_t host= 0; host < memcached_server_count(memc); ++host)
+  {
+    memcached_st *memc_clone= memcached_clone(NULL, memc);
+    memcached_instance_st* instance= (memcached_instance_st*)memcached_server_instance_by_position(memc_clone, host);
+
+    instance->port(0);
+
+    for (int x= 'a'; x <= 'z'; ++x)
+    {
+      const char key[2]= { (char)x, 0 };
+      size_t len;
+      uint32_t flags;
+      memcached_return_t rc;
+      char *val= memcached_get_by_key(memc_clone, key, 1, "bubba", 5,
+                                      &len, &flags, &rc);
+      test_compare(MEMCACHED_SUCCESS, rc);
+      test_true(val);
+      free(val);
+    }
+
+    memcached_free(memc_clone);
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replication_mget_test(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0));
+
+  const char *keys[]= { "bubba", "key1", "key2", "key3" };
+  size_t len[]= { 5, 4, 4, 4 };
+
+  for (size_t x= 0; x< 4; ++x)
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_set(memc, keys[x], len[x], "0", 1, 0, 0));
+  }
+
+  /*
+  ** We are using the quiet commands to store the replicas, so we need
+  ** to ensure that all of them are processed before we can continue.
+  ** In the test we go directly from storing the object to trying to
+  ** receive the object from all of the different servers, so we
+  ** could end up in a race condition (the memcached server hasn't yet
+  ** processed the quiet command from the replication set when it process
+  ** the request from the other client (created by the clone)). As a
+  ** workaround for that we call memcached_quit to send the quit command
+  ** to the server and wait for the response ;-) If you use the test code
+  ** as an example for your own code, please note that you shouldn't need
+  ** to do this ;-)
+  */
+  memcached_quit(memc);
+
+  /*
+   * Don't do the following in your code. I am abusing the internal details
+   * within the library, and this is not a supported interface.
+   * This is to verify correct behavior in the library
+   */
+  memcached_result_st result_obj;
+  for (uint32_t host= 0; host < memcached_server_count(memc_clone); host++)
+  {
+    memcached_st *new_clone= memcached_clone(NULL, memc);
+    const memcached_instance_st * instance= memcached_server_instance_by_position(new_clone, host);
+    ((memcached_server_write_instance_st)instance)->port(0);
+
+    for (int x= 'a'; x <= 'z'; ++x)
+    {
+      char key[2]= { (char)x, 0 };
+
+      test_compare(MEMCACHED_SUCCESS,
+                   memcached_mget_by_key(new_clone, key, 1, keys, len, 4));
+
+      memcached_result_st *results= memcached_result_create(new_clone, &result_obj);
+      test_true(results);
+
+      int hits= 0;
+      memcached_return_t rc;
+      while ((results= memcached_fetch_result(new_clone, &result_obj, &rc)) != NULL)
+      {
+        hits++;
+      }
+      test_compare(4, hits);
+      memcached_result_free(&result_obj);
+    }
+
+    memcached_free(new_clone);
+  }
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replication_randomize_mget_test(memcached_st *memc)
+{
+  memcached_result_st result_obj;
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 3);
+  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ, 1);
+
+  const char *keys[]= { "key1", "key2", "key3", "key4", "key5", "key6", "key7" };
+  size_t len[]= { 4, 4, 4, 4, 4, 4, 4 };
+
+  for (size_t x= 0; x< 7; ++x)
+  {
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, keys[x], len[x], "1", 1, 0, 0));
+  }
+
+  memcached_quit(memc);
+
+  for (size_t x= 0; x< 7; ++x)
+  {
+    const char key[2]= { (char)x, 0 };
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_mget_by_key(memc_clone, key, 1, keys, len, 7));
+
+    memcached_result_st *results= memcached_result_create(memc_clone, &result_obj);
+    test_true(results);
+
+    int hits= 0;
+    memcached_return_t rc;
+    while ((results= memcached_fetch_result(memc_clone, &result_obj, &rc)) != NULL)
+    {
+      ++hits;
+    }
+    test_compare(hits, 7);
+    memcached_result_free(&result_obj);
+  }
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replication_delete_test(memcached_st *memc_just_cloned)
+{
+  memcached_flush(memc_just_cloned, 0);
+  memcached_st *memc_not_replicate= memcached_clone(NULL, memc_just_cloned);
+  memcached_st *memc_replicated= memcached_clone(NULL, memc_just_cloned);
+  const char *keys[]= { "bubba", "key1", "key2", "key3", "key4" };
+
+  test_compare(uint64_t(1), memcached_behavior_get(memc_replicated, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_replicated, MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ, false));
+
+  // Make one copy
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_replicated, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 1UL));
+  test_compare(uint64_t(1), memcached_behavior_get(memc_replicated, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc_not_replicate, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0UL));
+  test_compare(uint64_t(0), memcached_behavior_get(memc_not_replicate, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
+
+  for (size_t x= 0; x < test_array_length(keys); ++x)
+  {
+    memcached_set(memc_replicated,
+                  test_string_make_from_cstr(keys[x]), // Keys
+                  test_string_make_from_cstr(keys[x]), // We use the keys as values
+                  0, 0);
+  }
+
+  memcached_flush_buffers(memc_replicated);
+
+  // Confirm keys with replication read
+  test_compare(TEST_SUCCESS, confirm_keys_exist(memc_replicated, keys, test_array_length(keys), true, true));
+  test_compare(TEST_SUCCESS, confirm_keys_exist(memc_not_replicate, keys, test_array_length(keys), true, true));
+
+  /* Delete the items from all of the servers except 1, we use the non replicated memc so that we know we deleted the keys */
+  for (size_t x= 0; x < test_array_length(keys); ++x)
+  {
+    memcached_return_t del_rc= memcached_delete(memc_replicated,
+                                                test_string_make_from_cstr(keys[x]), // Keys
+                                                0);
+    if (del_rc == MEMCACHED_SUCCESS or del_rc == MEMCACHED_NOTFOUND)
+    { }
+    else 
+    {
+      test_compare(MEMCACHED_SUCCESS, del_rc);
+    }
+  }
+
+  test_compare(TEST_SUCCESS, confirm_keys_dont_exist(memc_replicated, keys, test_array_length(keys)));
+  test_compare(TEST_SUCCESS, confirm_keys_dont_exist(memc_not_replicate, keys, test_array_length(keys)));
+#if 0
+  test_zero(confirm_key_count(memc_not_replicate));
+#endif
+
+  memcached_free(memc_not_replicate);
+  memcached_free(memc_replicated);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t replication_randomize_mget_fail_test(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 3);
+
+  for (int x= int(MEMCACHED_SUCCESS); x < int(MEMCACHED_MAXIMUM_RETURN); ++x)
+  {
+    const char *key= memcached_strerror(NULL, memcached_return_t(x));
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc,
+                               key, strlen(key),
+                               key, strlen(key), 0, 0));
+  }
+
+  memcached_flush_buffers(memc);
+
+  // We need to now cause a failure in one server, never do this in your own
+  // code.
+  close(memc_clone->servers[1].fd);
+  memc_clone->servers[1].port(1);
+  memc_clone->servers[1].address_info_next= NULL;
+
+  for (int x= int(MEMCACHED_SUCCESS); x < int(MEMCACHED_MAXIMUM_RETURN); ++x)
+  {
+    const char *key= memcached_strerror(NULL, memcached_return_t(x));
+    uint32_t flags;
+    size_t value_length;
+    memcached_return_t rc;
+    char *value= memcached_get(memc_clone, key, strlen(key), &value_length, &flags, &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(strlen(key), value_length);
+    test_strcmp(key, value);
+    free(value);
+  }
+  memcached_free(memc_clone);
+  return TEST_SUCCESS;
+}
+
+/* Test that single miss does not cause replica reads to fail */
+test_return_t replication_miss_test(memcached_st *memc)
+{
+  test_skip(true, false);
+
+  memcached_st *memc_repl= memcached_clone(NULL, memc);
+  test_true(memc_repl);
+  memcached_st *memc_single= memcached_clone(NULL, memc);
+  test_true(memc_single);
+
+  const char *value = "my_value";
+  size_t vlen;
+  uint32_t flags;
+
+  /* this test makes sense only with 2 or more servers */
+  test_true(memcached_server_count(memc_repl) > 1);
+
+  /* Consistent hash */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set_distribution(memc_repl, MEMCACHED_DISTRIBUTION_CONSISTENT));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set_distribution(memc_single, MEMCACHED_DISTRIBUTION_CONSISTENT));
+
+  /* The first clone writes to all servers */
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_repl, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_behavior_set(memc_repl, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 
+                                      memcached_server_count(memc_repl)));
+
+  /* Write to servers */
+  {
+    memcached_return_t rc= memcached_set(memc_repl,
+                                         test_literal_param(__func__),
+                                         value, strlen(value), 
+                                         time_t(1200), uint32_t(0));
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+
+  /* Use the second clone to remove the key from primary server.
+    This should remove the key from only one server */
+  {
+    memcached_return_t rc= memcached_delete(memc_single, 
+                                            test_literal_param(__func__),
+                                            0);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+  }
+
+  /* Remove the server where the key was deleted */
+  {
+#if 0
+    memcached_return_t rc;
+    const memcached_server_st *instance= memcached_server_by_key(memc_single,
+                                                                 test_literal_param(__func__),
+                                                                 &rc);
+    test_compare(MEMCACHED_SUCCESS, rc);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_server_remove(instance));
+#endif
+  }
+
+  /* Test that others still have it */
+  {
+    memcached_return_t rc;
+    char *get_value= memcached_get(memc_single,
+                                   test_literal_param(__func__),
+                                   &vlen, &flags, &rc);
+    test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
+    test_true(get_value and strcmp(get_value, value) == 0);
+    free(get_value);
+  }
+
+  /* This read should still return the value as we have it on other servers */
+  {
+    memcached_return_t rc;
+    char *get_value= memcached_get(memc_repl,
+                                   test_literal_param(__func__),
+                                   &vlen, &flags, &rc);
+    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
+    test_true(get_value and strcmp(get_value, value) == 0);
+    free(get_value);
+  }
+
+  memcached_free(memc_repl);
+  memcached_free(memc_single);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,117 @@
+/*  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+/*
+  Test cases
+*/
+
+#include <libmemcached-1.0/memcached.h>
+
+static test_return_t pre_sasl(memcached_st *)
+{
+  SKIP_IF(true);
+#if 0
+  SKIP_IF_(true, "currently we are not testing sasl support");
+#endif
+  SKIP_IF(LIBMEMCACHED_WITH_SASL_SUPPORT == 0);
+
+  return TEST_SUCCESS;
+}
+
+/*
+ * Test that the sasl authentication works. We cannot use the default
+ * pool of servers, because that would require that all servers we want
+ * to test supports SASL authentication, and that they use the default
+ * creds.
+ */
+static test_return_t sasl_auth_test(memcached_st *memc)
+{
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+  if (LIBMEMCACHED_WITH_SASL_SUPPORT)
+  {
+    test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0));
+    test_compare(MEMCACHED_SUCCESS, memcached_delete(memc, "foo", 3, 0));
+    test_compare(MEMCACHED_SUCCESS, memcached_destroy_sasl_auth_data(memc));
+    test_compare(MEMCACHED_SUCCESS, memcached_destroy_sasl_auth_data(memc));
+    test_compare(MEMCACHED_INVALID_ARGUMENTS, memcached_destroy_sasl_auth_data(NULL));
+    memcached_quit(memc);
+
+    test_compare(MEMCACHED_AUTH_FAILURE, 
+                 memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0));
+    test_compare(MEMCACHED_SUCCESS, memcached_destroy_sasl_auth_data(memc));
+
+    memcached_quit(memc);
+    return TEST_SUCCESS;
+  }
+#else
+  (void)memc;
+#endif
+
+  return TEST_SKIPPED;
+}
+
+
+test_st sasl_auth_tests[]= {
+  {"sasl_auth", true, (test_callback_fn*)sasl_auth_test },
+  {0, 0, (test_callback_fn*)0}
+};
+
+collection_st collection[] ={
+  {"sasl_auth", (test_callback_fn*)pre_sasl, 0, sasl_auth_tests },
+#if 0
+  {"sasl", (test_callback_fn*)pre_sasl, 0, tests },
+#endif
+  {0, 0, 0, 0}
+};
+
+#include "tests/libmemcached_world.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+
+  world->set_sasl("memcached", "memcached");
+}
@@ -0,0 +1,105 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/yatl.h>
+
+#include <string>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+
+#include <tests/server_add.h>
+
+static std::string random_hostname()
+{
+  libtest::vchar_t hostname;
+  libtest::vchar::make(hostname, 23);
+  libtest::vchar::append(hostname, ".com");
+
+  return std::string(&hostname[0]);
+}
+
+test_return_t memcached_server_add_null_test(memcached_st* memc)
+{
+  ASSERT_EQ(0, memcached_server_count(memc));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, NULL, 0));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_server_add_empty_test(memcached_st* memc)
+{
+  ASSERT_EQ(0, memcached_server_count(memc));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, "", 0));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_server_many_TEST(memcached_st* memc)
+{
+  ASSERT_EQ(0, memcached_server_count(memc));
+
+  in_port_t base_port= 5555;
+  for (in_port_t x= 0; x < 100; ++x)
+  {
+    std::string hostname(random_hostname());
+    ASSERT_TRUE(hostname.size());
+    test_compare(MEMCACHED_SUCCESS, memcached_server_add(memc, hostname.c_str(), base_port +x));
+  }
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_server_many_weighted_TEST(memcached_st* memc)
+{
+  SKIP_IF(true);
+  ASSERT_EQ(0, memcached_server_count(memc));
+
+  in_port_t base_port= 5555;
+  for (in_port_t x= 0; x < 100; ++x)
+  {
+    std::string hostname(random_hostname());
+    ASSERT_TRUE(hostname.size());
+    test_compare(MEMCACHED_SUCCESS, memcached_server_add_with_weight(memc, hostname.c_str(), base_port +x, random() % 10));
+  }
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,278 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <libtest/test.hpp>
+
+#include <libmemcachedutil-1.0/util.h>
+
+#include "tests/print.h"
+#include "tests/libmemcached-1.0/setup_and_teardowns.h"
+
+#include <sys/stat.h>
+
+using namespace libtest;
+
+memcached_return_t return_value_based_on_buffering(memcached_st *memc)
+{
+  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS))
+  {
+    return MEMCACHED_BUFFERED;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+/**
+  @note This should be testing to see if the server really supports the binary protocol.
+*/
+test_return_t pre_binary(memcached_st *memc)
+{
+  test_true(memcached_server_count(memc) > 0);
+  test_skip(true, libmemcached_util_version_check(memc, 1, 4, 4));
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_buffer(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_unix_socket(memcached_st *memc)
+{
+  struct stat buf;
+
+  memcached_servers_reset(memc);
+  const char *socket_file= libtest::default_socket();
+  test_skip(true, bool(socket_file));
+
+  test_skip(0, stat(socket_file, &buf));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_server_add_unix_socket_with_weight(memc, socket_file, 0));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_nodelay(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 0);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_settimer(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000);
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_murmur(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR));
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_jenkins(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_JENKINS);
+
+  return TEST_SKIPPED;
+}
+
+
+test_return_t pre_md5(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MD5);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_crc(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_CRC);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_hsieh(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_HSIEH));
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_hash_fnv1_64(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_hash_fnv1a_64(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_64));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_hash_fnv1_32(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1_32);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_hash_fnv1a_32(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_32);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_servers_reset_SETUP(memcached_st *memc)
+{
+  memcached_servers_reset(memc);
+  test_compare(0U, memcached_server_count(memc));
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_SETUP(memcached_st *memc)
+{
+  test_compare(TEST_SUCCESS, memcached_servers_reset_SETUP(memc));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT));
+  test_compare(memcached_behavior_get_distribution(memc), MEMCACHED_DISTRIBUTION_CONSISTENT);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED_SETUP(memcached_st *memc)
+{
+  test_compare(TEST_SUCCESS, memcached_servers_reset_SETUP(memc));
+  ASSERT_EQ(0U, memcached_server_count(0));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED));
+  test_compare(memcached_behavior_get_distribution(memc), MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_behavior_ketama(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA, 1));
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA), uint64_t(1));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_behavior_ketama_weighted(memcached_st *memc)
+{
+  test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, true), MEMCACHED_SUCCESS);
+
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED), uint64_t(1));
+
+  test_compare(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5), MEMCACHED_SUCCESS);
+
+  test_compare(memcached_hash_t(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH)), MEMCACHED_HASH_MD5);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_replication(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_binary(memc));
+
+  /*
+   * Make sure that we store the item on all servers
+   * (master + replicas == number of servers)
+ */
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, memcached_server_count(memc) - 1));
+  test_compare(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS), uint64_t(memcached_server_count(memc) - 1));
+
+  return TEST_SUCCESS;
+}
+
+
+test_return_t pre_replication_noblock(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_replication(memc));
+
+  return pre_nonblock(memc);
+}
+
+test_return_t pre_nonblock(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t pre_nonblock_binary(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+
+  // The memcached_version needs to be done on a clone, because the server
+  // will not toggle protocol on an connection.
+  memcached_version(memc_clone);
+
+  memcached_return_t rc= MEMCACHED_FAILURE;
+  if (libmemcached_util_version_check(memc_clone, 1, 4, 4))
+  {
+    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1));
+    test_compare(uint64_t(1), memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+  }
+  else
+  {
+    memcached_free(memc_clone);
+    return TEST_SKIPPED;
+  }
+
+  memcached_free(memc_clone);
+
+  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
+}
@@ -0,0 +1,66 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+memcached_return_t return_value_based_on_buffering(memcached_st*);
+
+test_return_t pre_behavior_ketama(memcached_st*);
+test_return_t pre_behavior_ketama_weighted(memcached_st*);
+test_return_t pre_binary(memcached_st*);
+test_return_t pre_cork(memcached_st*);
+test_return_t pre_cork_and_nonblock(memcached_st*);
+test_return_t pre_crc(memcached_st*);
+test_return_t pre_hash_fnv1_32(memcached_st*);
+test_return_t pre_hash_fnv1_64(memcached_st*);
+test_return_t pre_hash_fnv1a_32(memcached_st*);
+test_return_t pre_hash_fnv1a_64(memcached_st*);
+test_return_t pre_hsieh(memcached_st*);
+test_return_t pre_jenkins(memcached_st*);
+test_return_t pre_md5(memcached_st*);
+test_return_t pre_murmur(memcached_st*);
+test_return_t pre_nodelay(memcached_st*);
+test_return_t pre_nonblock(memcached_st*);
+test_return_t pre_nonblock_binary(memcached_st*);
+test_return_t pre_replication(memcached_st*);
+test_return_t pre_replication_noblock(memcached_st*);
+test_return_t pre_settimer(memcached_st*);
+test_return_t pre_unix_socket(memcached_st*);
+test_return_t pre_buffer(memcached_st*);
+test_return_t memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_SETUP(memcached_st *memc);
+test_return_t memcached_servers_reset_MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED_SETUP(memcached_st *memc);
+test_return_t memcached_servers_reset_SETUP(memcached_st *memc);
@@ -0,0 +1,102 @@
+/*  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 <mem_config.h>
+
+#include <cstdlib>
+#include <climits>
+
+#include <libtest/test.hpp>
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+using namespace libtest;
+
+#include "tests/libmemcached-1.0/stat.h"
+
+static memcached_return_t item_counter(const memcached_instance_st * ,
+                                       const char *key, size_t key_length,
+                                       const char *value, size_t, // value_length,
+                                       void *context)
+{
+  if ((key_length == (sizeof("curr_items") -1)) and (strncmp("curr_items", key, (sizeof("curr_items") -1)) == 0))
+  {
+    uint64_t* counter= (uint64_t*)context;
+    unsigned long number_value= strtoul(value, (char **)NULL, 10);
+    ASSERT_NEQ(number_value, ULONG_MAX);
+    *counter= *counter +number_value;
+  }
+
+  return MEMCACHED_SUCCESS;
+}
+
+test_return_t memcached_stat_TEST(memcached_st *memc)
+{
+  uint64_t counter= 0;
+  test_compare(MEMCACHED_INVALID_ARGUMENTS,
+               memcached_stat_execute(memc, "BAD_ARG_VALUE", item_counter, &counter));
+
+  return TEST_SUCCESS;
+}
+
+#define memcached_dump_TEST2_COUNT 64
+test_return_t memcached_stat_TEST2(memcached_st *memc)
+{
+  test_skip(false, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  /* The dump test relies on there being at least 32 items in memcached */
+  for (uint32_t x= 0; x < memcached_dump_TEST2_COUNT; x++)
+  {
+    char key[1024];
+    int length= snprintf(key, sizeof(key), "%s%u", __func__, x);
+
+    ASSERT_TRUE(length > 0);
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_set(memc, key, length,
+                               NULL, 0, // Zero length values
+                               time_t(0), uint32_t(0)));
+  }
+  memcached_quit(memc);
+
+  uint64_t counter= 0;
+  ASSERT_EQ(MEMCACHED_SUCCESS,
+            memcached_stat_execute(memc, NULL, item_counter, &counter));
+  ASSERT_TRUE(counter);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,40 @@
+/*  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
+
+test_return_t memcached_stat_TEST(memcached_st *);
+test_return_t memcached_stat_TEST2(memcached_st *);
@@ -0,0 +1,192 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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.
+ *
+ */
+
+// We let libmemcached/common.h define config since we are looking at
+// library internals.
+
+#include <mem_config.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include "libmemcached/string.hpp"
+#include "libmemcached/is.h"
+
+#include <libtest/test.hpp>
+
+#include <tests/string.h>
+
+test_return_t string_static_null(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+  memcached_string_st string;
+
+  memcached_string_st *string_ptr= memcached_string_create(memc, &string, 0);
+  test_true(string.options.is_initialized);
+  test_true(string_ptr);
+
+  /* The following two better be the same! */
+  test_false(memcached_is_allocated(string_ptr));
+  test_false(memcached_is_allocated(&string));
+  test_true(&string == string_ptr);
+
+  test_true(string.options.is_initialized);
+  test_true(memcached_is_initialized(&string));
+  memcached_string_free(&string);
+  test_false(memcached_is_initialized(&string));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_null(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  memcached_string_st *string= memcached_string_create(memc, NULL, 0);
+  test_true(string);
+  test_true(memcached_is_allocated(string));
+  test_true(memcached_is_initialized(string));
+  memcached_string_free(string);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_with_size(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+  memcached_string_st *string= memcached_string_create(memc, NULL, 1024);
+  test_true(string);
+  test_true(memcached_is_allocated(string));
+  test_true(memcached_is_initialized(string));
+  memcached_string_free(string);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_with_size_toobig(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+  memcached_string_st *string= memcached_string_create(memc, NULL, SIZE_MAX);
+  test_zero(string);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_append(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  char buffer[BUFSIZ];
+  memcached_string_st *string;
+
+  /* Ring the bell! */
+  memset(buffer, 6, BUFSIZ);
+
+  string= memcached_string_create(memc, NULL, 100);
+  test_true(string);
+  test_true(memcached_is_allocated(string));
+  test_true(memcached_is_initialized(string));
+
+  for (unsigned int x= 0; x < 1024; x++)
+  {
+    memcached_return_t rc;
+    rc= memcached_string_append(string, buffer, BUFSIZ);
+    test_true(rc == MEMCACHED_SUCCESS);
+  }
+  test_true(memcached_is_allocated(string));
+  memcached_string_free(string);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_append_toobig(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  memcached_return_t rc;
+  char buffer[BUFSIZ];
+  memcached_string_st *string;
+
+  /* Ring the bell! */
+  memset(buffer, 6, sizeof(buffer));
+
+  string= memcached_string_create(memc, NULL, 100);
+  test_true(string);
+  test_true(memcached_is_allocated(string));
+  test_true(memcached_is_initialized(string));
+
+  for (unsigned int x= 0; x < 1024; x++)
+  {
+    rc= memcached_string_append(string, buffer, BUFSIZ);
+    test_true(rc == MEMCACHED_SUCCESS);
+  }
+  rc= memcached_string_append(string, buffer, SIZE_MAX);
+  test_true(rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE);
+  test_true(memcached_is_allocated(string));
+  memcached_string_free(string);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_return_t string_alloc_append_multiple(void*)
+{
+  memcached_st *memc= memcached_create(NULL);
+
+  memcached_string_st *error_string= memcached_string_create(memc, NULL, 1024);
+  memcached_string_append(error_string, test_literal_param("Error occured while parsing: "));
+  memcached_string_append(error_string, test_string_make_from_cstr("jog the strlen() method"));
+  memcached_string_append(error_string, test_literal_param(" ("));
+
+  memcached_string_append(error_string, test_string_make_from_cstr(memcached_strerror(NULL, MEMCACHED_SUCCESS)));
+  memcached_string_append(error_string, test_literal_param(")"));
+
+  memcached_string_free(error_string);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,152 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+#include "tests/touch.h"
+
+static test_return_t pre_touch(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_version(memc));
+  test_skip(true, libmemcached_util_version_check(memc, 1, 4, 15));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_memcached_touch(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_touch(memc));
+
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  test_null(memcached_get(memc, 
+                          test_literal_param(__func__),
+                          &len, &flags, &rc));
+  test_zero(len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set(memc,
+                             test_literal_param(__func__),
+                             test_literal_param("touchval"),
+                             2, 0));
+
+  {
+    char *value= memcached_get(memc, 
+                               test_literal_param(__func__),
+                               &len, &flags, &rc);
+    test_compare(8U, test_literal_param_size("touchval"));
+    test_true(value);
+    test_strcmp(value, "touchval");
+    test_compare(MEMCACHED_SUCCESS, rc);
+    free(value);
+  }
+
+  rc= memcached_touch(memc, test_literal_param(__func__), 60 *60);
+  ASSERT_EQ_(MEMCACHED_SUCCESS, rc, "%s", memcached_last_error_message(memc));
+
+  rc= memcached_touch(memc, test_literal_param(__func__), 60 *60 *24 *60);
+  ASSERT_EQ_(MEMCACHED_SUCCESS, rc, "%s", memcached_last_error_message(memc));
+
+  rc= memcached_exist(memc, test_literal_param(__func__));
+  ASSERT_EQ_(MEMCACHED_NOTFOUND, rc, "%s", memcached_last_error_message(memc));
+
+  return TEST_SUCCESS;
+}
+
+test_return_t test_memcached_touch_by_key(memcached_st *memc)
+{
+  test_skip(TEST_SUCCESS, pre_touch(memc));
+
+  size_t len;
+  uint32_t flags;
+  memcached_return rc;
+
+  test_null(memcached_get_by_key(memc, 
+                                 test_literal_param("grouping_key"),
+                                 test_literal_param(__func__),
+                                 &len, &flags, &rc));
+  test_zero(len);
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(MEMCACHED_SUCCESS, 
+               memcached_set_by_key(memc,
+                                    test_literal_param("grouping_key"),
+                                    test_literal_param(__func__),
+                                    test_literal_param("touchval"),
+                                    2, 0));
+
+  {
+    char *value= memcached_get_by_key(memc, 
+                                      test_literal_param("grouping_key"),
+                                      test_literal_param(__func__),
+                                      &len, &flags, &rc);
+    test_compare(8U, test_literal_param_size("touchval"));
+    test_true(value);
+    test_strcmp(value, "touchval");
+    test_compare(MEMCACHED_SUCCESS, rc);
+    free(value);
+  }
+
+  rc= memcached_touch_by_key(memc,
+                             test_literal_param("grouping_key"),
+                             test_literal_param(__func__),
+                             60 *60);
+  ASSERT_EQ_(MEMCACHED_SUCCESS, rc, "%s", memcached_last_error_message(memc));
+
+  rc= memcached_touch_by_key(memc,
+                             test_literal_param("grouping_key"),
+                             test_literal_param(__func__),
+                             60 *60 *24 *60);
+  ASSERT_EQ_(MEMCACHED_SUCCESS, rc, "%s", memcached_last_error_message(memc));
+
+  rc= memcached_exist_by_key(memc, test_literal_param("grouping_key"),test_literal_param(__func__));
+  ASSERT_EQ_(MEMCACHED_NOTFOUND, rc, "%s", memcached_last_error_message(memc));
+
+  return TEST_SUCCESS;
+}
+
+
+
@@ -0,0 +1,146 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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 <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <tests/virtual_buckets.h>
+
+#include <libmemcached-1.0/memcached.h>
+
+#include <cstring>
+
+struct libtest_string_t {
+  const char *c_str;
+  size_t size;
+};
+
+static inline libtest_string_t libtest_string(const char *arg, size_t arg_size)
+{
+  libtest_string_t local= { arg, arg_size };
+  return local;
+}
+
+#define make_libtest_string(X) libtest_string((X), static_cast<size_t>(sizeof(X) - 1))
+
+static libtest_string_t libtest_string_t_null= { 0, 0};
+
+static bool libtest_string_is_null(const libtest_string_t &string)
+{
+  if (string.c_str == 0 and string.size == 0)
+    return true;
+
+  return false;
+}
+
+struct expect_t {
+  libtest_string_t key;
+  uint32_t server_id;
+  uint32_t bucket_id;
+};
+
+expect_t basic_keys[]= {
+  { make_libtest_string("hello"), 0, 0 },
+  { make_libtest_string("doctor"), 0, 0 },
+  { make_libtest_string("name"), 1, 3 },
+  { make_libtest_string("continue"), 1, 3 },
+  { make_libtest_string("yesterday"), 0, 0 },
+  { make_libtest_string("tomorrow"), 1, 1 },
+  { make_libtest_string("another key"), 2, 2 },
+  { libtest_string_t_null, 0, 0 }
+};
+
+test_return_t virtual_back_map(memcached_st *)
+{
+  memcached_return_t rc;
+  memcached_server_st *server_pool;
+  memcached_st *memc;
+
+  memc= memcached_create(NULL);
+  test_true(memc);
+
+  uint32_t server_map[] = { 0, 1, 2, 1 };
+  rc= memcached_bucket_set(memc, server_map, NULL, 4, 2);
+  test_true(rc == MEMCACHED_SUCCESS);
+
+  memcached_server_distribution_t dt;
+  dt= memcached_behavior_get_distribution(memc);
+  test_true(dt == MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET);
+
+  memcached_behavior_set_key_hash(memc, MEMCACHED_HASH_CRC);
+  test_true(rc == MEMCACHED_SUCCESS);
+
+  memcached_hash_t hash_type= memcached_behavior_get_key_hash(memc);
+  test_true(hash_type == MEMCACHED_HASH_CRC);
+
+  server_pool = memcached_servers_parse("localhost:11211, localhost1:11210, localhost2:11211");
+  test_true(server_pool);
+  memcached_server_push(memc, server_pool);
+
+  /* verify that the server list was parsed okay. */
+  test_true(memcached_server_count(memc) == 3);
+  test_true(strcmp(server_pool[0].hostname, "localhost") == 0);
+  test_true(server_pool[0].port == 11211);
+
+  test_true(strcmp(server_pool[1].hostname, "localhost1") == 0);
+  test_true(server_pool[1].port == 11210);
+
+  test_true(strcmp(server_pool[2].hostname, "localhost2") == 0);
+  test_true(server_pool[2].port == 11211);
+
+  dt= memcached_behavior_get_distribution(memc);
+  hash_type= memcached_behavior_get_key_hash(memc);
+  test_true(dt == MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET);
+  test_true(hash_type == MEMCACHED_HASH_CRC);
+
+  /* verify the standard ketama set. */
+  for (expect_t *ptr= basic_keys; not libtest_string_is_null(ptr->key); ptr++)
+  {
+    uint32_t server_idx = memcached_generate_hash(memc, ptr->key.c_str, ptr->key.size); 
+
+    char buffer[1024];
+    snprintf(buffer, sizeof(buffer), "%.*s:%lu Got/Expected %u == %u", (int)ptr->key.size, ptr->key.c_str, (unsigned long)ptr->key.size, server_idx, ptr->server_id);
+    test_compare(server_idx, ptr->server_id);
+  }
+
+  memcached_server_list_free(server_pool);
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
@@ -0,0 +1,82 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+/* The structure we use for the test system */
+struct libmemcached_test_container_st
+{
+private:
+  memcached_st *_parent;
+
+public:
+  libtest::server_startup_st& construct;
+
+  libmemcached_test_container_st(libtest::server_startup_st &construct_arg) :
+    _parent(NULL),
+    construct(construct_arg)
+  { }
+
+  memcached_st* parent()
+  {
+    return _parent;
+  }
+
+  void parent(memcached_st* arg)
+  {
+    assert(_parent != arg);
+    reset();
+    _parent= arg;
+  }
+
+  void reset()
+  {
+    if (_parent)
+    {
+      memcached_free(_parent);
+      _parent= NULL;
+    }
+  }
+
+  ~libmemcached_test_container_st()
+  {
+    reset();
+  }
+};
+
+
@@ -1,196 +1,106 @@
-/* libMemcached Functions Test
- * Copyright (C) 2006-2009 Brian Aker
- * All rights reserved.
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
  *
- * Use and distribution licensed under the BSD license.  See
- * the COPYING file in the parent directory for full text.
+ *  Copyright (C) 2012 Data Differential, http://datadifferential.com/
+ *  Copyright (C) 2006-2009 Brian Aker
+ *  All rights reserved.
  *
- * Description: This is the startup bits for any libmemcached test.
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *      * Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ *      * Redistributions in binary form must reproduce the above
+ *  copyright notice, this list of conditions and the following disclaimer
+ *  in the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ *      * The names of its contributors may not be used to endorse or
+ *  promote products derived from this software without specific prior
+ *  written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-/* The structure we use for the test system */
-typedef struct
-{
-  server_startup_st construct;
-  memcached_st *parent;
-  memcached_st *memc;
-} libmemcached_test_container_st;
-
-/* Prototypes for functions we will pass to test framework */
-libmemcached_test_container_st *world_create(test_return_t *error);
-test_return_t world_test_startup(libmemcached_test_container_st *);
-test_return_t world_flush(libmemcached_test_container_st *container);
-test_return_t world_pre_run(libmemcached_test_container_st *);
 
-test_return_t world_post_run(libmemcached_test_container_st *);
-test_return_t world_on_error(test_return_t, libmemcached_test_container_st *);
-test_return_t world_destroy(libmemcached_test_container_st *);
+#pragma once
 
-static libmemcached_test_container_st global_container;
+#include "tests/libmemcached_test_container.h"
 
-/**
-  @note generic shutdown/startup for libmemcached tests.
-*/
-test_return_t world_container_startup(libmemcached_test_container_st *container);
-test_return_t world_container_shutdown(libmemcached_test_container_st *container);
-
-libmemcached_test_container_st *world_create(test_return_t *error)
+static void *world_create(libtest::server_startup_st& servers, test_return_t& error)
 {
-  memset(&global_container, 0, sizeof(global_container));
-  global_container.construct.count= SERVERS_TO_CREATE;
-  global_container.construct.udp= 0;
-  server_startup(&global_container.construct);
+  SKIP_UNLESS(libtest::has_libmemcached());
 
-  if (! global_container.construct.servers)
+  if (servers.sasl())
   {
-    *error= TEST_FAILURE;
-    server_shutdown(&global_container.construct);
-    return NULL;
+    SKIP_UNLESS(libtest::has_libmemcached_sasl());
+
+    // Assume we are running under valgrind, and bail
+    if (getenv("LOG_COMPILER"))
+    {
+      error= TEST_SKIPPED;
+      return NULL;
+    }
   }
 
-  *error= TEST_SUCCESS;
-
-  return &global_container;
-}
-
-test_return_t world_container_startup(libmemcached_test_container_st *container)
-{
-  memcached_return_t rc;
-  container->parent= memcached_create(NULL);
-  test_true((container->parent != NULL));
-
-  rc= memcached_server_push(container->parent, container->construct.servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_container_shutdown(libmemcached_test_container_st *container)
-{
-  memcached_free(container->parent);
-  container->parent= NULL;
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_test_startup(libmemcached_test_container_st *container)
-{
-  container->memc= memcached_clone(NULL, container->parent);
-  test_true((container->memc != NULL));
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_flush(libmemcached_test_container_st *container)
-{
-  memcached_flush(container->memc, 0);
-  memcached_quit(container->memc);
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_pre_run(libmemcached_test_container_st *container)
-{
-  for (uint32_t loop= 0; loop < memcached_server_list_count(container->memc->servers); loop++)
+  for (uint32_t x= 0; x < servers.servers_to_run(); x++)
   {
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(container->memc, loop);
-
-    test_true(instance->fd == -1);
-    test_true(instance->cursor_active == 0);
+    in_port_t port= libtest::get_free_port();
+
+    if (servers.sasl())
+    {
+      if (server_startup(servers, "memcached-sasl", port, NULL) == false)
+      {
+        error= TEST_SKIPPED;
+        return NULL;
+      }
+    }
+    else
+    {
+      if (server_startup(servers, "memcached", port, NULL) == false)
+      {
+        error= TEST_SKIPPED;
+        return NULL;
+      }
+    }
   }
 
-  return TEST_SUCCESS;
-}
-
-
-test_return_t world_post_run(libmemcached_test_container_st *container)
-{
-  test_true(container->memc);
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_on_error(test_return_t test_state, libmemcached_test_container_st *container)
-{
-  (void)test_state;
-  memcached_free(container->memc);
-  container->memc= NULL;
-
-  return TEST_SUCCESS;
-}
-
-test_return_t world_destroy(libmemcached_test_container_st *container)
-{
-  server_startup_st *construct= &container->construct;
-  memcached_server_st *servers= container->construct.servers;
-  memcached_server_list_free(servers);
-
-  server_shutdown(construct);
+  libmemcached_test_container_st *global_container= new libmemcached_test_container_st(servers);
 
-  return TEST_SUCCESS;
+  return global_container;
 }
 
-typedef test_return_t (*libmemcached_test_callback_fn)(memcached_st *);
-static test_return_t _runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
+static bool world_destroy(void *object)
 {
-  if (func)
-  {
-    return func(container->memc);
-  }
-  else
+  libmemcached_test_container_st *container= (libmemcached_test_container_st *)object;
+#if 0
+#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+  if (LIBMEMCACHED_WITH_SASL_SUPPORT)
   {
-    return TEST_SUCCESS;
+    sasl_done();
   }
-}
-
-static test_return_t _pre_runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
-{
-  if (func)
-  {
-    return func(container->parent);
-  }
-  else
-  {
-    return TEST_SUCCESS;
-  }
-}
-
-static test_return_t _post_runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
-{
-  if (func)
-  {
-    return func(container->parent);
-  }
-  else
-  {
-    return TEST_SUCCESS;
-  }
-}
-
-#ifdef	__cplusplus
-}
+#endif
 #endif
 
-#ifdef	__cplusplus
-
-static world_runner_st defualt_libmemcached_runner= {
-  reinterpret_cast<test_callback_runner_fn>(_pre_runner_default),
-  reinterpret_cast<test_callback_runner_fn>(_runner_default),
-  reinterpret_cast<test_callback_runner_fn>(_post_runner_default)
-};
+  delete container;
 
-#else
+  return TEST_SUCCESS;
+}
 
-static world_runner_st defualt_libmemcached_runner= {
-  (test_callback_runner_fn)_pre_runner_default,
-  (test_callback_runner_fn)_runner_default,
-  (test_callback_runner_fn)_post_runner_default
-};
+typedef test_return_t (*libmemcached_test_callback_fn)(memcached_st *);
 
-#endif
+#include "tests/runner.h"
@@ -0,0 +1,95 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+#include <cassert>
+
+#include "tests/libmemcached_test_container.h"
+
+static void *world_create(libtest::server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  for (uint32_t x= 0; x < servers.servers_to_run(); x++)
+  {
+    const char *argv[]= { "memcached", 0 };
+    if (servers.start_socket_server("memcached", libtest::get_free_port(), argv) == false)
+    {
+#if 0
+      fatal_message("Could not launch memcached");
+#endif
+      error= TEST_SKIPPED;
+      return NULL;
+    }
+  }
+
+
+  libmemcached_test_container_st *global_container= new libmemcached_test_container_st(servers);
+
+  error= TEST_SUCCESS;
+
+  return global_container;
+}
+
+static bool world_destroy(void *object)
+{
+  libmemcached_test_container_st *container= (libmemcached_test_container_st *)object;
+
+#if 0
+#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT
+  if (LIBMEMCACHED_WITH_SASL_SUPPORT)
+  {
+    sasl_done();
+  }
+#endif
+#endif
+
+  delete container;
+
+  return TEST_SUCCESS;
+}
+
+typedef test_return_t (*libmemcached_test_callback_fn)(memcached_st *);
+
+#include "tests/runner.h"
@@ -1,6444 +0,0 @@
-/* libMemcached Functions Test
- * 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.
- */
-
-/*
-  Sample test application.
-*/
-
-#include "config.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-
-#include "libmemcached/common.h"
-
-#include "server.h"
-#include "clients/generator.h"
-#include "clients/execute.h"
-
-#define SMALL_STRING_LEN 1024
-
-#include "test.h"
-
-
-#ifdef HAVE_LIBMEMCACHEDUTIL
-#include <pthread.h>
-#include "libmemcached/memcached_util.h"
-#endif
-
-#include "hash_results.h"
-
-#define GLOBAL_COUNT 10000
-#define GLOBAL2_COUNT 100
-#define SERVERS_TO_CREATE 5
-static uint32_t global_count;
-
-static pairs_st *global_pairs;
-static const char *global_keys[GLOBAL_COUNT];
-static size_t global_keys_length[GLOBAL_COUNT];
-
-// Prototype
-static test_return_t pre_binary(memcached_st *memc);
-
-
-static test_return_t init_test(memcached_st *not_used __attribute__((unused)))
-{
-  memcached_st memc;
-
-  (void)memcached_create(&memc);
-  memcached_free(&memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t server_list_null_test(memcached_st *ptr __attribute__((unused)))
-{
-  memcached_server_st *server_list;
-  memcached_return_t rc;
-
-  server_list= memcached_server_list_append_with_weight(NULL, NULL, 0, 0, NULL);
-  test_true(server_list == NULL);
-
-  server_list= memcached_server_list_append_with_weight(NULL, "localhost", 0, 0, NULL);
-  test_true(server_list == NULL);
-
-  server_list= memcached_server_list_append_with_weight(NULL, NULL, 0, 0, &rc);
-  test_true(server_list == NULL);
-
-  return TEST_SUCCESS;
-}
-
-#define TEST_PORT_COUNT 7
-in_port_t test_ports[TEST_PORT_COUNT];
-
-static memcached_return_t  server_display_function(const memcached_st *ptr __attribute__((unused)),
-                                                   const memcached_server_st *server,
-                                                   void *context)
-{
-  /* Do Nothing */
-  size_t bigger= *((size_t *)(context));
-  assert(bigger <= memcached_server_port(server));
-  *((size_t *)(context))= memcached_server_port(server);
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t server_sort_test(memcached_st *ptr __attribute__((unused)))
-{
-  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
-
-  memcached_return_t rc;
-  memcached_server_fn callbacks[1];
-  memcached_st *local_memc;
-
-  local_memc= memcached_create(NULL);
-  test_true(local_memc);
-  memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
-
-  for (size_t x= 0; x < TEST_PORT_COUNT; x++)
-  {
-    test_ports[x]= (in_port_t)random() % 64000;
-    rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
-    test_true(memcached_server_count(local_memc) == x + 1);
-#if 0 // Rewrite
-    test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
-#endif
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  callbacks[0]= server_display_function;
-  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
-
-
-  memcached_free(local_memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t server_sort2_test(memcached_st *ptr __attribute__((unused)))
-{
-  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
-  memcached_return_t rc;
-  memcached_server_fn callbacks[1];
-  memcached_st *local_memc;
-  memcached_server_instance_st instance;
-
-  local_memc= memcached_create(NULL);
-  test_true(local_memc);
-  rc= memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43043, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  instance= memcached_server_instance_by_position(local_memc, 0);
-  test_true(memcached_server_port(instance) == 43043);
-
-  rc= memcached_server_add_with_weight(local_memc, "MEMCACHED_BEHAVIOR_SORT_HOSTS", 43042, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  instance= memcached_server_instance_by_position(local_memc, 0);
-  test_true(memcached_server_port(instance) == 43042);
-
-  instance= memcached_server_instance_by_position(local_memc, 1);
-  test_true(memcached_server_port(instance) == 43043);
-
-  callbacks[0]= server_display_function;
-  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
-
-
-  memcached_free(local_memc);
-
-  return TEST_SUCCESS;
-}
-
-static memcached_return_t server_print_callback(const memcached_st *ptr __attribute__((unused)),
-                                                const memcached_server_st *server,
-                                                void *context __attribute__((unused)))
-{
-  (void)server; // Just in case we aren't printing.
-
-#if 0
-  fprintf(stderr, "%s(%d)", memcached_server_name(server), memcached_server_port(server));
-#endif
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t memcached_server_remove_test(memcached_st *ptr __attribute__((unused)))
-{
-  memcached_return_t rc;
-  memcached_st local_memc;
-  memcached_st *memc;
-  memcached_server_st *servers;
-  memcached_server_fn callbacks[1];
-
-  const char *server_string= "localhost:4444, localhost:4445, localhost:4446, localhost:4447, localhost, memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
-
-  memc= memcached_create(&local_memc);
-
-  servers= memcached_servers_parse(server_string);
-
-  rc= memcached_server_push(memc, servers);
-  memcached_server_list_free(servers);
-
-  callbacks[0]= server_print_callback;
-  memcached_server_cursor(memc, callbacks, NULL,  1);
-
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-static memcached_return_t server_display_unsort_function(const memcached_st *ptr __attribute__((unused)),
-                                                         const memcached_server_st *server,
-                                                         void *context)
-{
-  /* Do Nothing */
-  uint32_t x= *((uint32_t *)(context));
-
-  assert(test_ports[x] == server->port);
-  *((uint32_t *)(context))= ++x;
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t server_unsort_test(memcached_st *ptr __attribute__((unused)))
-{
-  size_t counter= 0; /* Prime the value for the test_true in server_display_function */
-  size_t bigger= 0; /* Prime the value for the test_true in server_display_function */
-  memcached_return_t rc;
-  memcached_server_fn callbacks[1];
-  memcached_st *local_memc;
-
-  local_memc= memcached_create(NULL);
-  test_true(local_memc);
-
-  for (size_t x= 0; x < TEST_PORT_COUNT; x++)
-  {
-    test_ports[x]= (in_port_t)(random() % 64000);
-    rc= memcached_server_add_with_weight(local_memc, "localhost", test_ports[x], 0);
-    test_true(memcached_server_count(local_memc) == x+1);
-#if 0 // Rewrite
-    test_true(memcached_server_list_count(memcached_server_list(local_memc)) == x+1);
-#endif
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  callbacks[0]= server_display_unsort_function;
-  memcached_server_cursor(local_memc, callbacks, (void *)&counter,  1);
-
-  /* Now we sort old data! */
-  memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SORT_HOSTS, 1);
-  callbacks[0]= server_display_function;
-  memcached_server_cursor(local_memc, callbacks, (void *)&bigger,  1);
-
-
-  memcached_free(local_memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t allocation_test(memcached_st *not_used __attribute__((unused)))
-{
-  memcached_st *memc;
-  memc= memcached_create(NULL);
-  test_true(memc);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t clone_test(memcached_st *memc)
-{
-  /* All null? */
-  {
-    memcached_st *memc_clone;
-    memc_clone= memcached_clone(NULL, NULL);
-    test_true(memc_clone);
-    memcached_free(memc_clone);
-  }
-
-  /* Can we init from null? */
-  {
-    memcached_st *memc_clone;
-    memc_clone= memcached_clone(NULL, memc);
-    test_true(memc_clone);
-
-    { // Test allocators
-      test_true(memc_clone->allocators.free == memc->allocators.free);
-      test_true(memc_clone->allocators.malloc == memc->allocators.malloc);
-      test_true(memc_clone->allocators.realloc == memc->allocators.realloc);
-      test_true(memc_clone->allocators.calloc == memc->allocators.calloc);
-    }
-
-    test_true(memc_clone->connect_timeout == memc->connect_timeout);
-    test_true(memc_clone->delete_trigger == memc->delete_trigger);
-    test_true(memc_clone->distribution == memc->distribution);
-    { // Test all of the flags
-      test_true(memc_clone->flags.no_block == memc->flags.no_block);
-      test_true(memc_clone->flags.tcp_nodelay == memc->flags.tcp_nodelay);
-      test_true(memc_clone->flags.reuse_memory == memc->flags.reuse_memory);
-      test_true(memc_clone->flags.use_cache_lookups == memc->flags.use_cache_lookups);
-      test_true(memc_clone->flags.support_cas == memc->flags.support_cas);
-      test_true(memc_clone->flags.buffer_requests == memc->flags.buffer_requests);
-      test_true(memc_clone->flags.use_sort_hosts == memc->flags.use_sort_hosts);
-      test_true(memc_clone->flags.verify_key == memc->flags.verify_key);
-      test_true(memc_clone->flags.ketama_weighted == memc->flags.ketama_weighted);
-      test_true(memc_clone->flags.binary_protocol == memc->flags.binary_protocol);
-      test_true(memc_clone->flags.hash_with_prefix_key == memc->flags.hash_with_prefix_key);
-      test_true(memc_clone->flags.no_reply == memc->flags.no_reply);
-      test_true(memc_clone->flags.use_udp == memc->flags.use_udp);
-      test_true(memc_clone->flags.auto_eject_hosts == memc->flags.auto_eject_hosts);
-      test_true(memc_clone->flags.randomize_replica_read == memc->flags.randomize_replica_read);
-    }
-    test_true(memc_clone->get_key_failure == memc->get_key_failure);
-    test_true(hashkit_compare(&memc_clone->hashkit, &memc->hashkit));
-    test_true(hashkit_compare(&memc_clone->distribution_hashkit, &memc->distribution_hashkit));
-    test_true(memc_clone->io_bytes_watermark == memc->io_bytes_watermark);
-    test_true(memc_clone->io_msg_watermark == memc->io_msg_watermark);
-    test_true(memc_clone->io_key_prefetch == memc->io_key_prefetch);
-    test_true(memc_clone->on_cleanup == memc->on_cleanup);
-    test_true(memc_clone->on_clone == memc->on_clone);
-    test_true(memc_clone->poll_timeout == memc->poll_timeout);
-    test_true(memc_clone->rcv_timeout == memc->rcv_timeout);
-    test_true(memc_clone->recv_size == memc->recv_size);
-    test_true(memc_clone->retry_timeout == memc->retry_timeout);
-    test_true(memc_clone->send_size == memc->send_size);
-    test_true(memc_clone->server_failure_limit == memc->server_failure_limit);
-    test_true(memc_clone->snd_timeout == memc->snd_timeout);
-    test_true(memc_clone->user_data == memc->user_data);
-
-    memcached_free(memc_clone);
-  }
-
-  /* Can we init from struct? */
-  {
-    memcached_st declared_clone;
-    memcached_st *memc_clone;
-    memset(&declared_clone, 0 , sizeof(memcached_st));
-    memc_clone= memcached_clone(&declared_clone, NULL);
-    test_true(memc_clone);
-    memcached_free(memc_clone);
-  }
-
-  /* Can we init from struct? */
-  {
-    memcached_st declared_clone;
-    memcached_st *memc_clone;
-    memset(&declared_clone, 0 , sizeof(memcached_st));
-    memc_clone= memcached_clone(&declared_clone, memc);
-    test_true(memc_clone);
-    memcached_free(memc_clone);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t userdata_test(memcached_st *memc)
-{
-  void* foo= NULL;
-  test_true(memcached_set_user_data(memc, foo) == NULL);
-  test_true(memcached_get_user_data(memc) == foo);
-  test_true(memcached_set_user_data(memc, NULL) == foo);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t connection_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  rc= memcached_server_add_with_weight(memc, "localhost", 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t error_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint32_t values[] = { 851992627U, 2337886783U, 3196981036U, 4001849190U,
-                        982370485U, 1263635348U, 4242906218U, 3829656100U,
-                        1891735253U, 334139633U, 2257084983U, 3088286104U,
-                        13199785U, 2542027183U, 1097051614U, 199566778U,
-                        2748246961U, 2465192557U, 1664094137U, 2405439045U,
-                        1842224848U, 692413798U, 3479807801U, 919913813U,
-                        4269430871U, 610793021U, 527273862U, 1437122909U,
-                        2300930706U, 2943759320U, 674306647U, 2400528935U,
-                        54481931U, 4186304426U, 1741088401U, 2979625118U,
-                        4159057246U, 3425930182U, 2593724503U,  1868899624U,
-                        1769812374U, 2302537950U, 1110330676U };
-
-  // You have updated the memcache_error messages but not updated docs/tests.
-  test_true(MEMCACHED_MAXIMUM_RETURN == 43);
-  for (rc= MEMCACHED_SUCCESS; rc < MEMCACHED_MAXIMUM_RETURN; rc++)
-  {
-    uint32_t hash_val;
-    const char *msg=  memcached_strerror(memc, rc);
-    hash_val= memcached_generate_hash_value(msg, strlen(msg),
-                                            MEMCACHED_HASH_JENKINS);
-    if (values[rc] != hash_val)
-    {
-      fprintf(stderr, "\n\nYou have updated memcached_return_t without updating the error_test\n");
-      fprintf(stderr, "%u, %s, (%u)\n\n", (uint32_t)rc, memcached_strerror(memc, rc), hash_val);
-    }
-    test_true(values[rc] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t set_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t append_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "fig";
-  const char *in_value= "we";
-  char *out_value= NULL;
-  size_t value_length;
-  uint32_t flags;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    in_value, strlen(in_value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_append(memc, key, strlen(key),
-                       " the", strlen(" the"),
-                       (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_append(memc, key, strlen(key),
-                       " people", strlen(" people"),
-                       (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  out_value= memcached_get(memc, key, strlen(key),
-                       &value_length, &flags, &rc);
-  test_true(!memcmp(out_value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
-  free(out_value);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t append_binary_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "numbers";
-  uint32_t store_list[] = { 23, 56, 499, 98, 32847, 0 };
-  uint32_t *value;
-  size_t value_length;
-  uint32_t flags;
-  uint32_t x;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_set(memc,
-                    key, strlen(key),
-                    NULL, 0,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  for (x= 0; store_list[x] ; x++)
-  {
-    rc= memcached_append(memc,
-                         key, strlen(key),
-                         (char *)&store_list[x], sizeof(uint32_t),
-                         (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  value= (uint32_t *)memcached_get(memc, key, strlen(key),
-                       &value_length, &flags, &rc);
-  test_true((value_length == (sizeof(uint32_t) * x)));
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  for (uint32_t counter= x, *ptr= value; counter; counter--)
-  {
-    test_true(*ptr == store_list[x - counter]);
-    ptr++;
-  }
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t cas2_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  const char *value= "we the people";
-  size_t value_length= strlen("we the people");
-  unsigned int x;
-  memcached_result_st results_obj;
-  memcached_result_st *results;
-  unsigned int set= 1;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, set);
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-
-  results= memcached_result_create(memc, &results_obj);
-
-  results= memcached_fetch_result(memc, &results_obj, &rc);
-  test_true(results);
-  test_true(results->item_cas);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memcached_result_cas(results));
-
-  test_true(!memcmp(value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  memcached_result_free(&results_obj);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t cas_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "fun";
-  size_t key_length= strlen(key);
-  const char *value= "we the people";
-  const char* keys[2] = { key, NULL };
-  size_t keylengths[2] = { strlen(key), 0 };
-  size_t value_length= strlen(value);
-  const char *value2= "change the value";
-  size_t value2_length= strlen(value2);
-
-  memcached_result_st results_obj;
-  memcached_result_st *results;
-  unsigned int set= 1;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, set);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_mget(memc, keys, keylengths, 1);
-
-  results= memcached_result_create(memc, &results_obj);
-
-  results= memcached_fetch_result(memc, &results_obj, &rc);
-  test_true(results);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memcached_result_cas(results));
-  test_true(!memcmp(value, memcached_result_value(results), value_length));
-  test_true(strlen(memcached_result_value(results)) == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
-  uint64_t cas = memcached_result_cas(results);
-
-#if 0
-  results= memcached_fetch_result(memc, &results_obj, &rc);
-  test_true(rc == MEMCACHED_END);
-  test_true(results == NULL);
-#endif
-
-  rc= memcached_cas(memc, key, key_length, value2, value2_length, 0, 0, cas);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /*
-   * The item will have a new cas value, so try to set it again with the old
-   * value. This should fail!
-   */
-  rc= memcached_cas(memc, key, key_length, value2, value2_length, 0, 0, cas);
-  test_true(rc == MEMCACHED_DATA_EXISTS);
-
-  memcached_result_free(&results_obj);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t prepend_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "fig";
-  const char *value= "people";
-  char *out_value= NULL;
-  size_t value_length;
-  uint32_t flags;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_prepend(memc, key, strlen(key),
-                       "the ", strlen("the "),
-                       (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_prepend(memc, key, strlen(key),
-                       "we ", strlen("we "),
-                       (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  out_value= memcached_get(memc, key, strlen(key),
-                       &value_length, &flags, &rc);
-  test_true(!memcmp(out_value, "we the people", strlen("we the people")));
-  test_true(strlen("we the people") == value_length);
-  test_true(rc == MEMCACHED_SUCCESS);
-  free(out_value);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Set the value, then quit to make sure it is flushed.
-  Come back in and test that add fails.
-*/
-static test_return_t add_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-  unsigned long long setting_value;
-
-  setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  memcached_quit(memc);
-  rc= memcached_add(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-
-  /* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */
-  if (setting_value)
-  {
-    test_true(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_STORED);
-  }
-  else
-  {
-    test_true(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_DATA_EXISTS);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/*
-** There was a problem of leaking filedescriptors in the initial release
-** of MacOSX 10.5. This test case triggers the problem. On some Solaris
-** systems it seems that the kernel is slow on reclaiming the resources
-** because the connects starts to time out (the test doesn't do much
-** anyway, so just loop 10 iterations)
-*/
-static test_return_t add_wrapper(memcached_st *memc)
-{
-  unsigned int max= 10000;
-#ifdef __sun
-  max= 10;
-#endif
-#ifdef __APPLE__
-  max= 10;
-#endif
-
-  for (uint32_t x= 0; x < max; x++)
-    add_test(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t replace_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-  const char *original= "first we insert some data";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    original, strlen(original),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_replace(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t delete_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_delete(memc, key, strlen(key), (time_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t flush_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static memcached_return_t  server_function(const memcached_st *ptr __attribute__((unused)),
-                                           const memcached_server_st *server __attribute__((unused)),
-                                           void *context __attribute__((unused)))
-{
-  /* Do Nothing */
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t memcached_server_cursor_test(memcached_st *memc)
-{
-  char context[8];
-  strcpy(context, "foo bad");
-  memcached_server_fn callbacks[1];
-
-  callbacks[0]= server_function;
-  memcached_server_cursor(memc, callbacks, context,  1);
-  return TEST_SUCCESS;
-}
-
-static test_return_t bad_key_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo bad";
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  memcached_st *memc_clone;
-  unsigned int set= 1;
-  size_t max_keylen= 0xffff;
-
-  // Just skip if we are in binary mode.
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL))
-    return TEST_SKIPPED;
-
-  memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone);
-
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /* All keys are valid in the binary protocol (except for length) */
-  if (memcached_behavior_get(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 0)
-  {
-    string= memcached_get(memc_clone, key, strlen(key),
-                          &string_length, &flags, &rc);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-    test_true(string_length ==  0);
-    test_true(!string);
-
-    set= 0;
-    rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-    test_true(rc == MEMCACHED_SUCCESS);
-    string= memcached_get(memc_clone, key, strlen(key),
-                          &string_length, &flags, &rc);
-    test_true(rc == MEMCACHED_NOTFOUND);
-    test_true(string_length ==  0);
-    test_true(!string);
-
-    /* Test multi key for bad keys */
-    const char *keys[] = { "GoodKey", "Bad Key", "NotMine" };
-    size_t key_lengths[] = { 7, 7, 7 };
-    set= 1;
-    rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    rc= memcached_mget(memc_clone, keys, key_lengths, 3);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-
-    rc= memcached_mget_by_key(memc_clone, "foo daddy", 9, keys, key_lengths, 1);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-
-    max_keylen= 250;
-
-    /* The following test should be moved to the end of this function when the
-       memcached server is updated to allow max size length of the keys in the
-       binary protocol
-    */
-    rc= memcached_callback_set(memc_clone, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    char *longkey= malloc(max_keylen + 1);
-    if (longkey != NULL)
-    {
-      memset(longkey, 'a', max_keylen + 1);
-      string= memcached_get(memc_clone, longkey, max_keylen,
-                            &string_length, &flags, &rc);
-      test_true(rc == MEMCACHED_NOTFOUND);
-      test_true(string_length ==  0);
-      test_true(!string);
-
-      string= memcached_get(memc_clone, longkey, max_keylen + 1,
-                            &string_length, &flags, &rc);
-      test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-      test_true(string_length ==  0);
-      test_true(!string);
-
-      free(longkey);
-    }
-  }
-
-  /* Make sure zero length keys are marked as bad */
-  set= 1;
-  rc= memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_VERIFY_KEY, set);
-  test_true(rc == MEMCACHED_SUCCESS);
-  string= memcached_get(memc_clone, key, 0,
-                        &string_length, &flags, &rc);
-  test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-  test_true(string_length ==  0);
-  test_true(!string);
-
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-#define READ_THROUGH_VALUE "set for me"
-static memcached_return_t read_through_trigger(memcached_st *memc __attribute__((unused)),
-                                               char *key __attribute__((unused)),
-                                               size_t key_length __attribute__((unused)),
-                                               memcached_result_st *result)
-{
-
-  return memcached_result_set_value(result, READ_THROUGH_VALUE, strlen(READ_THROUGH_VALUE));
-}
-
-static test_return_t read_through(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  memcached_trigger_key_fn cb= (memcached_trigger_key_fn)read_through_trigger;
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_NOTFOUND);
-  test_false(string_length);
-  test_false(string);
-
-  rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_GET_FAILURE,
-                             *(void **)&cb);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length ==  strlen(READ_THROUGH_VALUE));
-  test_strcmp(READ_THROUGH_VALUE, string);
-  free(string);
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length ==  strlen(READ_THROUGH_VALUE));
-  test_true(!strcmp(READ_THROUGH_VALUE, string));
-  free(string);
-
-  return TEST_SUCCESS;
-}
-
-static memcached_return_t  delete_trigger(memcached_st *ptr __attribute__((unused)),
-                                          const char *key,
-                                          size_t key_length __attribute__((unused)))
-{
-  assert(key);
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t delete_through(memcached_st *memc)
-{
-  memcached_trigger_delete_key_fn callback;
-  memcached_return_t rc;
-
-  callback= (memcached_trigger_delete_key_fn)delete_trigger;
-
-  rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_DELETE_TRIGGER, *(void**)&callback);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-
-  rc= memcached_delete(memc, key, strlen(key), (time_t)0);
-  test_true(rc == MEMCACHED_BUFFERED || rc == MEMCACHED_NOTFOUND);
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_NOTFOUND);
-  test_false(string_length);
-  test_false(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_test2(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "when we sanitize";
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(string);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string_length == strlen(value));
-  test_true(!memcmp(string, value, string_length));
-
-  free(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t set_test2(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  const char *value= "train in the brain";
-  size_t value_length= strlen(value);
-  unsigned int x;
-
-  for (x= 0; x < 10; x++)
-  {
-    rc= memcached_set(memc, key, strlen(key),
-                      value, value_length,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t set_test3(memcached_st *memc)
-{
-  memcached_return_t rc;
-  char *value;
-  size_t value_length= 8191;
-  unsigned int x;
-
-  value = (char*)malloc(value_length);
-  test_true(value);
-
-  for (x= 0; x < value_length; x++)
-    value[x] = (char) (x % 127);
-
-  /* The dump test relies on there being at least 32 items in memcached */
-  for (x= 0; x < 32; x++)
-  {
-    char key[16];
-
-    sprintf(key, "foo%u", x);
-
-    rc= memcached_set(memc, key, strlen(key),
-                      value, value_length,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_test3(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  char *value;
-  size_t value_length= 8191;
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  uint32_t x;
-
-  value = (char*)malloc(value_length);
-  test_true(value);
-
-  for (x= 0; x < value_length; x++)
-    value[x] = (char) (x % 127);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, value_length,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  string= memcached_get(memc, key, strlen(key),
-                        &string_length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(string);
-  test_true(string_length == value_length);
-  test_true(!memcmp(string, value, string_length));
-
-  free(string);
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_test4(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  char *value;
-  size_t value_length= 8191;
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  uint32_t x;
-
-  value = (char*)malloc(value_length);
-  test_true(value);
-
-  for (x= 0; x < value_length; x++)
-    value[x] = (char) (x % 127);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, value_length,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  for (x= 0; x < 10; x++)
-  {
-    string= memcached_get(memc, key, strlen(key),
-                          &string_length, &flags, &rc);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(string);
-    test_true(string_length == value_length);
-    test_true(!memcmp(string, value, string_length));
-    free(string);
-  }
-
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-/*
- * This test verifies that memcached_read_one_response doesn't try to
- * dereference a NIL-pointer if you issue a multi-get and don't read out all
- * responses before you execute a storage command.
- */
-static test_return_t get_test5(memcached_st *memc)
-{
-  /*
-  ** Request the same key twice, to ensure that we hash to the same server
-  ** (so that we have multiple response values queued up) ;-)
-  */
-  const char *keys[]= { "key", "key" };
-  size_t lengths[]= { 3, 3 };
-  uint32_t flags;
-  size_t rlen;
-
-  memcached_return_t rc= memcached_set(memc, keys[0], lengths[0],
-                                     keys[0], lengths[0], 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  rc= memcached_mget(memc, keys, lengths, 2);
-
-  memcached_result_st results_obj;
-  memcached_result_st *results;
-  results=memcached_result_create(memc, &results_obj);
-  test_true(results);
-  results=memcached_fetch_result(memc, &results_obj, &rc);
-  test_true(results);
-  memcached_result_free(&results_obj);
-
-  /* Don't read out the second result, but issue a set instead.. */
-  rc= memcached_set(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  char *val= memcached_get_by_key(memc, keys[0], lengths[0], "yek", 3,
-                                  &rlen, &flags, &rc);
-  test_true(val == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
-  val= memcached_get(memc, keys[0], lengths[0], &rlen, &flags, &rc);
-  test_true(val != NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-  free(val);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_end(memcached_st *memc)
-{
-  const char *keys[]= { "foo", "foo2" };
-  size_t lengths[]= { 3, 4 };
-  const char *values[]= { "fjord", "41" };
-
-  memcached_return_t rc;
-
-  // Set foo and foo2
-  for (int i= 0; i < 2; i++)
-  {
-    rc= memcached_set(memc, keys[i], lengths[i], values[i], strlen(values[i]),
-		      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-
-  // retrieve both via mget
-  rc= memcached_mget(memc, keys, lengths, 2);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  char key[MEMCACHED_MAX_KEY];
-  size_t key_length;
-
-  // this should get both
-  for (int i = 0; i < 2; i++)
-  {
-    string= memcached_fetch(memc, key, &key_length, &string_length,
-                            &flags, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    int val = 0;
-    if (key_length == 4)
-      val= 1;
-    test_true(string_length == strlen(values[val]));
-    test_true(strncmp(values[val], string, string_length) == 0);
-    free(string);
-  }
-
-  // this should indicate end
-  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
-  test_true(rc == MEMCACHED_END);
-
-  // now get just one
-  rc= memcached_mget(memc, keys, lengths, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
-  test_true(key_length == lengths[0]);
-  test_true(strncmp(keys[0], key, key_length) == 0);
-  test_true(string_length == strlen(values[0]));
-  test_true(strncmp(values[0], string, string_length) == 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  free(string);
-
-  // this should indicate end
-  string= memcached_fetch(memc, key, &key_length, &string_length, &flags, &rc);
-  test_true(rc == MEMCACHED_END);
-
-  return TEST_SUCCESS;
-}
-
-/* Do not copy the style of this code, I just access hosts to testthis function */
-static test_return_t stats_servername_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_stat_st memc_stat;
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  if (memcached_get_sasl_callbacks(memc) != NULL)
-    return TEST_SKIPPED;
-#endif
-  rc= memcached_stat_servername(&memc_stat, NULL,
-                                memcached_server_name(instance),
-                                memcached_server_port(instance));
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t increment_test(memcached_st *memc)
-{
-  uint64_t new_number;
-  memcached_return_t rc;
-  const char *key= "number";
-  const char *value= "0";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_increment(memc, key, strlen(key),
-                          1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 1);
-
-  rc= memcached_increment(memc, key, strlen(key),
-                          1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 2);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t increment_with_initial_test(memcached_st *memc)
-{
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
-  {
-    uint64_t new_number;
-    memcached_return_t rc;
-    const char *key= "number";
-    uint64_t initial= 0;
-
-    rc= memcached_increment_with_initial(memc, key, strlen(key),
-                                         1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == initial);
-
-    rc= memcached_increment_with_initial(memc, key, strlen(key),
-                                         1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == (initial + 1));
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t decrement_test(memcached_st *memc)
-{
-  uint64_t new_number;
-  memcached_return_t rc;
-  const char *key= "number";
-  const char *value= "3";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_decrement(memc, key, strlen(key),
-                          1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 2);
-
-  rc= memcached_decrement(memc, key, strlen(key),
-                          1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 1);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t decrement_with_initial_test(memcached_st *memc)
-{
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
-  {
-    uint64_t new_number;
-    memcached_return_t rc;
-    const char *key= "number";
-    uint64_t initial= 3;
-
-    rc= memcached_decrement_with_initial(memc, key, strlen(key),
-                                         1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == initial);
-
-    rc= memcached_decrement_with_initial(memc, key, strlen(key),
-                                         1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == (initial - 1));
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t increment_by_key_test(memcached_st *memc)
-{
-  uint64_t new_number;
-  memcached_return_t rc;
-  const char *master_key= "foo";
-  const char *key= "number";
-  const char *value= "0";
-
-  rc= memcached_set_by_key(memc, master_key, strlen(master_key),
-                           key, strlen(key),
-                           value, strlen(value),
-                           (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_increment_by_key(memc, master_key, strlen(master_key), key, strlen(key),
-                                 1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 1);
-
-  rc= memcached_increment_by_key(memc, master_key, strlen(master_key), key, strlen(key),
-                                 1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 2);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t increment_with_initial_by_key_test(memcached_st *memc)
-{
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
-  {
-    uint64_t new_number;
-    memcached_return_t rc;
-    const char *master_key= "foo";
-    const char *key= "number";
-    uint64_t initial= 0;
-
-    rc= memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == initial);
-
-    rc= memcached_increment_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == (initial + 1));
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t decrement_by_key_test(memcached_st *memc)
-{
-  uint64_t new_number;
-  memcached_return_t rc;
-  const char *master_key= "foo";
-  const char *key= "number";
-  const char *value= "3";
-
-  rc= memcached_set_by_key(memc, master_key, strlen(master_key),
-                           key, strlen(key),
-                           value, strlen(value),
-                           (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_decrement_by_key(memc, master_key, strlen(master_key),
-                                 key, strlen(key),
-                                 1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 2);
-
-  rc= memcached_decrement_by_key(memc, master_key, strlen(master_key),
-                                 key, strlen(key),
-                                 1, &new_number);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(new_number == 1);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t decrement_with_initial_by_key_test(memcached_st *memc)
-{
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
-  {
-    uint64_t new_number;
-    memcached_return_t rc;
-    const char *master_key= "foo";
-    const char *key= "number";
-    uint64_t initial= 3;
-
-    rc= memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == initial);
-
-    rc= memcached_decrement_with_initial_by_key(memc, master_key, strlen(master_key),
-                                                key, strlen(key),
-                                                1, initial, 0, &new_number);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(new_number == (initial - 1));
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t quit_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "fudge";
-  const char *value= "sanford and sun";
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)10, (uint32_t)3);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  memcached_quit(memc);
-
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)50, (uint32_t)9);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_result_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-
-  memcached_result_st results_obj;
-  memcached_result_st *results;
-
-  results= memcached_result_create(memc, &results_obj);
-  test_true(results);
-  test_true(&results_obj == results);
-
-  /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  while ((results= memcached_fetch_result(memc, &results_obj, &rc)) != NULL)
-  {
-    test_true(results);
-  }
-
-  while ((results= memcached_fetch_result(memc, &results_obj, &rc)) != NULL)
-  test_true(!results);
-  test_true(rc == MEMCACHED_END);
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
-  {
-    test_true(results);
-    test_true(&results_obj == results);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_result_key_length(results) == memcached_result_length(results));
-    test_true(!memcmp(memcached_result_key_value(results),
-                   memcached_result_value(results),
-                   memcached_result_length(results)));
-  }
-
-  memcached_result_free(&results_obj);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_result_alloc_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-
-  memcached_result_st *results;
-
-  /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  while ((results= memcached_fetch_result(memc, NULL, &rc)) != NULL)
-  {
-    test_true(results);
-  }
-  test_true(!results);
-  test_true(rc == MEMCACHED_END);
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  x= 0;
-  while ((results= memcached_fetch_result(memc, NULL, &rc)))
-  {
-    test_true(results);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_result_key_length(results) == memcached_result_length(results));
-    test_true(!memcmp(memcached_result_key_value(results),
-                   memcached_result_value(results),
-                   memcached_result_length(results)));
-    memcached_result_free(results);
-    x++;
-  }
-
-  return TEST_SUCCESS;
-}
-
-/* Count the results */
-static memcached_return_t callback_counter(const memcached_st *ptr __attribute__((unused)),
-                                           memcached_result_st *result __attribute__((unused)),
-                                           void *context)
-{
-  size_t *counter= (size_t *)context;
-
-  *counter= *counter + 1;
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t mget_result_function(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-  size_t counter;
-  memcached_execute_fn callbacks[1];
-
-  /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  callbacks[0]= &callback_counter;
-  counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-
-  test_true(counter == 3);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-  uint32_t flags;
-
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *return_value;
-  size_t return_value_length;
-
-  /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                      &return_value_length, &flags, &rc)) != NULL)
-  {
-    test_true(return_value);
-  }
-  test_true(!return_value);
-  test_true(return_value_length == 0);
-  test_true(rc == MEMCACHED_END);
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  x= 0;
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &return_value_length, &flags, &rc)))
-  {
-    test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(return_key_length == return_value_length);
-    test_true(!memcmp(return_value, return_key, return_value_length));
-    free(return_value);
-    x++;
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_execute(memcached_st *memc)
-{
-  bool binary= false;
-
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) != 0)
-    binary= true;
-
-  /*
-   * I only want to hit _one_ server so I know the number of requests I'm
-   * sending in the pipeline.
-   */
-  uint32_t number_of_hosts= memc->number_of_hosts;
-  memc->number_of_hosts= 1;
-
-  size_t max_keys= 20480;
-
-
-  char **keys= calloc(max_keys, sizeof(char*));
-  size_t *key_length=calloc(max_keys, sizeof(size_t));
-
-  /* First add all of the items.. */
-  char blob[1024] = {0};
-  memcached_return_t rc;
-
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    char k[251];
-
-    key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%zu", x);
-    keys[x]= strdup(k);
-    test_true(keys[x] != NULL);
-    rc= memcached_add(memc, keys[x], key_length[x], blob, sizeof(blob), 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  /* Try to get all of them with a large multiget */
-  size_t counter= 0;
-  memcached_execute_fn callbacks[1]= { [0]= &callback_counter };
-  rc= memcached_mget_execute(memc, (const char**)keys, key_length,
-                             max_keys, callbacks, &counter, 1);
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    test_true(binary);
-    rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-    test_true(rc == MEMCACHED_END);
-
-    /* Verify that we got all of the items */
-    test_true(counter == max_keys);
-  }
-  else if (rc == MEMCACHED_NOT_SUPPORTED)
-  {
-    test_true(counter == 0);
-  }
-  else
-  {
-    test_fail("note: this test functions differently when in binary mode");
-  }
-
-  /* Release all allocated resources */
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    free(keys[x]);
-  }
-  free(keys);
-  free(key_length);
-
-  memc->number_of_hosts= number_of_hosts;
-  return TEST_SUCCESS;
-}
-
-#define REGRESSION_BINARY_VS_BLOCK_COUNT  20480
-
-static test_return_t key_setup(memcached_st *memc)
-{
-  (void)memc;
-
-  if (pre_binary(memc) != TEST_SUCCESS)
-    return TEST_SKIPPED;
-
-  global_pairs= pairs_generate(REGRESSION_BINARY_VS_BLOCK_COUNT, 0);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t key_teardown(memcached_st *memc)
-{
-  (void)memc;
-  pairs_free(global_pairs);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t block_add_regression(memcached_st *memc)
-{
-  /* First add all of the items.. */
-  for (size_t x= 0; x < REGRESSION_BINARY_VS_BLOCK_COUNT; ++x)
-  {
-    memcached_return_t rc;
-    char blob[1024] = {0};
-
-    rc= memcached_add_by_key(memc, "bob", 3, global_pairs[x].key, global_pairs[x].key_length, blob, sizeof(blob), 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t binary_add_regression(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-  test_return_t rc= block_add_regression(memc);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 0);
-  return rc;
-}
-
-static test_return_t get_stats_keys(memcached_st *memc)
-{
- char **stat_list;
- char **ptr;
- memcached_stat_st memc_stat;
- memcached_return_t rc;
-
- stat_list= memcached_stat_get_keys(memc, &memc_stat, &rc);
- test_true(rc == MEMCACHED_SUCCESS);
- for (ptr= stat_list; *ptr; ptr++)
-   test_true(*ptr);
-
- free(stat_list);
-
- return TEST_SUCCESS;
-}
-
-static test_return_t version_string_test(memcached_st *memc __attribute__((unused)))
-{
-  const char *version_string;
-
-  version_string= memcached_lib_version();
-
-  test_true(!strcmp(version_string, LIBMEMCACHED_VERSION_STRING));
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_stats(memcached_st *memc)
-{
- char **stat_list;
- char **ptr;
- memcached_return_t rc;
- memcached_stat_st *memc_stat;
-
- memc_stat= memcached_stat(memc, NULL, &rc);
- test_true(rc == MEMCACHED_SUCCESS);
-
- test_true(rc == MEMCACHED_SUCCESS);
- test_true(memc_stat);
-
- for (uint32_t x= 0; x < memcached_server_count(memc); x++)
- {
-   stat_list= memcached_stat_get_keys(memc, memc_stat+x, &rc);
-   test_true(rc == MEMCACHED_SUCCESS);
-   for (ptr= stat_list; *ptr; ptr++);
-
-   free(stat_list);
- }
-
- memcached_stat_free(NULL, memc_stat);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t add_host_test(memcached_st *memc)
-{
-  unsigned int x;
-  memcached_server_st *servers;
-  memcached_return_t rc;
-  char servername[]= "0.example.com";
-
-  servers= memcached_server_list_append_with_weight(NULL, servername, 400, 0, &rc);
-  test_true(servers);
-  test_true(1 == memcached_server_list_count(servers));
-
-  for (x= 2; x < 20; x++)
-  {
-    char buffer[SMALL_STRING_LEN];
-
-    snprintf(buffer, SMALL_STRING_LEN, "%u.example.com", 400+x);
-    servers= memcached_server_list_append_with_weight(servers, buffer, 401, 0,
-                                     &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(x == memcached_server_list_count(servers));
-  }
-
-  rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-  rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  memcached_server_list_free(servers);
-
-  return TEST_SUCCESS;
-}
-
-static memcached_return_t  clone_test_callback(memcached_st *parent __attribute__((unused)), memcached_st *memc_clone __attribute__((unused)))
-{
-  return MEMCACHED_SUCCESS;
-}
-
-static memcached_return_t  cleanup_test_callback(memcached_st *ptr __attribute__((unused)))
-{
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t callback_test(memcached_st *memc)
-{
-  /* Test User Data */
-  {
-    int x= 5;
-    int *test_ptr;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_USER_DATA, &x);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_ptr= (int *)memcached_callback_get(memc, MEMCACHED_CALLBACK_USER_DATA, &rc);
-    test_true(*test_ptr == x);
-  }
-
-  /* Test Clone Callback */
-  {
-    memcached_clone_fn clone_cb= (memcached_clone_fn)clone_test_callback;
-    void *clone_cb_ptr= *(void **)&clone_cb;
-    void *temp_function= NULL;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION,
-                               clone_cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
-    temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
-    test_true(temp_function == clone_cb_ptr);
-  }
-
-  /* Test Cleanup Callback */
-  {
-    memcached_cleanup_fn cleanup_cb=
-      (memcached_cleanup_fn)cleanup_test_callback;
-    void *cleanup_cb_ptr= *(void **)&cleanup_cb;
-    void *temp_function= NULL;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION,
-                               cleanup_cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
-    temp_function= memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
-    test_true(temp_function == cleanup_cb_ptr);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/* We don't test the behavior itself, we test the switches */
-static test_return_t behavior_test(memcached_st *memc)
-{
-  uint64_t value;
-  uint32_t set= 1;
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
-  test_true(value == 1);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY);
-  test_true(value == 1);
-
-  set= MEMCACHED_HASH_MD5;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
-  test_true(value == MEMCACHED_HASH_MD5);
-
-  set= 0;
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK);
-  test_true(value == 0);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY);
-  test_true(value == 0);
-
-  set= MEMCACHED_HASH_DEFAULT;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
-  test_true(value == MEMCACHED_HASH_DEFAULT);
-
-  set= MEMCACHED_HASH_CRC;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set);
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
-  test_true(value == MEMCACHED_HASH_CRC);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE);
-  test_true(value > 0);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
-  test_true(value > 0);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, value + 1);
-  test_true((value + 1) == memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS));
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t MEMCACHED_BEHAVIOR_CORK_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  bool set= true;
-  bool value;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CORK, set);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED);
-
-  value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_CORK);
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    test_true((bool)value == set);
-  }
-  else
-  {
-    test_false((bool)value == set);
-  }
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  bool set= true;
-  bool value;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_KEEPALIVE, set);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED);
-
-  value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_KEEPALIVE);
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    test_true((bool)value == set);
-  }
-  else
-  {
-    test_false((bool)value == set);
-  }
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  bool set= true;
-  bool value;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_KEEPIDLE, set);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOT_SUPPORTED);
-
-  value= (bool)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_TCP_KEEPIDLE);
-
-  if (rc == MEMCACHED_SUCCESS)
-  {
-    test_true((bool)value == set);
-  }
-  else
-  {
-    test_false((bool)value == set);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fetch_all_results(memcached_st *memc)
-{
-  memcached_return_t rc= MEMCACHED_SUCCESS;
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *return_value;
-  size_t return_value_length;
-  uint32_t flags;
-
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &return_value_length, &flags, &rc)))
-  {
-    test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    free(return_value);
-  }
-
-  return ((rc == MEMCACHED_END) || (rc == MEMCACHED_SUCCESS)) ? TEST_SUCCESS : TEST_FAILURE;
-}
-
-/* Test case provided by Cal Haldenbrand */
-static test_return_t user_supplied_bug1(memcached_st *memc)
-{
-  unsigned int setter= 1;
-
-  unsigned long long total= 0;
-  uint32_t size= 0;
-  char key[10];
-  char randomstuff[6 * 1024];
-  memcached_return_t rc;
-
-  memset(randomstuff, 0, 6 * 1024);
-
-  /* We just keep looking at the same values over and over */
-  srandom(10);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
-
-
-  /* add key */
-  for (uint32_t x= 0 ; total < 20 * 1024576 ; x++ )
-  {
-    unsigned int j= 0;
-
-    size= (uint32_t)(rand() % ( 5 * 1024 ) ) + 400;
-    memset(randomstuff, 0, 6 * 1024);
-    test_true(size < 6 * 1024); /* Being safe here */
-
-    for (j= 0 ; j < size ;j++)
-      randomstuff[j] = (signed char) ((rand() % 26) + 97);
-
-    total += size;
-    snprintf(key, sizeof(key), "%u", x);
-    rc = memcached_set(memc, key, strlen(key),
-                       randomstuff, strlen(randomstuff), 10, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-    /* If we fail, lets try again */
-    if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
-      rc = memcached_set(memc, key, strlen(key),
-                         randomstuff, strlen(randomstuff), 10, 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/* Test case provided by Cal Haldenbrand */
-static test_return_t user_supplied_bug2(memcached_st *memc)
-{
-  unsigned int setter;
-  size_t total= 0;
-
-  setter= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
-#ifdef NOT_YET
-  setter = 20 * 1024576;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, setter);
-  setter = 20 * 1024576;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, setter);
-  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE);
-  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
-
-  for (x= 0, errors= 0; total < 20 * 1024576 ; x++)
-#endif
-
-  for (uint32_t x= 0, errors= 0; total < 24576 ; x++)
-  {
-    memcached_return_t rc= MEMCACHED_SUCCESS;
-    char buffer[SMALL_STRING_LEN];
-    uint32_t flags= 0;
-    size_t val_len= 0;
-    char *getval;
-
-    memset(buffer, 0, SMALL_STRING_LEN);
-
-    snprintf(buffer, sizeof(buffer), "%u", x);
-    getval= memcached_get(memc, buffer, strlen(buffer),
-                           &val_len, &flags, &rc);
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      if (rc == MEMCACHED_NOTFOUND)
-        errors++;
-      else
-      {
-        test_true(rc);
-      }
-
-      continue;
-    }
-    total+= val_len;
-    errors= 0;
-    free(getval);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/* Do a large mget() over all the keys we think exist */
-#define KEY_COUNT 3000 // * 1024576
-static test_return_t user_supplied_bug3(memcached_st *memc)
-{
-  memcached_return_t rc;
-  unsigned int setter;
-  unsigned int x;
-  char **keys;
-  size_t key_lengths[KEY_COUNT];
-
-  setter= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, setter);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
-#ifdef NOT_YET
-  setter = 20 * 1024576;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, setter);
-  setter = 20 * 1024576;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, setter);
-  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE);
-  getter = memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE);
-#endif
-
-  keys= calloc(KEY_COUNT, sizeof(char *));
-  test_true(keys);
-  for (x= 0; x < KEY_COUNT; x++)
-  {
-    char buffer[30];
-
-    snprintf(buffer, 30, "%u", x);
-    keys[x]= strdup(buffer);
-    key_lengths[x]= strlen(keys[x]);
-  }
-
-  rc= memcached_mget(memc, (const char **)keys, key_lengths, KEY_COUNT);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  test_true(fetch_all_results(memc) == TEST_SUCCESS);
-
-  for (x= 0; x < KEY_COUNT; x++)
-    free(keys[x]);
-  free(keys);
-
-  return TEST_SUCCESS;
-}
-
-/* Make sure we behave properly if server list has no values */
-static test_return_t user_supplied_bug4(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"fudge", "son", "food"};
-  size_t key_length[]= {5, 3, 4};
-  unsigned int x;
-  uint32_t flags;
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *return_value;
-  size_t return_value_length;
-
-  /* Here we free everything before running a bunch of mget tests */
-  memcached_servers_reset(memc);
-
-
-  /* We need to empty the server before continueing test */
-  rc= memcached_flush(memc, 0);
-  test_true(rc == MEMCACHED_NO_SERVERS);
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_NO_SERVERS);
-
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                      &return_value_length, &flags, &rc)) != NULL)
-  {
-    test_true(return_value);
-  }
-  test_true(!return_value);
-  test_true(return_value_length == 0);
-  test_true(rc == MEMCACHED_NO_SERVERS);
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_NO_SERVERS);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_NO_SERVERS);
-
-  x= 0;
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &return_value_length, &flags, &rc)))
-  {
-    test_true(return_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(return_key_length == return_value_length);
-    test_true(!memcmp(return_value, return_key, return_value_length));
-    free(return_value);
-    x++;
-  }
-
-  return TEST_SUCCESS;
-}
-
-#define VALUE_SIZE_BUG5 1048064
-static test_return_t user_supplied_bug5(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
-  size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *value;
-  size_t value_length;
-  uint32_t flags;
-  unsigned int count;
-  unsigned int x;
-  char insert_data[VALUE_SIZE_BUG5];
-
-  for (x= 0; x < VALUE_SIZE_BUG5; x++)
-    insert_data[x]= (signed char)rand();
-
-  memcached_flush(memc, 0);
-  value= memcached_get(memc, keys[0], key_length[0],
-                        &value_length, &flags, &rc);
-  test_true(value == NULL);
-  rc= memcached_mget(memc, keys, key_length, 4);
-
-  count= 0;
-  while ((value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &value_length, &flags, &rc)))
-    count++;
-  test_true(count == 0);
-
-  for (x= 0; x < 4; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      insert_data, VALUE_SIZE_BUG5,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  for (x= 0; x < 10; x++)
-  {
-    value= memcached_get(memc, keys[0], key_length[0],
-                         &value_length, &flags, &rc);
-    test_true(value);
-    free(value);
-
-    rc= memcached_mget(memc, keys, key_length, 4);
-    count= 0;
-    while ((value= memcached_fetch(memc, return_key, &return_key_length,
-                                          &value_length, &flags, &rc)))
-    {
-      count++;
-      free(value);
-    }
-    test_true(count == 4);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t user_supplied_bug6(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"036790384900", "036790384902", "036790384904", "036790384906"};
-  size_t key_length[]=  {strlen("036790384900"), strlen("036790384902"), strlen("036790384904"), strlen("036790384906")};
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *value;
-  size_t value_length;
-  uint32_t flags;
-  unsigned int count;
-  unsigned int x;
-  char insert_data[VALUE_SIZE_BUG5];
-
-  for (x= 0; x < VALUE_SIZE_BUG5; x++)
-    insert_data[x]= (signed char)rand();
-
-  memcached_flush(memc, 0);
-  value= memcached_get(memc, keys[0], key_length[0],
-                        &value_length, &flags, &rc);
-  test_true(value == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
-  rc= memcached_mget(memc, keys, key_length, 4);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  count= 0;
-  while ((value= memcached_fetch(memc, return_key, &return_key_length,
-                                        &value_length, &flags, &rc)))
-    count++;
-  test_true(count == 0);
-  test_true(rc == MEMCACHED_END);
-
-  for (x= 0; x < 4; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      insert_data, VALUE_SIZE_BUG5,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  for (x= 0; x < 2; x++)
-  {
-    value= memcached_get(memc, keys[0], key_length[0],
-                         &value_length, &flags, &rc);
-    test_true(value);
-    free(value);
-
-    rc= memcached_mget(memc, keys, key_length, 4);
-    test_true(rc == MEMCACHED_SUCCESS);
-    count= 3;
-    /* We test for purge of partial complete fetches */
-    for (count= 3; count; count--)
-    {
-      value= memcached_fetch(memc, return_key, &return_key_length,
-                             &value_length, &flags, &rc);
-      test_true(rc == MEMCACHED_SUCCESS);
-      test_true(!(memcmp(value, insert_data, value_length)));
-      test_true(value_length);
-      free(value);
-    }
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t user_supplied_bug8(memcached_st *memc __attribute__((unused)))
-{
-  memcached_return_t rc;
-  memcached_st *mine;
-  memcached_st *memc_clone;
-
-  memcached_server_st *servers;
-  const char *server_list= "memcache1.memcache.bk.sapo.pt:11211, memcache1.memcache.bk.sapo.pt:11212, memcache1.memcache.bk.sapo.pt:11213, memcache1.memcache.bk.sapo.pt:11214, memcache2.memcache.bk.sapo.pt:11211, memcache2.memcache.bk.sapo.pt:11212, memcache2.memcache.bk.sapo.pt:11213, memcache2.memcache.bk.sapo.pt:11214";
-
-  servers= memcached_servers_parse(server_list);
-  test_true(servers);
-
-  mine= memcached_create(NULL);
-  rc= memcached_server_push(mine, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-  memcached_server_list_free(servers);
-
-  test_true(mine);
-  memc_clone= memcached_clone(NULL, mine);
-
-  memcached_quit(mine);
-  memcached_quit(memc_clone);
-
-
-  memcached_free(mine);
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-/* Test flag store/retrieve */
-static test_return_t user_supplied_bug7(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys= "036790384900";
-  size_t key_length=  strlen(keys);
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *value;
-  size_t value_length;
-  uint32_t flags;
-  unsigned int x;
-  char insert_data[VALUE_SIZE_BUG5];
-
-  for (x= 0; x < VALUE_SIZE_BUG5; x++)
-    insert_data[x]= (signed char)rand();
-
-  memcached_flush(memc, 0);
-
-  flags= 245;
-  rc= memcached_set(memc, keys, key_length,
-                    insert_data, VALUE_SIZE_BUG5,
-                    (time_t)0, flags);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  flags= 0;
-  value= memcached_get(memc, keys, key_length,
-                        &value_length, &flags, &rc);
-  test_true(flags == 245);
-  test_true(value);
-  free(value);
-
-  rc= memcached_mget(memc, &keys, &key_length, 1);
-
-  flags= 0;
-  value= memcached_fetch(memc, return_key, &return_key_length,
-                         &value_length, &flags, &rc);
-  test_true(flags == 245);
-  test_true(value);
-  free(value);
-
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t user_supplied_bug9(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *keys[]= {"UDATA:edevil@sapo.pt", "fudge&*@#", "for^#@&$not"};
-  size_t key_length[3];
-  unsigned int x;
-  uint32_t flags;
-  unsigned count= 0;
-
-  char return_key[MEMCACHED_MAX_KEY];
-  size_t return_key_length;
-  char *return_value;
-  size_t return_value_length;
-
-
-  key_length[0]= strlen("UDATA:edevil@sapo.pt");
-  key_length[1]= strlen("fudge&*@#");
-  key_length[2]= strlen("for^#@&$not");
-
-
-  for (x= 0; x < 3; x++)
-  {
-    rc= memcached_set(memc, keys[x], key_length[x],
-                      keys[x], key_length[x],
-                      (time_t)50, (uint32_t)9);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  rc= memcached_mget(memc, keys, key_length, 3);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /* We need to empty the server before continueing test */
-  while ((return_value= memcached_fetch(memc, return_key, &return_key_length,
-                      &return_value_length, &flags, &rc)) != NULL)
-  {
-    test_true(return_value);
-    free(return_value);
-    count++;
-  }
-  test_true(count == 3);
-
-  return TEST_SUCCESS;
-}
-
-/* We are testing with aggressive timeout to get failures */
-static test_return_t user_supplied_bug10(memcached_st *memc)
-{
-  const char *key= "foo";
-  char *value;
-  size_t value_length= 512;
-  unsigned int x;
-  size_t key_len= 3;
-  memcached_return_t rc;
-  unsigned int set= 1;
-  memcached_st *mclone= memcached_clone(NULL, memc);
-  int32_t timeout;
-
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  timeout= 2;
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
-                         (uint64_t)timeout);
-
-  value = (char*)malloc(value_length * sizeof(char));
-
-  for (x= 0; x < value_length; x++)
-    value[x]= (char) (x % 127);
-
-  for (x= 1; x <= 100000; ++x)
-  {
-    rc= memcached_set(mclone, key, key_len,value, value_length, 0, 0);
-
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_WRITE_FAILURE ||
-           rc == MEMCACHED_BUFFERED || rc == MEMCACHED_TIMEOUT);
-
-    if (rc == MEMCACHED_WRITE_FAILURE || rc == MEMCACHED_TIMEOUT)
-      x--;
-  }
-
-  free(value);
-  memcached_free(mclone);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  We are looking failures in the async protocol
-*/
-static test_return_t user_supplied_bug11(memcached_st *memc)
-{
-  const char *key= "foo";
-  char *value;
-  size_t value_length= 512;
-  unsigned int x;
-  size_t key_len= 3;
-  memcached_return_t rc;
-  unsigned int set= 1;
-  int32_t timeout;
-  memcached_st *mclone= memcached_clone(NULL, memc);
-
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_NO_BLOCK, set);
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_TCP_NODELAY, set);
-  timeout= -1;
-  memcached_behavior_set(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
-                         (size_t)timeout);
-
-  timeout= (int32_t)memcached_behavior_get(mclone, MEMCACHED_BEHAVIOR_POLL_TIMEOUT);
-
-  test_true(timeout == -1);
-
-  value = (char*)malloc(value_length * sizeof(char));
-
-  for (x= 0; x < value_length; x++)
-    value[x]= (char) (x % 127);
-
-  for (x= 1; x <= 100000; ++x)
-  {
-    rc= memcached_set(mclone, key, key_len,value, value_length, 0, 0);
-  }
-
-  free(value);
-  memcached_free(mclone);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Bug found where incr was not returning MEMCACHED_NOTFOUND when object did not exist.
-*/
-static test_return_t user_supplied_bug12(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint32_t flags;
-  size_t value_length;
-  char *value;
-  uint64_t number_value;
-
-  value= memcached_get(memc, "autoincrement", strlen("autoincrement"),
-                        &value_length, &flags, &rc);
-  test_true(value == NULL);
-  test_true(rc == MEMCACHED_NOTFOUND);
-
-  rc= memcached_increment(memc, "autoincrement", strlen("autoincrement"),
-                          1, &number_value);
-
-  test_true(value == NULL);
-  /* The binary protocol will set the key if it doesn't exist */
-  if (memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1)
-  {
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-  else
-  {
-    test_true(rc == MEMCACHED_NOTFOUND);
-  }
-
-  rc= memcached_set(memc, "autoincrement", strlen("autoincrement"), "1", 1, 0, 0);
-
-  value= memcached_get(memc, "autoincrement", strlen("autoincrement"),
-                        &value_length, &flags, &rc);
-  test_true(value);
-  test_true(rc == MEMCACHED_SUCCESS);
-  free(value);
-
-  rc= memcached_increment(memc, "autoincrement", strlen("autoincrement"),
-                          1, &number_value);
-  test_true(number_value == 2);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Bug found where command total one more than MEMCACHED_MAX_BUFFER
-  set key34567890 0 0 8169 \r\n is sent followed by buffer of size 8169, followed by 8169
- */
-static test_return_t user_supplied_bug13(memcached_st *memc)
-{
-  char key[] = "key34567890";
-  char *overflow;
-  memcached_return_t rc;
-  size_t overflowSize;
-
-  char commandFirst[]= "set key34567890 0 0 ";
-  char commandLast[] = " \r\n"; /* first line of command sent to server */
-  size_t commandLength;
-  size_t testSize;
-
-  commandLength = strlen(commandFirst) + strlen(commandLast) + 4; /* 4 is number of characters in size, probably 8196 */
-
-  overflowSize = MEMCACHED_MAX_BUFFER - commandLength;
-
-  for (testSize= overflowSize - 1; testSize < overflowSize + 1; testSize++)
-  {
-    overflow= malloc(testSize);
-    test_true(overflow != NULL);
-
-    memset(overflow, 'x', testSize);
-    rc= memcached_set(memc, key, strlen(key),
-                      overflow, testSize, 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
-    free(overflow);
-  }
-
-  return TEST_SUCCESS;
-}
-
-
-/*
-  Test values of many different sizes
-  Bug found where command total one more than MEMCACHED_MAX_BUFFER
-  set key34567890 0 0 8169 \r\n
-  is sent followed by buffer of size 8169, followed by 8169
- */
-static test_return_t user_supplied_bug14(memcached_st *memc)
-{
-  size_t setter= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, setter);
-  memcached_return_t rc;
-  const char *key= "foo";
-  char *value;
-  size_t value_length= 18000;
-  char *string;
-  size_t string_length;
-  uint32_t flags;
-  unsigned int x;
-  size_t current_length;
-
-  value = (char*)malloc(value_length);
-  test_true(value);
-
-  for (x= 0; x < value_length; x++)
-    value[x] = (char) (x % 127);
-
-  for (current_length= 0; current_length < value_length; current_length++)
-  {
-    rc= memcached_set(memc, key, strlen(key),
-                      value, current_length,
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-    string= memcached_get(memc, key, strlen(key),
-                          &string_length, &flags, &rc);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(string_length == current_length);
-    test_true(!memcmp(string, value, string_length));
-
-    free(string);
-  }
-
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Look for zero length value problems
-  */
-static test_return_t user_supplied_bug15(memcached_st *memc)
-{
-  uint32_t x;
-  memcached_return_t rc;
-  const char *key= "mykey";
-  char *value;
-  size_t length;
-  uint32_t flags;
-
-  for (x= 0; x < 2; x++)
-  {
-    rc= memcached_set(memc, key, strlen(key),
-                      NULL, 0,
-                      (time_t)0, (uint32_t)0);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    value= memcached_get(memc, key, strlen(key),
-                         &length, &flags, &rc);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(value == NULL);
-    test_true(length == 0);
-    test_true(flags == 0);
-
-    value= memcached_get(memc, key, strlen(key),
-                         &length, &flags, &rc);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(value == NULL);
-    test_true(length == 0);
-    test_true(flags == 0);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
-static test_return_t user_supplied_bug16(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "mykey";
-  char *value;
-  size_t length;
-  uint32_t flags;
-
-  rc= memcached_set(memc, key, strlen(key),
-                    NULL, 0,
-                    (time_t)0, UINT32_MAX);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_get(memc, key, strlen(key),
-                       &length, &flags, &rc);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(value == NULL);
-  test_true(length == 0);
-  test_true(flags == UINT32_MAX);
-
-  return TEST_SUCCESS;
-}
-
-#if !defined(__sun) && !defined(__OpenBSD__)
-/* Check the validity of chinese key*/
-static test_return_t user_supplied_bug17(memcached_st *memc)
-{
-    memcached_return_t rc;
-    const char *key= "豆瓣";
-    const char *value="我们在炎热抑郁的夏天无法停止豆瓣";
-    char *value2;
-    size_t length;
-    uint32_t flags;
-
-    rc= memcached_set(memc, key, strlen(key),
-            value, strlen(value),
-            (time_t)0, 0);
-
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    value2= memcached_get(memc, key, strlen(key),
-            &length, &flags, &rc);
-
-    test_true(length==strlen(value));
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcmp(value, value2, length)==0);
-    free(value2);
-
-    return TEST_SUCCESS;
-}
-#endif
-
-/*
-  From Andrei on IRC
-*/
-
-static test_return_t user_supplied_bug19(memcached_st *not_used)
-{
-  memcached_st *memc;
-  const memcached_server_st *server;
-  memcached_return_t res;
-
-  (void)not_used;
-
-  memc= memcached_create(NULL);
-  memcached_server_add_with_weight(memc, "localhost", 11311, 100);
-  memcached_server_add_with_weight(memc, "localhost", 11312, 100);
-
-  server= memcached_server_by_key(memc, "a", 1, &res);
-
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-/* CAS test from Andei */
-static test_return_t user_supplied_bug20(memcached_st *memc)
-{
-  memcached_return_t status;
-  memcached_result_st *result, result_obj;
-  const char *key = "abc";
-  size_t key_len = strlen("abc");
-  const char *value = "foobar";
-  size_t value_len = strlen(value);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1);
-
-  status = memcached_set(memc, key, key_len, value, value_len, (time_t)0, (uint32_t)0);
-  test_true(status == MEMCACHED_SUCCESS);
-
-  status = memcached_mget(memc, &key, &key_len, 1);
-  test_true(status == MEMCACHED_SUCCESS);
-
-  result= memcached_result_create(memc, &result_obj);
-  test_true(result);
-
-  memcached_result_create(memc, &result_obj);
-  result= memcached_fetch_result(memc, &result_obj, &status);
-
-  test_true(result);
-  test_true(status == MEMCACHED_SUCCESS);
-
-  memcached_result_free(result);
-
-  return TEST_SUCCESS;
-}
-
-#include "ketama_test_cases.h"
-static test_return_t user_supplied_bug18(memcached_st *trash)
-{
-  memcached_return_t rc;
-  uint64_t value;
-  int x;
-  memcached_server_st *server_pool;
-  memcached_st *memc;
-
-  (void)trash;
-
-  memc= memcached_create(NULL);
-  test_true(memc);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
-  test_true(value == MEMCACHED_HASH_MD5);
-
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
-  memcached_server_push(memc, server_pool);
-
-  /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
-  test_true(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
-  test_true(strcmp(server_pool[2].hostname, "10.0.1.3") == 0);
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
-  test_true(strcmp(server_pool[7].hostname, "10.0.1.8") == 0);
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
-
-  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
-   * us test the boundary wraparound.
-   */
-  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->continuum[0].index);
-
-  /* verify the standard ketama set. */
-  for (x= 0; x < 99; x++)
-  {
-    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
-
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, server_idx);
-
-    const char *hostname = memcached_server_name(instance);
-    test_strcmp(hostname, ketama_test_cases[x].server);
-  }
-
-  memcached_server_list_free(server_pool);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-/* Large mget() of missing keys with binary proto
- *
- * If many binary quiet commands (such as getq's in an mget) fill the output
- * buffer and the server chooses not to respond, memcached_flush hangs. See
- * http://lists.tangent.org/pipermail/libmemcached/2009-August/000918.html
- */
-
-/* sighandler_t function that always asserts false */
-static void fail(int unused __attribute__((unused)))
-{
-  assert(0);
-}
-
-
-static test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count)
-{
-#ifdef WIN32
-  (void)memc;
-  (void)key_count;
-  return TEST_SKIPPED;
-#else
-  memcached_return_t rc;
-  unsigned int x;
-  char **keys;
-  size_t* key_lengths;
-  void (*oldalarm)(int);
-  memcached_st *memc_clone;
-
-  memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone);
-
-  /* only binproto uses getq for mget */
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-
-  /* empty the cache to ensure misses (hence non-responses) */
-  rc= memcached_flush(memc_clone, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  key_lengths= calloc(key_count, sizeof(size_t));
-  keys= calloc(key_count, sizeof(char *));
-  test_true(keys);
-  for (x= 0; x < key_count; x++)
-  {
-    char buffer[30];
-
-    snprintf(buffer, 30, "%u", x);
-    keys[x]= strdup(buffer);
-    key_lengths[x]= strlen(keys[x]);
-  }
-
-  oldalarm= signal(SIGALRM, fail);
-  alarm(5);
-
-  rc= memcached_mget(memc_clone, (const char **)keys, key_lengths, key_count);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  alarm(0);
-  signal(SIGALRM, oldalarm);
-
-  test_true(fetch_all_results(memc) == TEST_SUCCESS);
-
-  for (x= 0; x < key_count; x++)
-    free(keys[x]);
-  free(keys);
-  free(key_lengths);
-
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-#endif
-}
-
-static test_return_t user_supplied_bug21(memcached_st *memc)
-{
-  test_return_t test_rc;
-  test_rc= pre_binary(memc);
-
-  if (test_rc != TEST_SUCCESS)
-    return test_rc;
-
-  test_return_t rc;
-
-  /* should work as of r580 */
-  rc= _user_supplied_bug21(memc, 10);
-  test_true(rc == TEST_SUCCESS);
-
-  /* should fail as of r580 */
-  rc= _user_supplied_bug21(memc, 1000);
-  test_true(rc == TEST_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t auto_eject_hosts(memcached_st *trash)
-{
-  (void) trash;
-  memcached_server_instance_st instance;
-
-  memcached_return_t rc;
-  memcached_st *memc= memcached_create(NULL);
-  test_true(memc);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
-  test_true(value == MEMCACHED_HASH_MD5);
-
-    /* server should be removed when in delay */
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS);
-  test_true(value == 1);
-
-  memcached_server_st *server_pool;
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
-  memcached_server_push(memc, server_pool);
-
-  /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
-  test_true(strcmp(server_pool[0].hostname, "10.0.1.1") == 0);
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
-  test_true(strcmp(server_pool[2].hostname, "10.0.1.3") == 0);
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
-  test_true(strcmp(server_pool[7].hostname, "10.0.1.8") == 0);
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
-
-  instance= memcached_server_instance_by_position(memc, 2);
-  ((memcached_server_write_instance_st)instance)->next_retry = time(NULL) + 15;
-  memc->next_distribution_rebuild= time(NULL) - 1;
-
-  /*
-    This would not work if there were only two hosts.
-  */
-  for (size_t x= 0; x < 99; x++)
-  {
-    memcached_autoeject(memc);
-    uint32_t server_idx= memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
-    test_true(server_idx != 2);
-  }
-
-  /* and re-added when it's back. */
-  ((memcached_server_write_instance_st)instance)->next_retry = time(NULL) - 1;
-  memc->next_distribution_rebuild= time(NULL) - 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION,
-                         memc->distribution);
-  for (size_t x= 0; x < 99; x++)
-  {
-    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
-    // We re-use instance from above.
-    instance=
-      memcached_server_instance_by_position(memc, server_idx);
-    const char *hostname = memcached_server_name(instance);
-    test_true(strcmp(hostname, ketama_test_cases[x].server) == 0);
-  }
-
-  memcached_server_list_free(server_pool);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t output_ketama_weighted_keys(memcached_st *trash)
-{
-  (void) trash;
-
-  memcached_return_t rc;
-  memcached_st *memc= memcached_create(NULL);
-  test_true(memc);
-
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  uint64_t value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
-  test_true(value == MEMCACHED_HASH_MD5);
-
-
-  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY) == MEMCACHED_SUCCESS);
-
-  memcached_server_st *server_pool;
-  server_pool = memcached_servers_parse("10.0.1.1:11211,10.0.1.2:11211,10.0.1.3:11211,10.0.1.4:11211,10.0.1.5:11211,10.0.1.6:11211,10.0.1.7:11211,10.0.1.8:11211,192.168.1.1:11211,192.168.100.1:11211");
-  memcached_server_push(memc, server_pool);
-
-  // @todo this needs to be refactored to actually test something.
-#if 0
-  FILE *fp;
-  if ((fp = fopen("ketama_keys.txt", "w")))
-  {
-    // noop
-  } else {
-    printf("cannot write to file ketama_keys.txt");
-    return TEST_FAILURE;
-  }
-
-  for (int x= 0; x < 10000; x++)
-  {
-    char key[10];
-    sprintf(key, "%d", x);
-
-    uint32_t server_idx = memcached_generate_hash(memc, key, strlen(key));
-    char *hostname = memc->hosts[server_idx].hostname;
-    in_port_t port = memc->hosts[server_idx].port;
-    fprintf(fp, "key %s is on host /%s:%u\n", key, hostname, port);
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, host_index);
-  }
-  fclose(fp);
-#endif
-  memcached_server_list_free(server_pool);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t result_static(memcached_st *memc)
-{
-  memcached_result_st result;
-  memcached_result_st *result_ptr;
-
-  result_ptr= memcached_result_create(memc, &result);
-  test_true(result.options.is_allocated == false);
-  test_true(memcached_is_initialized(&result) == true);
-  test_true(result_ptr);
-  test_true(result_ptr == &result);
-
-  memcached_result_free(&result);
-
-  test_true(result.options.is_allocated == false);
-  test_true(memcached_is_initialized(&result) == false);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t result_alloc(memcached_st *memc)
-{
-  memcached_result_st *result_ptr;
-
-  result_ptr= memcached_result_create(memc, NULL);
-  test_true(result_ptr);
-  test_true(result_ptr->options.is_allocated == true);
-  test_true(memcached_is_initialized(result_ptr) == true);
-  memcached_result_free(result_ptr);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_static_null(memcached_st *memc)
-{
-  memcached_string_st string;
-  memcached_string_st *string_ptr;
-
-  string_ptr= memcached_string_create(memc, &string, 0);
-  test_true(string.options.is_initialized == true);
-  test_true(string_ptr);
-
-  /* The following two better be the same! */
-  test_true(memcached_is_allocated(string_ptr) == false);
-  test_true(memcached_is_allocated(&string) == false);
-  test_true(&string == string_ptr);
-
-  test_true(string.options.is_initialized == true);
-  test_true(memcached_is_initialized(&string) == true);
-  memcached_string_free(&string);
-  test_true(memcached_is_initialized(&string) == false);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_alloc_null(memcached_st *memc)
-{
-  memcached_string_st *string;
-
-  string= memcached_string_create(memc, NULL, 0);
-  test_true(string);
-  test_true(memcached_is_allocated(string) == true);
-  test_true(memcached_is_initialized(string) == true);
-  memcached_string_free(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_alloc_with_size(memcached_st *memc)
-{
-  memcached_string_st *string;
-
-  string= memcached_string_create(memc, NULL, 1024);
-  test_true(string);
-  test_true(memcached_is_allocated(string) == true);
-  test_true(memcached_is_initialized(string) == true);
-  memcached_string_free(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_alloc_with_size_toobig(memcached_st *memc)
-{
-  memcached_string_st *string;
-
-  string= memcached_string_create(memc, NULL, SIZE_MAX);
-  test_true(string == NULL);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_alloc_append(memcached_st *memc)
-{
-  unsigned int x;
-  char buffer[SMALL_STRING_LEN];
-  memcached_string_st *string;
-
-  /* Ring the bell! */
-  memset(buffer, 6, SMALL_STRING_LEN);
-
-  string= memcached_string_create(memc, NULL, 100);
-  test_true(string);
-  test_true(memcached_is_allocated(string) == true);
-  test_true(memcached_is_initialized(string) == true);
-
-  for (x= 0; x < 1024; x++)
-  {
-    memcached_return_t rc;
-    rc= memcached_string_append(string, buffer, SMALL_STRING_LEN);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-  test_true(memcached_is_allocated(string) == true);
-  memcached_string_free(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t string_alloc_append_toobig(memcached_st *memc)
-{
-  memcached_return_t rc;
-  unsigned int x;
-  char buffer[SMALL_STRING_LEN];
-  memcached_string_st *string;
-
-  /* Ring the bell! */
-  memset(buffer, 6, SMALL_STRING_LEN);
-
-  string= memcached_string_create(memc, NULL, 100);
-  test_true(string);
-  test_true(memcached_is_allocated(string) == true);
-  test_true(memcached_is_initialized(string) == true);
-
-  for (x= 0; x < 1024; x++)
-  {
-    rc= memcached_string_append(string, buffer, SMALL_STRING_LEN);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-  rc= memcached_string_append(string, buffer, SIZE_MAX);
-  test_true(rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE);
-  test_true(memcached_is_allocated(string) == true);
-  memcached_string_free(string);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t cleanup_pairs(memcached_st *memc __attribute__((unused)))
-{
-  pairs_free(global_pairs);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t generate_pairs(memcached_st *memc __attribute__((unused)))
-{
-  global_pairs= pairs_generate(GLOBAL_COUNT, 400);
-  global_count= GLOBAL_COUNT;
-
-  for (size_t x= 0; x < global_count; x++)
-  {
-    global_keys[x]= global_pairs[x].key;
-    global_keys_length[x]=  global_pairs[x].key_length;
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t generate_large_pairs(memcached_st *memc __attribute__((unused)))
-{
-  global_pairs= pairs_generate(GLOBAL2_COUNT, MEMCACHED_MAX_BUFFER+10);
-  global_count= GLOBAL2_COUNT;
-
-  for (size_t x= 0; x < global_count; x++)
-  {
-    global_keys[x]= global_pairs[x].key;
-    global_keys_length[x]=  global_pairs[x].key_length;
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t generate_data(memcached_st *memc)
-{
-  execute_set(memc, global_pairs, global_count);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t generate_data_with_stats(memcached_st *memc)
-{
-  memcached_stat_st *stat_p;
-  memcached_return_t rc;
-  uint32_t host_index= 0;
-  execute_set(memc, global_pairs, global_count);
-
-  //TODO: hosts used size stats
-  stat_p= memcached_stat(memc, NULL, &rc);
-  test_true(stat_p);
-
-  for (host_index= 0; host_index < SERVERS_TO_CREATE; host_index++)
-  {
-    /* This test was changes so that "make test" would work properlly */
-#ifdef DEBUG
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, host_index);
-
-    printf("\nserver %u|%s|%u bytes: %llu\n", host_index, instance->hostname, instance->port, (unsigned long long)(stat_p + host_index)->bytes);
-#endif
-    test_true((unsigned long long)(stat_p + host_index)->bytes);
-  }
-
-  memcached_stat_free(NULL, stat_p);
-
-  return TEST_SUCCESS;
-}
-static test_return_t generate_buffer_data(memcached_st *memc)
-{
-  size_t latch= 0;
-
-  latch= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, latch);
-  generate_data(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_read_count(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_st *memc_clone;
-
-  memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone);
-
-  memcached_server_add_with_weight(memc_clone, "localhost", 6666, 0);
-
-  {
-    char *return_value;
-    size_t return_value_length;
-    uint32_t flags;
-    uint32_t count;
-
-    for (size_t x= count= 0; x < global_count; x++)
-    {
-      return_value= memcached_get(memc_clone, global_keys[x], global_keys_length[x],
-                                  &return_value_length, &flags, &rc);
-      if (rc == MEMCACHED_SUCCESS)
-      {
-        count++;
-        if (return_value)
-          free(return_value);
-      }
-    }
-  }
-
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t get_read(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  {
-    char *return_value;
-    size_t return_value_length;
-    uint32_t flags;
-
-    for (size_t x= 0; x < global_count; x++)
-    {
-      return_value= memcached_get(memc, global_keys[x], global_keys_length[x],
-                                  &return_value_length, &flags, &rc);
-      /*
-      test_true(return_value);
-      test_true(rc == MEMCACHED_SUCCESS);
-    */
-      if (rc == MEMCACHED_SUCCESS && return_value)
-        free(return_value);
-    }
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_read(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(fetch_all_results(memc) == TEST_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_read_result(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
-  test_true(rc == MEMCACHED_SUCCESS);
-  /* Turn this into a help function */
-  {
-    memcached_result_st results_obj;
-    memcached_result_st *results;
-
-    results= memcached_result_create(memc, &results_obj);
-
-    while ((results= memcached_fetch_result(memc, &results_obj, &rc)))
-    {
-      test_true(results);
-      test_true(rc == MEMCACHED_SUCCESS);
-    }
-
-    memcached_result_free(&results_obj);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t mget_read_function(memcached_st *memc)
-{
-  memcached_return_t rc;
-  size_t counter;
-  memcached_execute_fn callbacks[1];
-
-  rc= memcached_mget(memc, global_keys, global_keys_length, global_count);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  callbacks[0]= &callback_counter;
-  counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t delete_generate(memcached_st *memc)
-{
-  for (size_t x= 0; x < global_count; x++)
-  {
-    (void)memcached_delete(memc, global_keys[x], global_keys_length[x], (time_t)0);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t delete_buffer_generate(memcached_st *memc)
-{
-  uint64_t latch= 0;
-
-  latch= 1;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, latch);
-
-  for (size_t x= 0; x < global_count; x++)
-  {
-    (void)memcached_delete(memc, global_keys[x], global_keys_length[x], (time_t)0);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t add_host_test1(memcached_st *memc)
-{
-  memcached_return_t rc;
-  char servername[]= "0.example.com";
-  memcached_server_st *servers;
-
-  servers= memcached_server_list_append_with_weight(NULL, servername, 400, 0, &rc);
-  test_true(servers);
-  test_true(1 == memcached_server_list_count(servers));
-
-  for (size_t x= 2; x < 20; x++)
-  {
-    char buffer[SMALL_STRING_LEN];
-
-    snprintf(buffer, SMALL_STRING_LEN, "%zu.example.com", 400+x);
-    servers= memcached_server_list_append_with_weight(servers, buffer, 401, 0,
-                                     &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(x == memcached_server_list_count(servers));
-  }
-
-  rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-  rc= memcached_server_push(memc, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  memcached_server_list_free(servers);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_nonblock(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_cork(memcached_st *memc)
-{
-  memcached_return_t rc;
-  bool set= true;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CORK, set);
-
-#ifdef __APPLE__
-  return TEST_SKIPPED;
-#endif
-
-  if (rc == MEMCACHED_SUCCESS)
-    return TEST_SUCCESS;
-
-  return TEST_SKIPPED;
-}
-
-static test_return_t pre_cork_and_nonblock(memcached_st *memc)
-{
-  test_return_t rc;
-
-  rc= pre_cork(memc);
-
-#ifdef __APPLE__
-  return TEST_SKIPPED;
-#endif
-
-  if (rc != TEST_SUCCESS)
-    return rc;
-
-  return pre_nonblock(memc);
-}
-
-static test_return_t pre_nonblock_binary(memcached_st *memc)
-{
-  memcached_return_t rc= MEMCACHED_FAILURE;
-  memcached_st *memc_clone;
-
-  memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone);
-  // The memcached_version needs to be done on a clone, because the server
-  // will not toggle protocol on an connection.
-  memcached_version(memc_clone);
-
-  if (libmemcached_util_version_check(memc_clone, 1, 3, 0))
-  {
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
-    rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1);
-  }
-  else
-  {
-    return TEST_SKIPPED;
-  }
-
-  memcached_free(memc_clone);
-
-  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
-}
-
-static test_return_t pre_murmur(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_jenkins(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_JENKINS);
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t pre_md5(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MD5);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_crc(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_CRC);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_hsieh(memcached_st *memc)
-{
-#ifdef HAVE_HSIEH_HASH
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_HSIEH);
-  return TEST_SUCCESS;
-#else
-  (void) memc;
-  return TEST_SKIPPED;
-#endif
-}
-
-static test_return_t pre_hash_fnv1_64(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_MURMUR);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_hash_fnv1a_64(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_64);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_hash_fnv1_32(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1_32);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_hash_fnv1a_32(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, (uint64_t)MEMCACHED_HASH_FNV1A_32);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_behavior_ketama(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint64_t value;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA);
-  test_true(value == 1);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_behavior_ketama_weighted(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint64_t value;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH, MEMCACHED_HASH_MD5);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_HASH);
-  test_true(value == MEMCACHED_HASH_MD5);
-
-  return TEST_SUCCESS;
-}
-
-/**
-  @note This should be testing to see if the server really supports the binary protocol.
-*/
-static test_return_t pre_binary(memcached_st *memc)
-{
-  memcached_return_t rc= MEMCACHED_FAILURE;
-
-  if (libmemcached_util_version_check(memc, 1, 3, 0))
-  {
-    rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1);
-  }
-
-  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
-}
-
-static test_return_t pre_sasl(memcached_st *memc)
-{
-  memcached_return_t rc= MEMCACHED_FAILURE;
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  const char *server= getenv("LIBMEMCACHED_TEST_SASL_SERVER");
-  const char *user= getenv("LIBMEMCACHED_TEST_SASL_USERNAME");
-  const char *pass= getenv("LIBMEMCACHED_TEST_SASL_PASSWORD");
-
-  if (server != NULL && user != NULL && pass != NULL)
-  {
-    memcached_server_st *servers= memcached_servers_parse(server);
-    test_true(servers != NULL);
-    memcached_servers_reset(memc);
-    test_true(memcached_server_push(memc, servers) == MEMCACHED_SUCCESS);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    rc= memcached_set_sasl_auth_data(memc, user, pass);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-#else
-  (void)memc;
-#endif
-
-  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
-}
-
-static test_return_t pre_replication(memcached_st *memc)
-{
-  test_return_t test_rc;
-  test_rc= pre_binary(memc);
-
-  if (test_rc != TEST_SUCCESS)
-    return test_rc;
-
-  /*
-   * Make sure that we store the item on all servers
-   * (master + replicas == number of servers)
-   */
-  memcached_return_t rc;
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS,
-                             memcached_server_count(memc) - 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS) == memcached_server_count(memc) - 1);
-
-  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
-}
-
-
-static test_return_t pre_replication_noblock(memcached_st *memc)
-{
-  test_return_t rc;
-
-  rc= pre_replication(memc);
-  if (rc != TEST_SUCCESS)
-    return rc;
-
-  rc= pre_nonblock(memc);
-
-  return rc;
-}
-
-
-static void my_free(const memcached_st *ptr __attribute__((unused)), void *mem, void *context)
-{
-  (void) context;
-#ifdef HARD_MALLOC_TESTS
-  void *real_ptr= (mem == NULL) ? mem : (void*)((caddr_t)mem - 8);
-  free(real_ptr);
-#else
-  free(mem);
-#endif
-}
-
-
-static void *my_malloc(const memcached_st *ptr __attribute__((unused)), const size_t size, void *context)
-{
-  (void)context;
-#ifdef HARD_MALLOC_TESTS
-  void *ret= malloc(size + 8);
-  if (ret != NULL)
-  {
-    ret= (void*)((caddr_t)ret + 8);
-  }
-#else
-  void *ret= malloc(size);
-#endif
-
-  if (ret != NULL)
-  {
-    memset(ret, 0xff, size);
-  }
-
-  return ret;
-}
-
-
-static void *my_realloc(const memcached_st *ptr __attribute__((unused)), void *mem, const size_t size, void *context)
-{
-  (void)context;
-#ifdef HARD_MALLOC_TESTS
-  void *real_ptr= (mem == NULL) ? NULL : (void*)((caddr_t)mem - 8);
-  void *nmem= realloc(real_ptr, size + 8);
-
-  void *ret= NULL;
-  if (nmem != NULL)
-  {
-    ret= (void*)((caddr_t)nmem + 8);
-  }
-
-  return ret;
-#else
-  return realloc(mem, size);
-#endif
-}
-
-
-static void *my_calloc(const memcached_st *ptr __attribute__((unused)), size_t nelem, const size_t size, void *context)
-{
-  (void)context;
-#ifdef HARD_MALLOC_TESTS
-  void *mem= my_malloc(ptr, nelem * size);
-  if (mem)
-  {
-    memset(mem, 0, nelem * size);
-  }
-
-  return mem;
-#else
-  return calloc(nelem, size);
-#endif
-}
-
-
-static test_return_t set_prefix(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "mine";
-  char *value;
-
-  /* Make sure be default none exists */
-  value= memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
-  test_true(rc == MEMCACHED_FAILURE);
-
-  /* Test a clean set */
-  rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, (void *)key);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
-  test_true(memcmp(value, key, 4) == 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /* Test that we can turn it off */
-  rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
-  test_true(rc == MEMCACHED_FAILURE);
-
-  /* Now setup for main test */
-  rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, (void *)key);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memcmp(value, key, 4) == 0);
-
-  /* Set to Zero, and then Set to something too large */
-  {
-    char long_key[255];
-    memset(long_key, 0, 255);
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    value= memcached_callback_get(memc, MEMCACHED_CALLBACK_PREFIX_KEY, &rc);
-    test_true(rc == MEMCACHED_FAILURE);
-    test_true(value == NULL);
-
-    /* Test a long key for failure */
-    /* TODO, extend test to determine based on setting, what result should be */
-    strcpy(long_key, "Thisismorethentheallottednumberofcharacters");
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    //test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    /* Now test a key with spaces (which will fail from long key, since bad key is not set) */
-    strcpy(long_key, "This is more then the allotted number of characters");
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-
-    /* Test for a bad prefix, but with a short key */
-    rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_VERIFY_KEY, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    strcpy(long_key, "dog cat");
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_PREFIX_KEY, long_key);
-    test_true(rc == MEMCACHED_BAD_KEY_PROVIDED);
-  }
-
-  return TEST_SUCCESS;
-}
-
-
-#ifdef MEMCACHED_ENABLE_DEPRECATED
-static test_return_t deprecated_set_memory_alloc(memcached_st *memc)
-{
-  void *test_ptr= NULL;
-  void *cb_ptr= NULL;
-  {
-    memcached_malloc_fn malloc_cb=
-      (memcached_malloc_fn)my_malloc;
-    cb_ptr= *(void **)&malloc_cb;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_MALLOC_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(test_ptr == cb_ptr);
-  }
-
-  {
-    memcached_realloc_fn realloc_cb=
-      (memcached_realloc_fn)my_realloc;
-    cb_ptr= *(void **)&realloc_cb;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_REALLOC_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(test_ptr == cb_ptr);
-  }
-
-  {
-    memcached_free_fn free_cb=
-      (memcached_free_fn)my_free;
-    cb_ptr= *(void **)&free_cb;
-    memcached_return_t rc;
-
-    rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, cb_ptr);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_ptr= memcached_callback_get(memc, MEMCACHED_CALLBACK_FREE_FUNCTION, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(test_ptr == cb_ptr);
-  }
-
-  return TEST_SUCCESS;
-}
-#endif
-
-
-static test_return_t set_memory_alloc(memcached_st *memc)
-{
-  memcached_return_t rc;
-  rc= memcached_set_memory_allocators(memc, NULL, my_free,
-                                      my_realloc, my_calloc, NULL);
-  test_true(rc == MEMCACHED_FAILURE);
-
-  rc= memcached_set_memory_allocators(memc, my_malloc, my_free,
-                                      my_realloc, my_calloc, NULL);
-
-  memcached_malloc_fn mem_malloc;
-  memcached_free_fn mem_free;
-  memcached_realloc_fn mem_realloc;
-  memcached_calloc_fn mem_calloc;
-  memcached_get_memory_allocators(memc, &mem_malloc, &mem_free,
-                                  &mem_realloc, &mem_calloc);
-
-  test_true(mem_malloc == my_malloc);
-  test_true(mem_realloc == my_realloc);
-  test_true(mem_calloc == my_calloc);
-  test_true(mem_free == my_free);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t enable_consistent_crc(memcached_st *memc)
-{
-  test_return_t rc;
-  memcached_server_distribution_t value= MEMCACHED_DISTRIBUTION_CONSISTENT;
-  memcached_hash_t hash;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, value);
-  if ((rc= pre_crc(memc)) != TEST_SUCCESS)
-    return rc;
-
-  value= (memcached_server_distribution_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION);
-  test_true(value == MEMCACHED_DISTRIBUTION_CONSISTENT);
-
-  hash= (memcached_hash_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
-
-  if (hash != MEMCACHED_HASH_CRC)
-    return TEST_SKIPPED;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t enable_consistent_hsieh(memcached_st *memc)
-{
-  test_return_t rc;
-  memcached_server_distribution_t value= MEMCACHED_DISTRIBUTION_CONSISTENT;
-  memcached_hash_t hash;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, value);
-  if ((rc= pre_hsieh(memc)) != TEST_SUCCESS)
-    return rc;
-
-  value= (memcached_server_distribution_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION);
-  test_true(value == MEMCACHED_DISTRIBUTION_CONSISTENT);
-
-  hash= (memcached_hash_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_HASH);
-
-  if (hash != MEMCACHED_HASH_HSIEH)
-    return TEST_SKIPPED;
-
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t enable_cas(memcached_st *memc)
-{
-  unsigned int set= 1;
-
-  if (libmemcached_util_version_check(memc, 1, 2, 4))
-  {
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, set);
-
-    return TEST_SUCCESS;
-  }
-
-  return TEST_SKIPPED;
-}
-
-static test_return_t check_for_1_2_3(memcached_st *memc)
-{
-  memcached_version(memc);
-
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-
-  if ((instance->major_version >= 1 && (instance->minor_version == 2 && instance->micro_version >= 4))
-      || instance->minor_version > 2)
-  {
-    return TEST_SUCCESS;
-  }
-
-  return TEST_SKIPPED;
-}
-
-static test_return_t pre_unix_socket(memcached_st *memc)
-{
-  memcached_return_t rc;
-  struct stat buf;
-
-  memcached_servers_reset(memc);
-
-  if (stat("/tmp/memcached.socket", &buf))
-    return TEST_SKIPPED;
-
-  rc= memcached_server_add_unix_socket_with_weight(memc, "/tmp/memcached.socket", 0);
-
-  return ( rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_FAILURE );
-}
-
-static test_return_t pre_nodelay(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 0);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 0);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t pre_settimer(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t poll_timeout(memcached_st *memc)
-{
-  size_t timeout;
-
-  timeout= 100;
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, timeout);
-
-  timeout= (size_t)memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT);
-
-  test_true(timeout == 100);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t noreply_test(memcached_st *memc)
-{
-  memcached_return_t ret;
-  ret= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1);
-  test_true(ret == MEMCACHED_SUCCESS);
-  ret= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
-  test_true(ret == MEMCACHED_SUCCESS);
-  ret= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS, 1);
-  test_true(ret == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NOREPLY) == 1);
-  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS) == 1);
-  test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_SUPPORT_CAS) == 1);
-
-  for (int count=0; count < 5; ++count)
-  {
-    for (size_t x= 0; x < 100; ++x)
-    {
-      char key[10];
-      size_t len= (size_t)sprintf(key, "%zu", x);
-      switch (count)
-      {
-      case 0:
-        ret= memcached_add(memc, key, len, key, len, 0, 0);
-        break;
-      case 1:
-        ret= memcached_replace(memc, key, len, key, len, 0, 0);
-        break;
-      case 2:
-        ret= memcached_set(memc, key, len, key, len, 0, 0);
-        break;
-      case 3:
-        ret= memcached_append(memc, key, len, key, len, 0, 0);
-        break;
-      case 4:
-        ret= memcached_prepend(memc, key, len, key, len, 0, 0);
-        break;
-      default:
-        test_true(count);
-        break;
-      }
-      test_true(ret == MEMCACHED_SUCCESS || ret == MEMCACHED_BUFFERED);
-    }
-
-    /*
-    ** NOTE: Don't ever do this in your code! this is not a supported use of the
-    ** API and is _ONLY_ done this way to verify that the library works the
-    ** way it is supposed to do!!!!
-    */
-    int no_msg=0;
-    for (uint32_t x= 0; x < memcached_server_count(memc); ++x)
-    {
-      memcached_server_instance_st instance=
-        memcached_server_instance_by_position(memc, x);
-      no_msg+=(int)(instance->cursor_active);
-    }
-
-    test_true(no_msg == 0);
-    test_true(memcached_flush_buffers(memc) == MEMCACHED_SUCCESS);
-
-    /*
-     ** Now validate that all items was set properly!
-     */
-    for (size_t x= 0; x < 100; ++x)
-    {
-      char key[10];
-
-      size_t len= (size_t)sprintf(key, "%zu", x);
-      size_t length;
-      uint32_t flags;
-      char* value=memcached_get(memc, key, strlen(key),
-                                &length, &flags, &ret);
-      test_true(ret == MEMCACHED_SUCCESS && value != NULL);
-      switch (count)
-      {
-      case 0: /* FALLTHROUGH */
-      case 1: /* FALLTHROUGH */
-      case 2:
-        test_true(strncmp(value, key, len) == 0);
-        test_true(len == length);
-        break;
-      case 3:
-        test_true(length == len * 2);
-        break;
-      case 4:
-        test_true(length == len * 3);
-        break;
-      default:
-        test_true(count);
-        break;
-      }
-      free(value);
-    }
-  }
-
-  /* Try setting an illegal cas value (should not return an error to
-   * the caller (because we don't expect a return message from the server)
-   */
-  const char* keys[]= {"0"};
-  size_t lengths[]= {1};
-  size_t length;
-  uint32_t flags;
-  memcached_result_st results_obj;
-  memcached_result_st *results;
-  ret= memcached_mget(memc, keys, lengths, 1);
-  test_true(ret == MEMCACHED_SUCCESS);
-
-  results= memcached_result_create(memc, &results_obj);
-  test_true(results);
-  results= memcached_fetch_result(memc, &results_obj, &ret);
-  test_true(results);
-  test_true(ret == MEMCACHED_SUCCESS);
-  uint64_t cas= memcached_result_cas(results);
-  memcached_result_free(&results_obj);
-
-  ret= memcached_cas(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0, cas);
-  test_true(ret == MEMCACHED_SUCCESS);
-
-  /*
-   * The item will have a new cas value, so try to set it again with the old
-   * value. This should fail!
-   */
-  ret= memcached_cas(memc, keys[0], lengths[0], keys[0], lengths[0], 0, 0, cas);
-  test_true(ret == MEMCACHED_SUCCESS);
-  test_true(memcached_flush_buffers(memc) == MEMCACHED_SUCCESS);
-  char* value=memcached_get(memc, keys[0], lengths[0], &length, &flags, &ret);
-  test_true(ret == MEMCACHED_SUCCESS && value != NULL);
-  free(value);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t analyzer_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_stat_st *memc_stat;
-  memcached_analysis_st *report;
-
-  memc_stat= memcached_stat(memc, NULL, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(memc_stat);
-
-  report= memcached_analyze(memc, memc_stat, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(report);
-
-  free(report);
-  memcached_stat_free(NULL, memc_stat);
-
-  return TEST_SUCCESS;
-}
-
-/* Count the objects */
-static memcached_return_t callback_dump_counter(const memcached_st *ptr __attribute__((unused)),
-                                                const char *key __attribute__((unused)),
-                                                size_t key_length __attribute__((unused)),
-                                                void *context)
-{
-  size_t *counter= (size_t *)context;
-
-  *counter= *counter + 1;
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t dump_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  size_t counter= 0;
-  memcached_dump_fn callbacks[1];
-  test_return_t main_rc;
-
-  callbacks[0]= &callback_dump_counter;
-
-  /* No support for Binary protocol yet */
-  if (memc->flags.binary_protocol)
-    return TEST_SUCCESS;
-
-  main_rc= set_test3(memc);
-
-  test_true (main_rc == TEST_SUCCESS);
-
-  rc= memcached_dump(memc, callbacks, (void *)&counter, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /* We may have more then 32 if our previous flush has not completed */
-  test_true(counter >= 32);
-
-  return TEST_SUCCESS;
-}
-
-#ifdef HAVE_LIBMEMCACHEDUTIL
-static void* connection_release(void *arg)
-{
-  struct {
-    memcached_pool_st* pool;
-    memcached_st* mmc;
-  } *resource= arg;
-
-  usleep(250);
-  assert(memcached_pool_push(resource->pool, resource->mmc) == MEMCACHED_SUCCESS);
-  return arg;
-}
-
-static test_return_t connection_pool_test(memcached_st *memc)
-{
-  memcached_pool_st* pool= memcached_pool_create(memc, 5, 10);
-  test_true(pool != NULL);
-  memcached_st* mmc[10];
-  memcached_return_t rc;
-
-  for (size_t x= 0; x < 10; ++x)
-  {
-    mmc[x]= memcached_pool_pop(pool, false, &rc);
-    test_true(mmc[x] != NULL);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  test_true(memcached_pool_pop(pool, false, &rc) == NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  pthread_t tid;
-  struct {
-    memcached_pool_st* pool;
-    memcached_st* mmc;
-  } item= { .pool = pool, .mmc = mmc[9] };
-  pthread_create(&tid, NULL, connection_release, &item);
-  mmc[9]= memcached_pool_pop(pool, true, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  pthread_join(tid, NULL);
-  test_true(mmc[9] == item.mmc);
-  const char *key= "key";
-  size_t keylen= strlen(key);
-
-  // verify that I can do ops with all connections
-  rc= memcached_set(mmc[0], key, keylen, "0", 1, 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  for (size_t x= 0; x < 10; ++x)
-  {
-    uint64_t number_value;
-    rc= memcached_increment(mmc[x], key, keylen, 1, &number_value);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(number_value == (x+1));
-  }
-
-  // Release them..
-  for (size_t x= 0; x < 10; ++x)
-  {
-    test_true(memcached_pool_push(pool, mmc[x]) == MEMCACHED_SUCCESS);
-  }
-
-
-  /* verify that I can set behaviors on the pool when I don't have all
-   * of the connections in the pool. It should however be enabled
-   * when I push the item into the pool
-   */
-  mmc[0]= memcached_pool_pop(pool, false, &rc);
-  test_true(mmc[0] != NULL);
-
-  rc= memcached_pool_behavior_set(pool, MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, 9999);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  mmc[1]= memcached_pool_pop(pool, false, &rc);
-  test_true(mmc[1] != NULL);
-
-  test_true(memcached_behavior_get(mmc[1], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK) == 9999);
-  test_true(memcached_pool_push(pool, mmc[1]) == MEMCACHED_SUCCESS);
-  test_true(memcached_pool_push(pool, mmc[0]) == MEMCACHED_SUCCESS);
-
-  mmc[0]= memcached_pool_pop(pool, false, &rc);
-  test_true(memcached_behavior_get(mmc[0], MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK) == 9999);
-  test_true(memcached_pool_push(pool, mmc[0]) == MEMCACHED_SUCCESS);
-
-
-  test_true(memcached_pool_destroy(pool) == memc);
-  return TEST_SUCCESS;
-}
-
-static test_return_t util_version_test(memcached_st *memc)
-{
-  bool if_successful;
-
-  if_successful= libmemcached_util_version_check(memc, 0, 0, 0);
-  test_true(if_successful == true);
-
-  if_successful= libmemcached_util_version_check(memc, 9, 9, 9);
-  test_true(if_successful == false);
-
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-
-  memcached_version(memc);
-
-  // We only use one binary when we test, so this should be just fine.
-  if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, instance->micro_version);
-  test_true(if_successful == true);
-
-  if (instance->micro_version > 0)
-    if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, (uint8_t)(instance->micro_version -1));
-  else if (instance->minor_version > 0)
-    if_successful= libmemcached_util_version_check(memc, instance->major_version, (uint8_t)(instance->minor_version - 1), instance->micro_version);
-  else if (instance->major_version > 0)
-    if_successful= libmemcached_util_version_check(memc, (uint8_t)(instance->major_version -1), instance->minor_version, instance->micro_version);
-
-  test_true(if_successful == true);
-
-  if (instance->micro_version > 0)
-    if_successful= libmemcached_util_version_check(memc, instance->major_version, instance->minor_version, (uint8_t)(instance->micro_version +1));
-  else if (instance->minor_version > 0)
-    if_successful= libmemcached_util_version_check(memc, instance->major_version, (uint8_t)(instance->minor_version +1), instance->micro_version);
-  else if (instance->major_version > 0)
-    if_successful= libmemcached_util_version_check(memc, (uint8_t)(instance->major_version +1), instance->minor_version, instance->micro_version);
-
-  test_true(if_successful == false);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t ping_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-
-  // Test both the version that returns a code, and the one that does not.
-  test_true(libmemcached_util_ping(memcached_server_name(instance),
-                                   memcached_server_port(instance), NULL));
-
-  test_true(libmemcached_util_ping(memcached_server_name(instance),
-                                   memcached_server_port(instance), &rc));
-
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-#endif
-
-static test_return_t replication_set_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_st *memc_clone= memcached_clone(NULL, memc);
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0);
-
-  rc= memcached_set(memc, "bubba", 5, "0", 1, 0, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  /*
-  ** We are using the quiet commands to store the replicas, so we need
-  ** to ensure that all of them are processed before we can continue.
-  ** In the test we go directly from storing the object to trying to
-  ** receive the object from all of the different servers, so we
-  ** could end up in a race condition (the memcached server hasn't yet
-  ** processed the quiet command from the replication set when it process
-  ** the request from the other client (created by the clone)). As a
-  ** workaround for that we call memcached_quit to send the quit command
-  ** to the server and wait for the response ;-) If you use the test code
-  ** as an example for your own code, please note that you shouldn't need
-  ** to do this ;-)
-  */
-  memcached_quit(memc);
-
-  /*
-  ** "bubba" should now be stored on all of our servers. We don't have an
-  ** easy to use API to address each individual server, so I'll just iterate
-  ** through a bunch of "master keys" and I should most likely hit all of the
-  ** servers...
-  */
-  for (int x= 'a'; x <= 'z'; ++x)
-  {
-    char key[2]= { [0]= (char)x };
-    size_t len;
-    uint32_t flags;
-    char *val= memcached_get_by_key(memc_clone, key, 1, "bubba", 5,
-                                    &len, &flags, &rc);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(val != NULL);
-    free(val);
-  }
-
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t replication_get_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-
-  /*
-   * Don't do the following in your code. I am abusing the internal details
-   * within the library, and this is not a supported interface.
-   * This is to verify correct behavior in the library
-   */
-  for (uint32_t host= 0; host < memcached_server_count(memc); ++host)
-  {
-    memcached_st *memc_clone= memcached_clone(NULL, memc);
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc_clone, host);
-
-    ((memcached_server_write_instance_st)instance)->port= 0;
-
-    for (int x= 'a'; x <= 'z'; ++x)
-    {
-      char key[2]= { [0]= (char)x };
-      size_t len;
-      uint32_t flags;
-      char *val= memcached_get_by_key(memc_clone, key, 1, "bubba", 5,
-                                      &len, &flags, &rc);
-      test_true(rc == MEMCACHED_SUCCESS);
-      test_true(val != NULL);
-      free(val);
-    }
-
-    memcached_free(memc_clone);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t replication_mget_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_st *memc_clone= memcached_clone(NULL, memc);
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 0);
-
-  const char *keys[]= { "bubba", "key1", "key2", "key3" };
-  size_t len[]= { 5, 4, 4, 4 };
-
-  for (size_t x= 0; x< 4; ++x)
-  {
-    rc= memcached_set(memc, keys[x], len[x], "0", 1, 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  /*
-  ** We are using the quiet commands to store the replicas, so we need
-  ** to ensure that all of them are processed before we can continue.
-  ** In the test we go directly from storing the object to trying to
-  ** receive the object from all of the different servers, so we
-  ** could end up in a race condition (the memcached server hasn't yet
-  ** processed the quiet command from the replication set when it process
-  ** the request from the other client (created by the clone)). As a
-  ** workaround for that we call memcached_quit to send the quit command
-  ** to the server and wait for the response ;-) If you use the test code
-  ** as an example for your own code, please note that you shouldn't need
-  ** to do this ;-)
-  */
-  memcached_quit(memc);
-
-  /*
-   * Don't do the following in your code. I am abusing the internal details
-   * within the library, and this is not a supported interface.
-   * This is to verify correct behavior in the library
-   */
-  memcached_result_st result_obj;
-  for (uint32_t host= 0; host < memc_clone->number_of_hosts; host++)
-  {
-    memcached_st *new_clone= memcached_clone(NULL, memc);
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(new_clone, host);
-    ((memcached_server_write_instance_st)instance)->port= 0;
-
-    for (int x= 'a'; x <= 'z'; ++x)
-    {
-      char key[2]= { [0]= (char)x, [1]= 0 };
-
-      rc= memcached_mget_by_key(new_clone, key, 1, keys, len, 4);
-      test_true(rc == MEMCACHED_SUCCESS);
-
-      memcached_result_st *results= memcached_result_create(new_clone, &result_obj);
-      test_true(results);
-
-      int hits= 0;
-      while ((results= memcached_fetch_result(new_clone, &result_obj, &rc)) != NULL)
-      {
-        hits++;
-      }
-      test_true(hits == 4);
-      memcached_result_free(&result_obj);
-    }
-
-    memcached_free(new_clone);
-  }
-
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t replication_randomize_mget_test(memcached_st *memc)
-{
-  memcached_result_st result_obj;
-  memcached_return_t rc;
-  memcached_st *memc_clone= memcached_clone(NULL, memc);
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 3);
-  memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ, 1);
-
-  const char *keys[]= { "key1", "key2", "key3", "key4", "key5", "key6", "key7" };
-  size_t len[]= { 4, 4, 4, 4, 4, 4, 4 };
-
-  for (size_t x= 0; x< 7; ++x)
-  {
-    rc= memcached_set(memc, keys[x], len[x], "1", 1, 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  memcached_quit(memc);
-
-  for (size_t x= 0; x< 7; ++x)
-  {
-    const char key[2]= { [0]= (const char)x };
-
-    rc= memcached_mget_by_key(memc_clone, key, 1, keys, len, 7);
-    test_true(rc == MEMCACHED_SUCCESS);
-
-    memcached_result_st *results= memcached_result_create(memc_clone, &result_obj);
-    test_true(results);
-
-    int hits= 0;
-    while ((results= memcached_fetch_result(memc_clone, &result_obj, &rc)) != NULL)
-    {
-      ++hits;
-    }
-    test_true(hits == 7);
-    memcached_result_free(&result_obj);
-  }
-  memcached_free(memc_clone);
-  return TEST_SUCCESS;
-}
-
-static test_return_t replication_delete_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_st *memc_clone= memcached_clone(NULL, memc);
-  /* Delete the items from all of the servers except 1 */
-  uint64_t repl= memcached_behavior_get(memc,
-                                        MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, --repl);
-
-  const char *keys[]= { "bubba", "key1", "key2", "key3" };
-  size_t len[]= { 5, 4, 4, 4 };
-
-  for (size_t x= 0; x< 4; ++x)
-  {
-    rc= memcached_delete_by_key(memc, keys[0], len[0], keys[x], len[x], 0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  /*
-   * Don't do the following in your code. I am abusing the internal details
-   * within the library, and this is not a supported interface.
-   * This is to verify correct behavior in the library
-   */
-  uint32_t hash= memcached_generate_hash(memc, keys[0], len[0]);
-  for (uint32_t x= 0; x < (repl + 1); ++x)
-  {
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc_clone, x);
-
-    ((memcached_server_write_instance_st)instance)->port= 0;
-    if (++hash == memc_clone->number_of_hosts)
-      hash= 0;
-  }
-
-  memcached_result_st result_obj;
-  for (uint32_t host= 0; host < memc_clone->number_of_hosts; ++host)
-  {
-    for (size_t x= 'a'; x <= 'z'; ++x)
-    {
-      const char key[2]= { [0]= (const char)x };
-
-      rc= memcached_mget_by_key(memc_clone, key, 1, keys, len, 4);
-      test_true(rc == MEMCACHED_SUCCESS);
-
-      memcached_result_st *results= memcached_result_create(memc_clone, &result_obj);
-      test_true(results);
-
-      int hits= 0;
-      while ((results= memcached_fetch_result(memc_clone, &result_obj, &rc)) != NULL)
-      {
-        ++hits;
-      }
-      test_true(hits == 4);
-      memcached_result_free(&result_obj);
-    }
-  }
-  memcached_free(memc_clone);
-
-  return TEST_SUCCESS;
-}
-
-#if 0
-static test_return_t hash_sanity_test (memcached_st *memc)
-{
-  (void)memc;
-
-  assert(MEMCACHED_HASH_DEFAULT == MEMCACHED_HASH_DEFAULT);
-  assert(MEMCACHED_HASH_MD5 == MEMCACHED_HASH_MD5);
-  assert(MEMCACHED_HASH_CRC == MEMCACHED_HASH_CRC);
-  assert(MEMCACHED_HASH_FNV1_64 == MEMCACHED_HASH_FNV1_64);
-  assert(MEMCACHED_HASH_FNV1A_64 == MEMCACHED_HASH_FNV1A_64);
-  assert(MEMCACHED_HASH_FNV1_32 == MEMCACHED_HASH_FNV1_32);
-  assert(MEMCACHED_HASH_FNV1A_32 == MEMCACHED_HASH_FNV1A_32);
-#ifdef HAVE_HSIEH_HASH
-  assert(MEMCACHED_HASH_HSIEH == MEMCACHED_HASH_HSIEH);
-#endif
-  assert(MEMCACHED_HASH_MURMUR == MEMCACHED_HASH_MURMUR);
-  assert(MEMCACHED_HASH_JENKINS == MEMCACHED_HASH_JENKINS);
-  assert(MEMCACHED_HASH_MAX == MEMCACHED_HASH_MAX);
-
-  return TEST_SUCCESS;
-}
-#endif
-
-static test_return_t hsieh_avaibility_test (memcached_st *memc)
-{
-  memcached_return_t expected_rc= MEMCACHED_FAILURE;
-#ifdef HAVE_HSIEH_HASH
-  expected_rc= MEMCACHED_SUCCESS;
-#endif
-  memcached_return_t rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH,
-                                                (uint64_t)MEMCACHED_HASH_HSIEH);
-  test_true(rc == expected_rc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t one_at_a_time_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_DEFAULT);
-    test_true(one_at_a_time_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t md5_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MD5);
-    test_true(md5_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t crc_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_CRC);
-    test_true(crc_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1_64_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1_64);
-    test_true(fnv1_64_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1a_64_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1A_64);
-    test_true(fnv1a_64_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1_32_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1_32);
-    test_true(fnv1_32_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t fnv1a_32_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_FNV1A_32);
-    test_true(fnv1a_32_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t hsieh_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_HSIEH);
-    test_true(hsieh_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t murmur_run (memcached_st *memc __attribute__((unused)))
-{
-#ifdef WORDS_BIGENDIAN
-  return TEST_SKIPPED;
-#else
-  uint32_t x;
-  const char **ptr;
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_MURMUR);
-    test_true(murmur_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-#endif
-}
-
-static test_return_t jenkins_run (memcached_st *memc __attribute__((unused)))
-{
-  uint32_t x;
-  const char **ptr;
-
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash_value(*ptr, strlen(*ptr), MEMCACHED_HASH_JENKINS);
-    test_true(jenkins_values[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-static uint32_t hash_md5_test_function(const char *string, size_t string_length, void *context)
-{
-  (void)context;
-  return libhashkit_md5(string, string_length);
-}
-
-static uint32_t hash_crc_test_function(const char *string, size_t string_length, void *context)
-{
-  (void)context;
-  return libhashkit_crc32(string, string_length);
-}
-
-static test_return_t memcached_get_hashkit_test (memcached_st *memc)
-{
-  uint32_t x;
-  const char **ptr;
-  const hashkit_st *kit;
-  hashkit_st new_kit;
-  hashkit_return_t hash_rc;
-
-  uint32_t md5_hosts[]= {4U, 1U, 0U, 1U, 4U, 2U, 0U, 3U, 0U, 0U, 3U, 1U, 0U, 0U, 1U, 3U, 0U, 0U, 0U, 3U, 1U, 0U, 4U, 4U, 3U};
-  uint32_t crc_hosts[]= {2U, 4U, 1U, 0U, 2U, 4U, 4U, 4U, 1U, 2U, 3U, 4U, 3U, 4U, 1U, 3U, 3U, 2U, 0U, 0U, 0U, 1U, 2U, 4U, 0U};
-
-  kit= memcached_get_hashkit(memc);
-
-  hashkit_clone(&new_kit, kit);
-  hash_rc= hashkit_set_custom_function(&new_kit, hash_md5_test_function, NULL);
-  test_true(hash_rc == HASHKIT_SUCCESS);
-
-  memcached_set_hashkit(memc, &new_kit);
-
-  /*
-    Verify Setting the hash.
-  */
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= hashkit_digest(kit, *ptr, strlen(*ptr));
-    test_true(md5_values[x] == hash_val);
-  }
-
-
-  /*
-    Now check memcached_st.
-  */
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash(memc, *ptr, strlen(*ptr));
-    test_true(md5_hosts[x] == hash_val);
-  }
-
-  hash_rc= hashkit_set_custom_function(&new_kit, hash_crc_test_function, NULL);
-  test_true(hash_rc == HASHKIT_SUCCESS);
-
-  memcached_set_hashkit(memc, &new_kit);
-
-  /*
-    Verify Setting the hash.
-  */
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= hashkit_digest(kit, *ptr, strlen(*ptr));
-    test_true(crc_values[x] == hash_val);
-  }
-
-  for (ptr= list_to_hash, x= 0; *ptr; ptr++, x++)
-  {
-    uint32_t hash_val;
-
-    hash_val= memcached_generate_hash(memc, *ptr, strlen(*ptr));
-    test_true(crc_hosts[x] == hash_val);
-  }
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Test case adapted from John Gorman <johngorman2@gmail.com> 
-
-  We are testing the error condition when we connect to a server via memcached_get() 
-  but find that the server is not available.
-*/
-static test_return_t memcached_get_MEMCACHED_ERRNO(memcached_st *memc)
-{
-  (void)memc;
-  memcached_st *tl_memc_h;
-  memcached_server_st *servers;
-
-  const char *key= "MemcachedLives";
-  size_t len;
-  uint32_t flags;
-  memcached_return rc;
-  char *value;
-
-  // Create a handle.
-  tl_memc_h= memcached_create(NULL);
-  servers= memcached_servers_parse("localhost:9898,localhost:9899"); // This server should not exist
-  memcached_server_push(tl_memc_h, servers);
-  memcached_server_list_free(servers);
-
-  // See if memcached is reachable.
-  value= memcached_get(tl_memc_h, key, strlen(key), &len, &flags, &rc);
-
-  test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_ERRNO);
-
-  memcached_free(tl_memc_h);
-
-  return TEST_SUCCESS;
-}
-
-/* 
-  We connect to a server which exists, but search for a key that does not exist.
-*/
-static test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
-{
-  const char *key= "MemcachedKeyNotEXIST";
-  size_t len;
-  uint32_t flags;
-  memcached_return rc;
-  char *value;
-
-  // See if memcached is reachable.
-  value= memcached_get(memc, key, strlen(key), &len, &flags, &rc);
-
-  test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
-
-  return TEST_SUCCESS;
-}
-
-/*
-  Test case adapted from John Gorman <johngorman2@gmail.com> 
-
-  We are testing the error condition when we connect to a server via memcached_get_by_key() 
-  but find that the server is not available.
-*/
-static test_return_t memcached_get_by_key_MEMCACHED_ERRNO(memcached_st *memc)
-{
-  (void)memc;
-  memcached_st *tl_memc_h;
-  memcached_server_st *servers;
-
-  const char *key= "MemcachedLives";
-  size_t len;
-  uint32_t flags;
-  memcached_return rc;
-  char *value;
-
-  // Create a handle.
-  tl_memc_h= memcached_create(NULL);
-  servers= memcached_servers_parse("localhost:9898,localhost:9899"); // This server should not exist
-  memcached_server_push(tl_memc_h, servers);
-  memcached_server_list_free(servers);
-
-  // See if memcached is reachable.
-  value= memcached_get_by_key(tl_memc_h, key, strlen(key), key, strlen(key), &len, &flags, &rc);
-
-  test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_ERRNO);
-
-  memcached_free(tl_memc_h);
-
-  return TEST_SUCCESS;
-}
-
-/* 
-  We connect to a server which exists, but search for a key that does not exist.
-*/
-static test_return_t memcached_get_by_key_MEMCACHED_NOTFOUND(memcached_st *memc)
-{
-  const char *key= "MemcachedKeyNotEXIST";
-  size_t len;
-  uint32_t flags;
-  memcached_return rc;
-  char *value;
-
-  // See if memcached is reachable.
-  value= memcached_get_by_key(memc, key, strlen(key), key, strlen(key), &len, &flags, &rc);
-
-  test_false(value);
-  test_true(len == 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
-
-  return TEST_SUCCESS;
-}
-
-
-static test_return_t ketama_compatibility_libmemcached(memcached_st *trash)
-{
-  memcached_return_t rc;
-  uint64_t value;
-  int x;
-  memcached_server_st *server_pool;
-  memcached_st *memc;
-
-  (void)trash;
-
-  memc= memcached_create(NULL);
-  test_true(memc);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA) == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get_distribution(memc) == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA);
-
-
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
-  memcached_server_push(memc, server_pool);
-
-  /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
-  test_strcmp(server_pool[0].hostname, "10.0.1.1");
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
-  test_strcmp(server_pool[2].hostname, "10.0.1.3");
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
-  test_strcmp(server_pool[7].hostname, "10.0.1.8");
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
-
-  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
-   * us test the boundary wraparound.
-   */
-  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->continuum[0].index);
-
-  /* verify the standard ketama set. */
-  for (x= 0; x < 99; x++)
-  {
-    uint32_t server_idx = memcached_generate_hash(memc, ketama_test_cases[x].key, strlen(ketama_test_cases[x].key));
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, server_idx);
-    const char *hostname = memcached_server_name(instance);
-
-    test_strcmp(hostname, ketama_test_cases[x].server);
-  }
-
-  memcached_server_list_free(server_pool);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t ketama_compatibility_spymemcached(memcached_st *trash)
-{
-  memcached_return_t rc;
-  uint64_t value;
-  int x;
-  memcached_server_st *server_pool;
-  memcached_st *memc;
-
-  (void)trash;
-
-  memc= memcached_create(NULL);
-  test_true(memc);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED);
-  test_true(value == 1);
-
-  test_true(memcached_behavior_set_distribution(memc, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY) == MEMCACHED_SUCCESS);
-  test_true(memcached_behavior_get_distribution(memc) == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY);
-
-  server_pool = memcached_servers_parse("10.0.1.1:11211 600,10.0.1.2:11211 300,10.0.1.3:11211 200,10.0.1.4:11211 350,10.0.1.5:11211 1000,10.0.1.6:11211 800,10.0.1.7:11211 950,10.0.1.8:11211 100");
-  memcached_server_push(memc, server_pool);
-
-  /* verify that the server list was parsed okay. */
-  test_true(memcached_server_count(memc) == 8);
-  test_strcmp(server_pool[0].hostname, "10.0.1.1");
-  test_true(server_pool[0].port == 11211);
-  test_true(server_pool[0].weight == 600);
-  test_strcmp(server_pool[2].hostname, "10.0.1.3");
-  test_true(server_pool[2].port == 11211);
-  test_true(server_pool[2].weight == 200);
-  test_strcmp(server_pool[7].hostname, "10.0.1.8");
-  test_true(server_pool[7].port == 11211);
-  test_true(server_pool[7].weight == 100);
-
-  /* VDEAAAAA hashes to fffcd1b5, after the last continuum point, and lets
-   * us test the boundary wraparound.
-   */
-  test_true(memcached_generate_hash(memc, (char *)"VDEAAAAA", 8) == memc->continuum[0].index);
-
-  /* verify the standard ketama set. */
-  for (x= 0; x < 99; x++)
-  {
-    uint32_t server_idx= memcached_generate_hash(memc, ketama_test_cases_spy[x].key, strlen(ketama_test_cases_spy[x].key));
-
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, server_idx);
-
-    const char *hostname= memcached_server_name(instance);
-
-    test_strcmp(hostname, ketama_test_cases_spy[x].server);
-  }
-
-  memcached_server_list_free(server_pool);
-  memcached_free(memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_434484(memcached_st *memc)
-{
-  test_return_t test_rc;
-  test_rc= pre_binary(memc);
-
-  if (test_rc != TEST_SUCCESS)
-    return test_rc;
-
-  memcached_return_t ret;
-  const char *key= "regression_bug_434484";
-  size_t keylen= strlen(key);
-
-  ret= memcached_append(memc, key, keylen, key, keylen, 0, 0);
-  test_true(ret == MEMCACHED_NOTSTORED);
-
-  size_t size= 2048 * 1024;
-  void *data= calloc(1, size);
-  test_true(data != NULL);
-  ret= memcached_set(memc, key, keylen, data, size, 0, 0);
-  test_true(ret == MEMCACHED_E2BIG);
-  free(data);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_434843(memcached_st *memc)
-{
-  test_return_t test_rc;
-  test_rc= pre_binary(memc);
-
-  if (test_rc != TEST_SUCCESS)
-    return test_rc;
-
-  memcached_return_t rc;
-  size_t counter= 0;
-  memcached_execute_fn callbacks[1]= { [0]= &callback_counter };
-
-  /*
-   * I only want to hit only _one_ server so I know the number of requests I'm
-   * sending in the pipleine to the server. Let's try to do a multiget of
-   * 1024 (that should satisfy most users don't you think?). Future versions
-   * will include a mget_execute function call if you need a higher number.
-   */
-  uint32_t number_of_hosts= memcached_server_count(memc);
-  memc->number_of_hosts= 1;
-  const size_t max_keys= 1024;
-  char **keys= calloc(max_keys, sizeof(char*));
-  size_t *key_length=calloc(max_keys, sizeof(size_t));
-
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-     char k[251];
-
-     key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%zu", x);
-     keys[x]= strdup(k);
-     test_true(keys[x] != NULL);
-  }
-
-  /*
-   * Run two times.. the first time we should have 100% cache miss,
-   * and the second time we should have 100% cache hits
-   */
-  for (size_t y= 0; y < 2; y++)
-  {
-    rc= memcached_mget(memc, (const char**)keys, key_length, max_keys);
-    test_true(rc == MEMCACHED_SUCCESS);
-    rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-
-    if (y == 0)
-    {
-      /* The first iteration should give me a 100% cache miss. verify that*/
-      char blob[1024]= { 0 };
-
-      test_true(counter == 0);
-
-      for (size_t x= 0; x < max_keys; ++x)
-      {
-        rc= memcached_add(memc, keys[x], key_length[x],
-                          blob, sizeof(blob), 0, 0);
-        test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-      }
-    }
-    else
-    {
-      /* Verify that we received all of the key/value pairs */
-       test_true(counter == max_keys);
-    }
-  }
-
-  /* Release allocated resources */
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    free(keys[x]);
-  }
-  free(keys);
-  free(key_length);
-
-  memc->number_of_hosts= number_of_hosts;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_434843_buffered(memcached_st *memc)
-{
-  memcached_return_t rc;
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return regression_bug_434843(memc);
-}
-
-static test_return_t regression_bug_421108(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  char *bytes= memcached_stat_get_value(memc, memc_stat, "bytes", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes != NULL);
-  char *bytes_read= memcached_stat_get_value(memc, memc_stat,
-                                             "bytes_read", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes_read != NULL);
-
-  char *bytes_written= memcached_stat_get_value(memc, memc_stat,
-                                                "bytes_written", &rc);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true(bytes_written != NULL);
-
-  test_true(strcmp(bytes, bytes_read) != 0);
-  test_true(strcmp(bytes, bytes_written) != 0);
-
-  /* Release allocated resources */
-  free(bytes);
-  free(bytes_read);
-  free(bytes_written);
-  memcached_stat_free(NULL, memc_stat);
-
-  return TEST_SUCCESS;
-}
-
-/*
- * The test case isn't obvious so I should probably document why
- * it works the way it does. Bug 442914 was caused by a bug
- * in the logic in memcached_purge (it did not handle the case
- * where the number of bytes sent was equal to the watermark).
- * In this test case, create messages so that we hit that case
- * and then disable noreply mode and issue a new command to
- * verify that it isn't stuck. If we change the format for the
- * delete command or the watermarks, we need to update this
- * test....
- */
-static test_return_t regression_bug_442914(memcached_st *memc)
-{
-  memcached_return_t rc;
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1);
-  test_true(rc == MEMCACHED_SUCCESS);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1);
-
-  uint32_t number_of_hosts= memcached_server_count(memc);
-  memc->number_of_hosts= 1;
-
-  char k[250];
-  size_t len;
-
-  for (uint32_t x= 0; x < 250; ++x)
-  {
-     len= (size_t)snprintf(k, sizeof(k), "%0250u", x);
-     rc= memcached_delete(memc, k, len, 0);
-     test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-  }
-
-  (void)snprintf(k, sizeof(k), "%037u", 251U);
-  len= strlen(k);
-
-  rc= memcached_delete(memc, k, len, 0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  rc= memcached_delete(memc, k, len, 0);
-  test_true(rc == MEMCACHED_NOTFOUND);
-
-  memc->number_of_hosts= number_of_hosts;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_447342(memcached_st *memc)
-{
-  memcached_server_instance_st instance_one;
-  memcached_server_instance_st instance_two;
-
-  if (memcached_server_count(memc) < 3 || pre_replication(memc) != MEMCACHED_SUCCESS)
-    return TEST_SKIPPED;
-
-  memcached_return_t rc;
-
-  rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, 2);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  const size_t max_keys= 100;
-  char **keys= calloc(max_keys, sizeof(char*));
-  size_t *key_length= calloc(max_keys, sizeof(size_t));
-
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    char k[251];
-
-    key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%zu", x);
-    keys[x]= strdup(k);
-    test_true(keys[x] != NULL);
-    rc= memcached_set(memc, k, key_length[x], k, key_length[x], 0, 0);
-    test_true(rc == MEMCACHED_SUCCESS);
-  }
-
-  /*
-  ** We are using the quiet commands to store the replicas, so we need
-  ** to ensure that all of them are processed before we can continue.
-  ** In the test we go directly from storing the object to trying to
-  ** receive the object from all of the different servers, so we
-  ** could end up in a race condition (the memcached server hasn't yet
-  ** processed the quiet command from the replication set when it process
-  ** the request from the other client (created by the clone)). As a
-  ** workaround for that we call memcached_quit to send the quit command
-  ** to the server and wait for the response ;-) If you use the test code
-  ** as an example for your own code, please note that you shouldn't need
-  ** to do this ;-)
-  */
-  memcached_quit(memc);
-
-  /* Verify that all messages are stored, and we didn't stuff too much
-   * into the servers
-   */
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  size_t counter= 0;
-  memcached_execute_fn callbacks[1]= { [0]= &callback_counter };
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-  /* Verify that we received all of the key/value pairs */
-  test_true(counter == max_keys);
-
-  memcached_quit(memc);
-  /*
-   * Don't do the following in your code. I am abusing the internal details
-   * within the library, and this is not a supported interface.
-   * This is to verify correct behavior in the library. Fake that two servers
-   * are dead..
-   */
-  instance_one= memcached_server_instance_by_position(memc, 0);
-  instance_two= memcached_server_instance_by_position(memc, 2);
-  in_port_t port0= instance_one->port;
-  in_port_t port2= instance_two->port;
-
-  ((memcached_server_write_instance_st)instance_one)->port= 0;
-  ((memcached_server_write_instance_st)instance_two)->port= 0;
-
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-  test_true(counter == (unsigned int)max_keys);
-
-  /* restore the memc handle */
-  ((memcached_server_write_instance_st)instance_one)->port= port0;
-  ((memcached_server_write_instance_st)instance_two)->port= port2;
-
-  memcached_quit(memc);
-
-  /* Remove half of the objects */
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    if (x & 1)
-    {
-      rc= memcached_delete(memc, keys[x], key_length[x], 0);
-      test_true(rc == MEMCACHED_SUCCESS);
-    }
-  }
-
-  memcached_quit(memc);
-  ((memcached_server_write_instance_st)instance_one)->port= 0;
-  ((memcached_server_write_instance_st)instance_two)->port= 0;
-
-  /* now retry the command, this time we should have cache misses */
-  rc= memcached_mget(memc, (const char* const *)keys, key_length, max_keys);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  counter= 0;
-  rc= memcached_fetch_execute(memc, callbacks, (void *)&counter, 1);
-  test_true(counter == (unsigned int)(max_keys >> 1));
-
-  /* Release allocated resources */
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    free(keys[x]);
-  }
-  free(keys);
-  free(key_length);
-
-  /* restore the memc handle */
-  ((memcached_server_write_instance_st)instance_one)->port= port0;
-  ((memcached_server_write_instance_st)instance_two)->port= port2;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_463297(memcached_st *memc)
-{
-  memcached_st *memc_clone= memcached_clone(NULL, memc); 
-  test_true(memc_clone != NULL); 
-  test_true(memcached_version(memc_clone) == MEMCACHED_SUCCESS); 
-
-  memcached_server_instance_st instance= 
-    memcached_server_instance_by_position(memc_clone, 0); 
-
-  if (instance->major_version > 1 || 
-      (instance->major_version == 1 && 
-       instance->minor_version > 2)) 
-  {
-    /* Binary protocol doesn't support deferred delete */
-    memcached_st *bin_clone= memcached_clone(NULL, memc);
-    test_true(bin_clone != NULL);
-    test_true(memcached_behavior_set(bin_clone, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1) == MEMCACHED_SUCCESS);
-    test_true(memcached_delete(bin_clone, "foo", 3, 1) == MEMCACHED_INVALID_ARGUMENTS);
-    memcached_free(bin_clone);
-
-    memcached_quit(memc_clone);
-
-    /* If we know the server version, deferred delete should fail
-     * with invalid arguments */
-    test_true(memcached_delete(memc_clone, "foo", 3, 1) == MEMCACHED_INVALID_ARGUMENTS);
-
-    /* If we don't know the server version, we should get a protocol error */
-    memcached_return_t rc= memcached_delete(memc, "foo", 3, 1);
-
-    /* but there is a bug in some of the memcached servers (1.4) that treats
-     * the counter as noreply so it doesn't send the proper error message
-   */
-    test_true(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR);
-
-    /* And buffered mode should be disabled and we should get protocol error */
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1) == MEMCACHED_SUCCESS);
-    rc= memcached_delete(memc, "foo", 3, 1);
-    test_true(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR);
-
-    /* Same goes for noreply... */
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 1) == MEMCACHED_SUCCESS);
-    rc= memcached_delete(memc, "foo", 3, 1);
-    test_true(rc == MEMCACHED_PROTOCOL_ERROR || rc == MEMCACHED_NOTFOUND || rc == MEMCACHED_CLIENT_ERROR);
-
-    /* but a normal request should go through (and be buffered) */
-    test_true((rc= memcached_delete(memc, "foo", 3, 0)) == MEMCACHED_BUFFERED);
-    test_true(memcached_flush_buffers(memc) == MEMCACHED_SUCCESS);
-
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0) == MEMCACHED_SUCCESS);
-    /* unbuffered noreply should be success */
-    test_true(memcached_delete(memc, "foo", 3, 0) == MEMCACHED_SUCCESS);
-    /* unbuffered with reply should be not found... */
-    test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, 0) == MEMCACHED_SUCCESS);
-    test_true(memcached_delete(memc, "foo", 3, 0) == MEMCACHED_NOTFOUND);
-  }
-
-  memcached_free(memc_clone);
-  return TEST_SUCCESS;
-}
-
-
-/* Test memcached_server_get_last_disconnect
- * For a working server set, shall be NULL
- * For a set of non existing server, shall not be NULL
- */
-static test_return_t test_get_last_disconnect(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_server_instance_st disconnected_server;
-
-  /* With the working set of server */
-  const char *key= "marmotte";
-  const char *value= "milka";
-
-  memcached_reset_last_disconnected_server(memc);
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-  disconnected_server = memcached_server_get_last_disconnect(memc);
-  test_true(disconnected_server == NULL);
-
-  /* With a non existing server */
-  memcached_st *mine;
-  memcached_server_st *servers;
-
-  const char *server_list= "localhost:9";
-
-  servers= memcached_servers_parse(server_list);
-  test_true(servers);
-  mine= memcached_create(NULL);
-  rc= memcached_server_push(mine, servers);
-  test_true(rc == MEMCACHED_SUCCESS);
-  memcached_server_list_free(servers);
-  test_true(mine);
-
-  rc= memcached_set(mine, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc != MEMCACHED_SUCCESS);
-
-  disconnected_server= memcached_server_get_last_disconnect(mine);
-  if (disconnected_server == NULL)
-  {
-    fprintf(stderr, "RC %s\n", memcached_strerror(mine, rc));
-    abort();
-  }
-  test_true(disconnected_server != NULL);
-  test_true(memcached_server_port(disconnected_server)== 9);
-  test_true(strncmp(memcached_server_name(disconnected_server),"localhost",9) == 0);
-
-  memcached_quit(mine);
-  memcached_free(mine);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t test_verbosity(memcached_st *memc)
-{
-  memcached_verbosity(memc, 3);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t test_server_failure(memcached_st *memc)
-{
-  memcached_st *local_memc;
-  memcached_server_instance_st instance= memcached_server_instance_by_position(memc, 0);
-
-  local_memc= memcached_create(NULL);
-
-  memcached_server_add(local_memc, memcached_server_name(instance), memcached_server_port(instance));
-  memcached_behavior_set(local_memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 2);
-
-  uint32_t server_count= memcached_server_count(local_memc);
-
-  test_true(server_count == 1);
-
-  // Disable the server
-  instance= memcached_server_instance_by_position(local_memc, 0);
-  ((memcached_server_write_instance_st)instance)->server_failure_counter= 2;
-
-  memcached_return_t rc;
-  rc= memcached_set(local_memc, "foo", strlen("foo"),
-                    NULL, 0,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SERVER_MARKED_DEAD);
-
-  ((memcached_server_write_instance_st)instance)->server_failure_counter= 0;
-  rc= memcached_set(local_memc, "foo", strlen("foo"),
-                    NULL, 0,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-
-  memcached_free(local_memc);
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t test_cull_servers(memcached_st *memc)
-{
-  uint32_t count = memcached_server_count(memc);
-
-  // Do not do this in your code, it is not supported.
-  memc->servers[1].state.is_dead= true;
-  memc->state.is_time_for_rebuild= true;
-
-  uint32_t new_count= memcached_server_count(memc);
-  test_true(count == new_count);
-
-#if 0
-  test_true(count == new_count + 1 );
-#endif
-
-  return TEST_SUCCESS;
-}
-
-
-static memcached_return_t stat_printer(memcached_server_instance_st server,
-                                       const char *key, size_t key_length,
-                                       const char *value, size_t value_length,
-                                       void *context)
-{
-  (void)server;
-  (void)context;
-  (void)key;
-  (void)key_length;
-  (void)value;
-  (void)value_length;
-
-  return MEMCACHED_SUCCESS;
-}
-
-static test_return_t memcached_stat_execute_test(memcached_st *memc)
-{
-  memcached_return_t rc= memcached_stat_execute(memc, NULL, stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_stat_execute(memc, "slabs", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_stat_execute(memc, "items", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_stat_execute(memc, "sizes", stat_printer, NULL);
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  return TEST_SUCCESS;
-}
-
-/*
- * This test ensures that the failure counter isn't incremented during
- * normal termination of the memcached instance.
- */
-static test_return_t wrong_failure_counter_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  memcached_server_instance_st instance;
-
-  /* Set value to force connection to the server */
-  const char *key= "marmotte";
-  const char *value= "milka";
-
-  /*
-   * Please note that I'm abusing the internal structures in libmemcached
-   * in a non-portable way and you shouldn't be doing this. I'm only
-   * doing this in order to verify that the library works the way it should
-   */
-  uint32_t number_of_hosts= memcached_server_count(memc);
-  memc->number_of_hosts= 1;
-
-  /* Ensure that we are connected to the server by setting a value */
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-
-  instance= memcached_server_instance_by_position(memc, 0);
-  /* The test is to see that the memcached_quit doesn't increase the
-   * the server failure conter, so let's ensure that it is zero
-   * before sending quit
-   */
-  ((memcached_server_write_instance_st)instance)->server_failure_counter= 0;
-
-  memcached_quit(memc);
-
-  /* Verify that it memcached_quit didn't increment the failure counter
-   * Please note that this isn't bullet proof, because an error could
-   * occur...
-   */
-  test_true(instance->server_failure_counter == 0);
-
-  /* restore the instance */
-  memc->number_of_hosts= number_of_hosts;
-
-  return TEST_SUCCESS;
-}
-
-
-
-
-/*
- * Test that ensures mget_execute does not end into recursive calls that finally fails
- */
-static test_return_t regression_bug_490486(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 1);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 1);
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 3600);
-
-#ifdef __APPLE__
-  return TEST_SKIPPED; // My MAC can't handle this test
-#endif
-
-  /*
-   * I only want to hit _one_ server so I know the number of requests I'm
-   * sending in the pipeline.
-   */
-  uint32_t number_of_hosts= memc->number_of_hosts;
-  memc->number_of_hosts= 1;
-  size_t max_keys= 20480;
-
-
-  char **keys= calloc(max_keys, sizeof(char*));
-  size_t *key_length=calloc(max_keys, sizeof(size_t));
-
-  /* First add all of the items.. */
-  bool slept= false;
-  char blob[1024]= { 0 };
-  memcached_return rc;
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    char k[251];
-    key_length[x]= (size_t)snprintf(k, sizeof(k), "0200%zu", x);
-    keys[x]= strdup(k);
-    assert(keys[x] != NULL);
-    rc= memcached_set(memc, keys[x], key_length[x], blob, sizeof(blob), 0, 0);
-#ifdef __APPLE__
-    if (rc == MEMCACHED_SERVER_MARKED_DEAD)
-    {
-      break; // We are out of business
-    }
-#endif
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED || rc == MEMCACHED_TIMEOUT); // MEMCACHED_TIMEOUT <-- only observed on OSX
-
-    if (rc == MEMCACHED_TIMEOUT && slept == false)
-    {
-      x++;
-      sleep(1);// We will try to sleep
-      slept= true;
-    }
-    else if (rc == MEMCACHED_TIMEOUT && slept == true)
-    {
-      // We failed to send everything.
-      break;
-    }
-  }
-
-  if (rc != MEMCACHED_SERVER_MARKED_DEAD)
-  {
-
-    /* Try to get all of them with a large multiget */
-    size_t counter= 0;
-    memcached_execute_function callbacks[1]= { [0]= &callback_counter };
-    rc= memcached_mget_execute(memc, (const char**)keys, key_length,
-                               (size_t)max_keys, callbacks, &counter, 1);
-
-    assert(rc == MEMCACHED_SUCCESS);
-    char* the_value= NULL;
-    char the_key[MEMCACHED_MAX_KEY];
-    size_t the_key_length;
-    size_t the_value_length;
-    uint32_t the_flags;
-
-    do {
-      the_value= memcached_fetch(memc, the_key, &the_key_length, &the_value_length, &the_flags, &rc);
-
-      if ((the_value!= NULL) && (rc == MEMCACHED_SUCCESS))
-      {
-        ++counter;
-        free(the_value);
-      }
-
-    } while ( (the_value!= NULL) && (rc == MEMCACHED_SUCCESS));
-
-
-    assert(rc == MEMCACHED_END);
-
-    /* Verify that we got all of the items */
-    assert(counter == max_keys);
-  }
-
-  /* Release all allocated resources */
-  for (size_t x= 0; x < max_keys; ++x)
-  {
-    free(keys[x]);
-  }
-  free(keys);
-  free(key_length);
-
-  memc->number_of_hosts= number_of_hosts;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t regression_bug_583031(memcached_st *unused)
-{
-  (void)unused;
-
-    memcached_st *memc= memcached_create(NULL);
-    assert(memc);
-    memcached_server_add(memc, "10.2.3.4", 11211);
-
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 1000);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1000);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000);
-    memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 3);
-
-    memcached_return_t rc;
-    size_t length;
-    uint32_t flags;
-
-    (void)memcached_get(memc, "dsf", 3, &length, &flags, &rc);
-
-    test_true(rc == MEMCACHED_TIMEOUT);
-
-    memcached_free(memc);
-
-    return TEST_SUCCESS;
-}
-
-static void memcached_die(memcached_st* mc, memcached_return error, const char* what, uint32_t it)
-{
-  fprintf(stderr, "Iteration #%u: ", it);
-
-  if(error == MEMCACHED_ERRNO)
-  {
-    fprintf(stderr, "system error %d from %s: %s\n",
-            errno, what, strerror(errno));
-  }
-  else
-  {
-    fprintf(stderr, "error %d from %s: %s\n", error, what,
-            memcached_strerror(mc, error));
-  }
-}
-
-#define TEST_CONSTANT_CREATION 200
-
-static test_return_t regression_bug_(memcached_st *memc)
-{
-  const char *remote_server;
-  (void)memc;
-
-  if (! (remote_server= getenv("LIBMEMCACHED_REMOTE_SERVER")))
-  {
-    return TEST_SKIPPED;
-  }
-
-  for (uint32_t x= 0; x < TEST_CONSTANT_CREATION; x++) 
-  {
-    memcached_st* mc= memcached_create(NULL);
-    memcached_return rc;
-
-    rc= memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      memcached_die(mc, rc, "memcached_behavior_set", x);
-    }
-
-    rc= memcached_behavior_set(mc, MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, 1);
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      memcached_die(mc, rc, "memcached_behavior_set", x);
-    }
-
-    rc= memcached_server_add(mc, remote_server, 0);
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      memcached_die(mc, rc, "memcached_server_add", x);
-    }
-
-    const char *set_key= "akey";
-    const size_t set_key_len= strlen(set_key);
-    const char *set_value= "a value";
-    const size_t set_value_len= strlen(set_value);
-
-    if (rc == MEMCACHED_SUCCESS)
-    {
-      if (x > 0) 
-      {
-        size_t get_value_len;
-        char *get_value;
-        uint32_t get_value_flags;
-
-        get_value= memcached_get(mc, set_key, set_key_len, &get_value_len,
-                                 &get_value_flags, &rc);
-        if (rc != MEMCACHED_SUCCESS)
-        {
-          memcached_die(mc, rc, "memcached_get", x);
-        }
-        else
-        {
-
-          if (x != 0 &&
-              (get_value_len != set_value_len
-               || 0!=strncmp(get_value, set_value, get_value_len)))
-          {
-            fprintf(stderr, "Values don't match?\n");
-            rc= MEMCACHED_FAILURE;
-          }
-          free(get_value);
-        }
-      }
-
-      rc= memcached_set(mc,
-                        set_key, set_key_len,
-                        set_value, set_value_len,
-                        0, /* time */
-                        0  /* flags */
-                       );
-      if (rc != MEMCACHED_SUCCESS)
-      {
-        memcached_die(mc, rc, "memcached_set", x);
-      }
-    }
-
-    memcached_quit(mc);
-    memcached_free(mc);
-
-    if (rc != MEMCACHED_SUCCESS)
-    {
-      break;
-    }
-  }
-
-  return TEST_SUCCESS;
-}
-
-/*
- * Test that the sasl authentication works. We cannot use the default
- * pool of servers, because that would require that all servers we want
- * to test supports SASL authentication, and that they use the default
- * creds.
- */
-static test_return_t sasl_auth_test(memcached_st *memc)
-{
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  memcached_return_t rc;
-
-  rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_delete(memc, "foo", 3, 0)) == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_destroy_sasl_auth_data(memc)) == MEMCACHED_SUCCESS);
-  test_true((rc= memcached_destroy_sasl_auth_data(memc)) == MEMCACHED_FAILURE);
-  test_true((rc= memcached_destroy_sasl_auth_data(NULL)) == MEMCACHED_FAILURE);
-  memcached_quit(memc);
-
-  rc= memcached_set_sasl_auth_data(memc,
-                                   getenv("LIBMEMCACHED_TEST_SASL_USERNAME"),
-                                   getenv("LIBMEMCACHED_TEST_SASL_SERVER"));
-  test_true(rc == MEMCACHED_SUCCESS);
-
-  rc= memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_AUTH_FAILURE);
-  test_true(memcached_destroy_sasl_auth_data(memc) == MEMCACHED_SUCCESS);
-
-  memcached_quit(memc);
-  return TEST_SUCCESS;
-#else
-  (void)memc;
-  return TEST_FAILURE;
-#endif
-}
-
-/* Clean the server before beginning testing */
-test_st tests[] ={
-  {"util_version", 1, (test_callback_fn)util_version_test },
-  {"flush", 0, (test_callback_fn)flush_test },
-  {"init", 0, (test_callback_fn)init_test },
-  {"allocation", 0, (test_callback_fn)allocation_test },
-  {"server_list_null_test", 0, (test_callback_fn)server_list_null_test},
-  {"server_unsort", 0, (test_callback_fn)server_unsort_test},
-  {"server_sort", 0, (test_callback_fn)server_sort_test},
-  {"server_sort2", 0, (test_callback_fn)server_sort2_test},
-  {"memcached_server_remove", 0, (test_callback_fn)memcached_server_remove_test},
-  {"clone_test", 0, (test_callback_fn)clone_test },
-  {"connection_test", 0, (test_callback_fn)connection_test},
-  {"callback_test", 0, (test_callback_fn)callback_test},
-  {"userdata_test", 0, (test_callback_fn)userdata_test},
-  {"error", 0, (test_callback_fn)error_test },
-  {"set", 0, (test_callback_fn)set_test },
-  {"set2", 0, (test_callback_fn)set_test2 },
-  {"set3", 0, (test_callback_fn)set_test3 },
-  {"dump", 1, (test_callback_fn)dump_test},
-  {"add", 1, (test_callback_fn)add_test },
-  {"replace", 1, (test_callback_fn)replace_test },
-  {"delete", 1, (test_callback_fn)delete_test },
-  {"get", 1, (test_callback_fn)get_test },
-  {"get2", 0, (test_callback_fn)get_test2 },
-  {"get3", 0, (test_callback_fn)get_test3 },
-  {"get4", 0, (test_callback_fn)get_test4 },
-  {"partial mget", 0, (test_callback_fn)get_test5 },
-  {"stats_servername", 0, (test_callback_fn)stats_servername_test },
-  {"increment", 0, (test_callback_fn)increment_test },
-  {"increment_with_initial", 1, (test_callback_fn)increment_with_initial_test },
-  {"decrement", 0, (test_callback_fn)decrement_test },
-  {"decrement_with_initial", 1, (test_callback_fn)decrement_with_initial_test },
-  {"increment_by_key", 0, (test_callback_fn)increment_by_key_test },
-  {"increment_with_initial_by_key", 1, (test_callback_fn)increment_with_initial_by_key_test },
-  {"decrement_by_key", 0, (test_callback_fn)decrement_by_key_test },
-  {"decrement_with_initial_by_key", 1, (test_callback_fn)decrement_with_initial_by_key_test },
-  {"quit", 0, (test_callback_fn)quit_test },
-  {"mget", 1, (test_callback_fn)mget_test },
-  {"mget_result", 1, (test_callback_fn)mget_result_test },
-  {"mget_result_alloc", 1, (test_callback_fn)mget_result_alloc_test },
-  {"mget_result_function", 1, (test_callback_fn)mget_result_function },
-  {"mget_execute", 1, (test_callback_fn)mget_execute },
-  {"mget_end", 0, (test_callback_fn)mget_end },
-  {"get_stats", 0, (test_callback_fn)get_stats },
-  {"add_host_test", 0, (test_callback_fn)add_host_test },
-  {"add_host_test_1", 0, (test_callback_fn)add_host_test1 },
-  {"get_stats_keys", 0, (test_callback_fn)get_stats_keys },
-  {"version_string_test", 0, (test_callback_fn)version_string_test},
-  {"bad_key", 1, (test_callback_fn)bad_key_test },
-  {"memcached_server_cursor", 1, (test_callback_fn)memcached_server_cursor_test },
-  {"read_through", 1, (test_callback_fn)read_through },
-  {"delete_through", 1, (test_callback_fn)delete_through },
-  {"noreply", 1, (test_callback_fn)noreply_test},
-  {"analyzer", 1, (test_callback_fn)analyzer_test},
-#ifdef HAVE_LIBMEMCACHEDUTIL
-  {"connectionpool", 1, (test_callback_fn)connection_pool_test },
-  {"ping", 1, (test_callback_fn)ping_test },
-#endif
-  {"test_get_last_disconnect", 1, (test_callback_fn)test_get_last_disconnect},
-  {"verbosity", 1, (test_callback_fn)test_verbosity},
-  {"test_server_failure", 1, (test_callback_fn)test_server_failure},
-  {"cull_servers", 1, (test_callback_fn)test_cull_servers},
-  {"memcached_stat_execute", 1, (test_callback_fn)memcached_stat_execute_test},
-  {0, 0, 0}
-};
-
-test_st behavior_tests[] ={
-  {"behavior_test", 0, (test_callback_fn)behavior_test},
-  {"MEMCACHED_BEHAVIOR_CORK", 0, (test_callback_fn)MEMCACHED_BEHAVIOR_CORK_test},
-  {"MEMCACHED_BEHAVIOR_TCP_KEEPALIVE", 0, (test_callback_fn)MEMCACHED_BEHAVIOR_TCP_KEEPALIVE_test},
-  {"MEMCACHED_BEHAVIOR_TCP_KEEPIDLE", 0, (test_callback_fn)MEMCACHED_BEHAVIOR_TCP_KEEPIDLE_test},
-  {0, 0, 0}
-};
-
-test_st regression_binary_vs_block[] ={
-  {"block add", 1, (test_callback_fn)block_add_regression},
-  {"binary add", 1, (test_callback_fn)binary_add_regression},
-  {0, 0, 0}
-};
-
-test_st async_tests[] ={
-  {"add", 1, (test_callback_fn)add_wrapper },
-  {0, 0, 0}
-};
-
-test_st string_tests[] ={
-  {"string static with null", 0, (test_callback_fn)string_static_null },
-  {"string alloc with null", 0, (test_callback_fn)string_alloc_null },
-  {"string alloc with 1K", 0, (test_callback_fn)string_alloc_with_size },
-  {"string alloc with malloc failure", 0, (test_callback_fn)string_alloc_with_size_toobig },
-  {"string append", 0, (test_callback_fn)string_alloc_append },
-  {"string append failure (too big)", 0, (test_callback_fn)string_alloc_append_toobig },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st result_tests[] ={
-  {"result static", 0, (test_callback_fn)result_static},
-  {"result alloc", 0, (test_callback_fn)result_alloc},
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st version_1_2_3[] ={
-  {"append", 0, (test_callback_fn)append_test },
-  {"prepend", 0, (test_callback_fn)prepend_test },
-  {"cas", 0, (test_callback_fn)cas_test },
-  {"cas2", 0, (test_callback_fn)cas2_test },
-  {"append_binary", 0, (test_callback_fn)append_binary_test },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st user_tests[] ={
-  {"user_supplied_bug1", 0, (test_callback_fn)user_supplied_bug1 },
-  {"user_supplied_bug2", 0, (test_callback_fn)user_supplied_bug2 },
-  {"user_supplied_bug3", 0, (test_callback_fn)user_supplied_bug3 },
-  {"user_supplied_bug4", 0, (test_callback_fn)user_supplied_bug4 },
-  {"user_supplied_bug5", 1, (test_callback_fn)user_supplied_bug5 },
-  {"user_supplied_bug6", 1, (test_callback_fn)user_supplied_bug6 },
-  {"user_supplied_bug7", 1, (test_callback_fn)user_supplied_bug7 },
-  {"user_supplied_bug8", 1, (test_callback_fn)user_supplied_bug8 },
-  {"user_supplied_bug9", 1, (test_callback_fn)user_supplied_bug9 },
-  {"user_supplied_bug10", 1, (test_callback_fn)user_supplied_bug10 },
-  {"user_supplied_bug11", 1, (test_callback_fn)user_supplied_bug11 },
-  {"user_supplied_bug12", 1, (test_callback_fn)user_supplied_bug12 },
-  {"user_supplied_bug13", 1, (test_callback_fn)user_supplied_bug13 },
-  {"user_supplied_bug14", 1, (test_callback_fn)user_supplied_bug14 },
-  {"user_supplied_bug15", 1, (test_callback_fn)user_supplied_bug15 },
-  {"user_supplied_bug16", 1, (test_callback_fn)user_supplied_bug16 },
-#if !defined(__sun) && !defined(__OpenBSD__)
-  /*
-  ** It seems to be something weird with the character sets..
-  ** value_fetch is unable to parse the value line (iscntrl "fails"), so I
-  ** guess I need to find out how this is supposed to work.. Perhaps I need
-  ** to run the test in a specific locale (I tried zh_CN.UTF-8 without success,
-  ** so just disable the code for now...).
-  */
-  {"user_supplied_bug17", 1, (test_callback_fn)user_supplied_bug17 },
-#endif
-  {"user_supplied_bug18", 1, (test_callback_fn)user_supplied_bug18 },
-  {"user_supplied_bug19", 1, (test_callback_fn)user_supplied_bug19 },
-  {"user_supplied_bug20", 1, (test_callback_fn)user_supplied_bug20 },
-  {"user_supplied_bug21", 1, (test_callback_fn)user_supplied_bug21 },
-  {"wrong_failure_counter_test", 1, (test_callback_fn)wrong_failure_counter_test},
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st replication_tests[]= {
-  {"set", 1, (test_callback_fn)replication_set_test },
-  {"get", 0, (test_callback_fn)replication_get_test },
-  {"mget", 0, (test_callback_fn)replication_mget_test },
-  {"delete", 0, (test_callback_fn)replication_delete_test },
-  {"rand_mget", 0, (test_callback_fn)replication_randomize_mget_test },
-  {0, 0, (test_callback_fn)0}
-};
-
-/*
- * The following test suite is used to verify that we don't introduce
- * regression bugs. If you want more information about the bug / test,
- * you should look in the bug report at
- *   http://bugs.launchpad.net/libmemcached
- */
-test_st regression_tests[]= {
-  {"lp:434484", 1, (test_callback_fn)regression_bug_434484 },
-  {"lp:434843", 1, (test_callback_fn)regression_bug_434843 },
-  {"lp:434843-buffered", 1, (test_callback_fn)regression_bug_434843_buffered },
-  {"lp:421108", 1, (test_callback_fn)regression_bug_421108 },
-  {"lp:442914", 1, (test_callback_fn)regression_bug_442914 },
-  {"lp:447342", 1, (test_callback_fn)regression_bug_447342 },
-  {"lp:463297", 1, (test_callback_fn)regression_bug_463297 },
-  {"lp:490486", 1, (test_callback_fn)regression_bug_490486 },
-  {"lp:583031", 1, (test_callback_fn)regression_bug_583031 },
-  {"lp:?", 1, (test_callback_fn)regression_bug_ },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st sasl_auth_tests[]= {
-  {"sasl_auth", 1, (test_callback_fn)sasl_auth_test },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st ketama_compatibility[]= {
-  {"libmemcached", 1, (test_callback_fn)ketama_compatibility_libmemcached },
-  {"spymemcached", 1, (test_callback_fn)ketama_compatibility_spymemcached },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st generate_tests[] ={
-  {"generate_pairs", 1, (test_callback_fn)generate_pairs },
-  {"generate_data", 1, (test_callback_fn)generate_data },
-  {"get_read", 0, (test_callback_fn)get_read },
-  {"delete_generate", 0, (test_callback_fn)delete_generate },
-  {"generate_buffer_data", 1, (test_callback_fn)generate_buffer_data },
-  {"delete_buffer", 0, (test_callback_fn)delete_buffer_generate},
-  {"generate_data", 1, (test_callback_fn)generate_data },
-  {"mget_read", 0, (test_callback_fn)mget_read },
-  {"mget_read_result", 0, (test_callback_fn)mget_read_result },
-  {"mget_read_function", 0, (test_callback_fn)mget_read_function },
-  {"cleanup", 1, (test_callback_fn)cleanup_pairs },
-  {"generate_large_pairs", 1, (test_callback_fn)generate_large_pairs },
-  {"generate_data", 1, (test_callback_fn)generate_data },
-  {"generate_buffer_data", 1, (test_callback_fn)generate_buffer_data },
-  {"cleanup", 1, (test_callback_fn)cleanup_pairs },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st consistent_tests[] ={
-  {"generate_pairs", 1, (test_callback_fn)generate_pairs },
-  {"generate_data", 1, (test_callback_fn)generate_data },
-  {"get_read", 0, (test_callback_fn)get_read_count },
-  {"cleanup", 1, (test_callback_fn)cleanup_pairs },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st consistent_weighted_tests[] ={
-  {"generate_pairs", 1, (test_callback_fn)generate_pairs },
-  {"generate_data", 1, (test_callback_fn)generate_data_with_stats },
-  {"get_read", 0, (test_callback_fn)get_read_count },
-  {"cleanup", 1, (test_callback_fn)cleanup_pairs },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st hsieh_availability[] ={
-  {"hsieh_avaibility_test", 0, (test_callback_fn)hsieh_avaibility_test},
-  {0, 0, (test_callback_fn)0}
-};
-
-#if 0
-test_st hash_sanity[] ={
-  {"hash sanity", 0, (test_callback_fn)hash_sanity_test},
-  {0, 0, (test_callback_fn)0}
-};
-#endif
-
-test_st ketama_auto_eject_hosts[] ={
-  {"auto_eject_hosts", 1, (test_callback_fn)auto_eject_hosts },
-  {"output_ketama_weighted_keys", 1, (test_callback_fn)output_ketama_weighted_keys },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st hash_tests[] ={
-  {"one_at_a_time_run", 0, (test_callback_fn)one_at_a_time_run },
-  {"md5", 0, (test_callback_fn)md5_run },
-  {"crc", 0, (test_callback_fn)crc_run },
-  {"fnv1_64", 0, (test_callback_fn)fnv1_64_run },
-  {"fnv1a_64", 0, (test_callback_fn)fnv1a_64_run },
-  {"fnv1_32", 0, (test_callback_fn)fnv1_32_run },
-  {"fnv1a_32", 0, (test_callback_fn)fnv1a_32_run },
-  {"hsieh", 0, (test_callback_fn)hsieh_run },
-  {"murmur", 0, (test_callback_fn)murmur_run },
-  {"jenkis", 0, (test_callback_fn)jenkins_run },
-  {"memcached_get_hashkit", 0, (test_callback_fn)memcached_get_hashkit_test },
-  {0, 0, (test_callback_fn)0}
-};
-
-test_st error_conditions[] ={
-  {"memcached_get_MEMCACHED_ERRNO", 0, (test_callback_fn)memcached_get_MEMCACHED_ERRNO },
-  {"memcached_get_MEMCACHED_NOTFOUND", 0, (test_callback_fn)memcached_get_MEMCACHED_NOTFOUND },
-  {"memcached_get_by_key_MEMCACHED_ERRNO", 0, (test_callback_fn)memcached_get_by_key_MEMCACHED_ERRNO },
-  {"memcached_get_by_key_MEMCACHED_NOTFOUND", 0, (test_callback_fn)memcached_get_by_key_MEMCACHED_NOTFOUND },
-  {0, 0, (test_callback_fn)0}
-};
-
-collection_st collection[] ={
-#if 0
-  {"hash_sanity", 0, 0, hash_sanity},
-#endif
-  {"hsieh_availability", 0, 0, hsieh_availability},
-  {"block", 0, 0, tests},
-  {"binary", (test_callback_fn)pre_binary, 0, tests},
-  {"nonblock", (test_callback_fn)pre_nonblock, 0, tests},
-  {"nodelay", (test_callback_fn)pre_nodelay, 0, tests},
-  {"settimer", (test_callback_fn)pre_settimer, 0, tests},
-  {"md5", (test_callback_fn)pre_md5, 0, tests},
-  {"crc", (test_callback_fn)pre_crc, 0, tests},
-  {"hsieh", (test_callback_fn)pre_hsieh, 0, tests},
-  {"jenkins", (test_callback_fn)pre_jenkins, 0, tests},
-  {"fnv1_64", (test_callback_fn)pre_hash_fnv1_64, 0, tests},
-  {"fnv1a_64", (test_callback_fn)pre_hash_fnv1a_64, 0, tests},
-  {"fnv1_32", (test_callback_fn)pre_hash_fnv1_32, 0, tests},
-  {"fnv1a_32", (test_callback_fn)pre_hash_fnv1a_32, 0, tests},
-  {"ketama", (test_callback_fn)pre_behavior_ketama, 0, tests},
-  {"ketama_auto_eject_hosts", (test_callback_fn)pre_behavior_ketama, 0, ketama_auto_eject_hosts},
-  {"unix_socket", (test_callback_fn)pre_unix_socket, 0, tests},
-  {"unix_socket_nodelay", (test_callback_fn)pre_nodelay, 0, tests},
-  {"poll_timeout", (test_callback_fn)poll_timeout, 0, tests},
-  {"gets", (test_callback_fn)enable_cas, 0, tests},
-  {"consistent_crc", (test_callback_fn)enable_consistent_crc, 0, tests},
-  {"consistent_hsieh", (test_callback_fn)enable_consistent_hsieh, 0, tests},
-#ifdef MEMCACHED_ENABLE_DEPRECATED
-  {"deprecated_memory_allocators", (test_callback_fn)deprecated_set_memory_alloc, 0, tests},
-#endif
-  {"memory_allocators", (test_callback_fn)set_memory_alloc, 0, tests},
-  {"prefix", (test_callback_fn)set_prefix, 0, tests},
-  {"sasl_auth", (test_callback_fn)pre_sasl, 0, sasl_auth_tests },
-  {"sasl", (test_callback_fn)pre_sasl, 0, tests },
-  {"version_1_2_3", (test_callback_fn)check_for_1_2_3, 0, version_1_2_3},
-  {"string", 0, 0, string_tests},
-  {"result", 0, 0, result_tests},
-  {"async", (test_callback_fn)pre_nonblock, 0, async_tests},
-  {"async_binary", (test_callback_fn)pre_nonblock_binary, 0, async_tests},
-  {"user", 0, 0, user_tests},
-  {"generate", 0, 0, generate_tests},
-  {"generate_hsieh", (test_callback_fn)pre_hsieh, 0, generate_tests},
-  {"generate_ketama", (test_callback_fn)pre_behavior_ketama, 0, generate_tests},
-  {"generate_hsieh_consistent", (test_callback_fn)enable_consistent_hsieh, 0, generate_tests},
-  {"generate_md5", (test_callback_fn)pre_md5, 0, generate_tests},
-  {"generate_murmur", (test_callback_fn)pre_murmur, 0, generate_tests},
-  {"generate_jenkins", (test_callback_fn)pre_jenkins, 0, generate_tests},
-  {"generate_nonblock", (test_callback_fn)pre_nonblock, 0, generate_tests},
-  // Too slow
-  {"generate_corked", (test_callback_fn)pre_cork, 0, generate_tests},
-  {"generate_corked_and_nonblock", (test_callback_fn)pre_cork_and_nonblock, 0, generate_tests},
-  {"consistent_not", 0, 0, consistent_tests},
-  {"consistent_ketama", (test_callback_fn)pre_behavior_ketama, 0, consistent_tests},
-  {"consistent_ketama_weighted", (test_callback_fn)pre_behavior_ketama_weighted, 0, consistent_weighted_tests},
-  {"ketama_compat", 0, 0, ketama_compatibility},
-  {"test_hashes", 0, 0, hash_tests},
-  {"replication", (test_callback_fn)pre_replication, 0, replication_tests},
-  {"replication_noblock", (test_callback_fn)pre_replication_noblock, 0, replication_tests},
-  {"regression", 0, 0, regression_tests},
-  {"behaviors", 0, 0, behavior_tests},
-  {"regression_binary_vs_block", (test_callback_fn)key_setup, (test_callback_fn)key_teardown, regression_binary_vs_block},
-  {"error_conditions", 0, 0, error_conditions},
-  {0, 0, 0, 0}
-};
-
-#define SERVERS_TO_CREATE 5
-
-#include "libmemcached_world.h"
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-
-  world->create= (test_callback_create_fn)world_create;
-  world->destroy= (test_callback_fn)world_destroy;
-
-  world->test.startup= (test_callback_fn)world_test_startup;
-  world->test.flush= (test_callback_fn)world_flush;
-  world->test.pre_run= (test_callback_fn)world_pre_run;
-  world->test.post_run= (test_callback_fn)world_post_run;
-  world->test.on_error= (test_callback_error_fn)world_on_error;
-
-  world->collection.startup= (test_callback_fn)world_container_startup;
-  world->collection.shutdown= (test_callback_fn)world_container_shutdown;
-
-  world->runner= &defualt_libmemcached_runner;
-}
@@ -1,74 +0,0 @@
-/*
-  C++ to libmemcit
-*/
-#include "test.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <libmemcached/memcached.h>
-
-static test_return_t exists_test(void *obj)
-{
-  Memcached memc;
-  (void)obj;
-  (void)memc;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t new_test(void *obj)
-{
-  Memcached *memc= new Memcached;
-  (void)obj;
-
-  (void)memc;
-
-  delete memc;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t copy_test(void *obj)
-{
-  Memcached *memc= new Memcached;
-  Memcached *copy(memc);
-  (void)obj;
-
-  (void)copy;
-
-  delete memc;
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t assign_test(void *obj)
-{
-  Memcached memc;
-  Memcached copy;
-  (void)obj;
-
-  copy= memc;
-
-  (void)copy;
-
-  return TEST_SUCCESS;
-}
-
-test_st basic[] ={
-  { "exists", 0, reinterpret_cast<test_callback_fn>(exists_test) },
-  { "new", 0, reinterpret_cast<test_callback_fn>(new_test) },
-  { "copy", 0, reinterpret_cast<test_callback_fn>(copy_test) },
-  { "assign", 0, reinterpret_cast<test_callback_fn>(assign_test) },
-  { 0, 0, 0}
-};
-
-collection_st collection[] ={
-  {"basic", 0, 0, basic},
-  {0, 0, 0, 0}
-};
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-}
@@ -1,509 +0,0 @@
-/* libMemcached Functions Test
- * 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.
- */
-
-/*
-  Sample test application.
-*/
-
-#include "config.h"
-
-#include "libmemcached/common.h"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-
-#include "server.h"
-
-#include "test.h"
-
-#define SERVERS_TO_CREATE 5
-
-
-/**
-  @note This should be testing to see if the server really supports the binary protocol.
-*/
-static test_return_t pre_binary(memcached_st *memc)
-{
-  memcached_return_t rc= MEMCACHED_FAILURE;
-  memcached_st *memc_clone;
-  memcached_server_instance_st instance;
-
-  memc_clone= memcached_clone(NULL, memc);
-  test_true(memc_clone);
-  // The memcached_version needs to be done on a clone, because the server
-  // will not toggle protocol on an connection.
-  memcached_version(memc_clone);
-
-  instance= memcached_server_instance_by_position(memc_clone, 0);
-
-  if (instance->major_version >= 1 && instance->minor_version > 2)
-  {
-    rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1);
-    test_true(rc == MEMCACHED_SUCCESS);
-    test_true(memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL) == 1);
-  }
-
-  memcached_free(memc_clone);
-
-  return rc == MEMCACHED_SUCCESS ? TEST_SUCCESS : TEST_SKIPPED;
-}
-
-static void increment_request_id(uint16_t *id)
-{
-  (*id)++;
-  if ((*id & UDP_REQUEST_ID_THREAD_MASK) != 0)
-    *id= 0;
-}
-
-static uint16_t *get_udp_request_ids(memcached_st *memc)
-{
-  uint16_t *ids= malloc(sizeof(uint16_t) * memcached_server_count(memc));
-  assert(ids != NULL);
-
-  for (uint32_t x= 0; x < memcached_server_count(memc); x++)
-  {
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, x);
-
-    ids[x]= get_udp_datagram_request_id((struct udp_datagram_header_st *) ((memcached_server_instance_st )instance)->write_buffer);
-  }
-
-  return ids;
-}
-
-static test_return_t post_udp_op_check(memcached_st *memc, uint16_t *expected_req_ids)
-{
-  (void)memc;
-  (void)expected_req_ids;
-#if 0
-  memcached_server_st *cur_server = memcached_server_list(memc);
-  uint16_t *cur_req_ids = get_udp_request_ids(memc);
-
-  for (size_t x= 0; x < memcached_server_count(memc); x++)
-  {
-    test_true(cur_server[x].cursor_active == 0);
-    test_true(cur_req_ids[x] == expected_req_ids[x]);
-  }
-  free(expected_req_ids);
-  free(cur_req_ids);
-
-#endif
-  return TEST_SUCCESS;
-}
-
-/*
-** There is a little bit of a hack here, instead of removing
-** the servers, I just set num host to 0 and them add then new udp servers
-**/
-static test_return_t init_udp(memcached_st *memc)
-{
-  memcached_version(memc);
-#if 0
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-
-  /* For the time being, only support udp test for >= 1.2.6 && < 1.3 */
-  if (instance->major_version != 1 || instance->minor_version != 2
-          || instance->micro_version < 6)
-    return TEST_SKIPPED;
-
-  uint32_t num_hosts= memcached_server_count(memc);
-  memcached_server_st servers[num_hosts];
-  memcpy(servers, memcached_server_list(memc), sizeof(memcached_server_st) * num_hosts);
-  for (uint32_t x= 0; x < num_hosts; x++)
-  {
-   memcached_server_instance_st set_instance=
-     memcached_server_instance_by_position(memc, x);
-
-    memcached_server_free(((memcached_server_write_instance_st)set_instance));
-  }
-
-  memc->number_of_hosts= 0;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, 1);
-  for (uint32_t x= 0; x < num_hosts; x++)
-  {
-    memcached_server_instance_st set_instance=
-      memcached_server_instance_by_position(memc, x);
-
-    test_true(memcached_server_add_udp(memc, servers[x].hostname, servers[x].port) == MEMCACHED_SUCCESS);
-    test_true(set_instance->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH);
-  }
-#endif
-
-  return TEST_SKIPPED;
-}
-
-static test_return_t binary_init_udp(memcached_st *memc)
-{
-  test_return_t test_rc;
-  test_rc= pre_binary(memc);
-
-  if (test_rc != TEST_SUCCESS)
-    return test_rc;
-
-  return init_udp(memc);
-}
-
-/* Make sure that I cant add a tcp server to a udp client */
-static test_return_t add_tcp_server_udp_client_test(memcached_st *memc)
-{
-  (void)memc;
-#if 0
-  memcached_server_st server;
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-  memcached_server_clone(&server, &memc->hosts[0]);
-  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
-  test_true(memcached_server_add(memc, server.hostname, server.port) == MEMCACHED_INVALID_HOST_PROTOCOL);
-#endif
-  return TEST_SUCCESS;
-}
-
-/* Make sure that I cant add a udp server to a tcp client */
-static test_return_t add_udp_server_tcp_client_test(memcached_st *memc)
-{
-  (void)memc;
-#if 0
-  memcached_server_st server;
-  memcached_server_instance_st instance=
-    memcached_server_instance_by_position(memc, 0);
-  memcached_server_clone(&server, &memc->hosts[0]);
-  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
-
-  memcached_st tcp_client;
-  memcached_create(&tcp_client);
-  test_true(memcached_server_add_udp(&tcp_client, server.hostname, server.port) == MEMCACHED_INVALID_HOST_PROTOCOL);
-#endif
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t set_udp_behavior_test(memcached_st *memc)
-{
-
-  memcached_quit(memc);
-  memc->number_of_hosts= 0;
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, memc->distribution);
-  test_true(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, 1) == MEMCACHED_SUCCESS);
-  test_true(memc->flags.use_udp);
-  test_true(memc->flags.no_reply);
-
-  test_true(memcached_server_count(memc) == 0);
-
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP,0);
-  test_true(! (memc->flags.use_udp));
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY,0);
-  test_true(! (memc->flags.no_reply));
-
-  return TEST_SUCCESS;
-}
-
-static test_return_t udp_set_test(memcached_st *memc)
-{
-  unsigned int num_iters= 1025; //request id rolls over at 1024
-
-  for (size_t x= 0; x < num_iters;x++)
-  {
-    memcached_return_t rc;
-    const char *key= "foo";
-    const char *value= "when we sanitize";
-    uint16_t *expected_ids= get_udp_request_ids(memc);
-    unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, server_key);
-    size_t init_offset= instance->write_buffer_offset;
-
-    rc= memcached_set(memc, key, strlen(key),
-                      value, strlen(value),
-                      (time_t)0, (uint32_t)0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-    /** NB, the check below assumes that if new write_ptr is less than
-     *  the original write_ptr that we have flushed. For large payloads, this
-     *  maybe an invalid assumption, but for the small payload we have it is OK
-     */
-    if (rc == MEMCACHED_SUCCESS ||
-            instance->write_buffer_offset < init_offset)
-      increment_request_id(&expected_ids[server_key]);
-
-    if (rc == MEMCACHED_SUCCESS)
-    {
-      test_true(instance->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH);
-    }
-    else
-    {
-      test_true(instance->write_buffer_offset != UDP_DATAGRAM_HEADER_LENGTH);
-      test_true(instance->write_buffer_offset <= MAX_UDP_DATAGRAM_LENGTH);
-    }
-    test_true(post_udp_op_check(memc, expected_ids) == TEST_SUCCESS);
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t udp_buffered_set_test(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
-  return udp_set_test(memc);
-}
-
-static test_return_t udp_set_too_big_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "bar";
-  char value[MAX_UDP_DATAGRAM_LENGTH];
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-  rc= memcached_set(memc, key, strlen(key),
-                    value, MAX_UDP_DATAGRAM_LENGTH,
-                    (time_t)0, (uint32_t)0);
-  test_true(rc == MEMCACHED_WRITE_FAILURE);
-
-  return post_udp_op_check(memc,expected_ids);
-}
-
-static test_return_t udp_delete_test(memcached_st *memc)
-{
-  unsigned int num_iters= 1025; //request id rolls over at 1024
-
-  for (size_t x= 0; x < num_iters;x++)
-  {
-    memcached_return_t rc;
-    const char *key= "foo";
-    uint16_t *expected_ids=get_udp_request_ids(memc);
-    unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
-    memcached_server_instance_st instance=
-      memcached_server_instance_by_position(memc, server_key);
-    size_t init_offset= instance->write_buffer_offset;
-
-    rc= memcached_delete(memc, key, strlen(key), 0);
-    test_true(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
-
-    if (rc == MEMCACHED_SUCCESS || instance->write_buffer_offset < init_offset)
-      increment_request_id(&expected_ids[server_key]);
-    if (rc == MEMCACHED_SUCCESS)
-    {
-      test_true(instance->write_buffer_offset == UDP_DATAGRAM_HEADER_LENGTH);
-    }
-    else
-    {
-      test_true(instance->write_buffer_offset != UDP_DATAGRAM_HEADER_LENGTH);
-      test_true(instance->write_buffer_offset <= MAX_UDP_DATAGRAM_LENGTH);
-    }
-    test_true(post_udp_op_check(memc,expected_ids) == TEST_SUCCESS);
-  }
-  return TEST_SUCCESS;
-}
-
-static test_return_t udp_buffered_delete_test(memcached_st *memc)
-{
-  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
-  return udp_delete_test(memc);
-}
-
-static test_return_t udp_verbosity_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-
-  for (size_t x= 0; x < memcached_server_count(memc); x++)
-  {
-    increment_request_id(&expected_ids[x]);
-  }
-
-  rc= memcached_verbosity(memc,3);
-  test_true(rc == MEMCACHED_SUCCESS);
-  return post_udp_op_check(memc,expected_ids);
-}
-
-static test_return_t udp_quit_test(memcached_st *memc)
-{
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-  memcached_quit(memc);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-static test_return_t udp_flush_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-
-  for (size_t x= 0; x < memcached_server_count(memc); x++)
-  {
-    increment_request_id(&expected_ids[x]);
-  }
-
-  rc= memcached_flush(memc,0);
-  test_true(rc == MEMCACHED_SUCCESS);
-  return post_udp_op_check(memc,expected_ids);
-}
-
-static test_return_t udp_incr_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "incr";
-  const char *value= "1";
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-  unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
-  increment_request_id(&expected_ids[server_key]);
-  uint64_t newvalue;
-  rc= memcached_increment(memc, key, strlen(key), 1, &newvalue);
-  test_true(rc == MEMCACHED_SUCCESS);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-static test_return_t udp_decr_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "decr";
-  const char *value= "1";
-  rc= memcached_set(memc, key, strlen(key),
-                    value, strlen(value),
-                    (time_t)0, (uint32_t)0);
-
-  test_true(rc == MEMCACHED_SUCCESS);
-  uint16_t *expected_ids= get_udp_request_ids(memc);
-  unsigned int server_key= memcached_generate_hash(memc, key, strlen(key));
-  increment_request_id(&expected_ids[server_key]);
-  uint64_t newvalue;
-  rc= memcached_decrement(memc, key, strlen(key), 1, &newvalue);
-  test_true(rc == MEMCACHED_SUCCESS);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-
-static test_return_t udp_stat_test(memcached_st *memc)
-{
-  memcached_stat_st * rv= NULL;
-  memcached_return_t rc;
-  char args[]= "";
-  uint16_t *expected_ids = get_udp_request_ids(memc);
-  rv = memcached_stat(memc, args, &rc);
-  free(rv);
-  test_true(rc == MEMCACHED_NOT_SUPPORTED);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-static test_return_t udp_version_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  uint16_t *expected_ids = get_udp_request_ids(memc);
-  rc = memcached_version(memc);
-  test_true(rc == MEMCACHED_NOT_SUPPORTED);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-static test_return_t udp_get_test(memcached_st *memc)
-{
-  memcached_return_t rc;
-  const char *key= "foo";
-  size_t vlen;
-  uint16_t *expected_ids = get_udp_request_ids(memc);
-  char *val= memcached_get(memc, key, strlen(key), &vlen, (uint32_t)0, &rc);
-  test_true(rc == MEMCACHED_NOT_SUPPORTED);
-  test_true(val == NULL);
-  return post_udp_op_check(memc, expected_ids);
-}
-
-static test_return_t udp_mixed_io_test(memcached_st *memc)
-{
-  test_st current_op;
-  test_st mixed_io_ops [] ={
-    {"udp_set_test", 0,
-      (test_callback_fn)udp_set_test},
-    {"udp_set_too_big_test", 0,
-      (test_callback_fn)udp_set_too_big_test},
-    {"udp_delete_test", 0,
-      (test_callback_fn)udp_delete_test},
-    {"udp_verbosity_test", 0,
-      (test_callback_fn)udp_verbosity_test},
-    {"udp_quit_test", 0,
-      (test_callback_fn)udp_quit_test},
-    {"udp_flush_test", 0,
-      (test_callback_fn)udp_flush_test},
-    {"udp_incr_test", 0,
-      (test_callback_fn)udp_incr_test},
-    {"udp_decr_test", 0,
-      (test_callback_fn)udp_decr_test},
-    {"udp_version_test", 0,
-      (test_callback_fn)udp_version_test}
-  };
-
-  for (size_t x= 0; x < 500; x++)
-  {
-    current_op= mixed_io_ops[random() % 9];
-    test_true(current_op.test_fn(memc) == TEST_SUCCESS);
-  }
-  return TEST_SUCCESS;
-}
-
-test_st udp_setup_server_tests[] ={
-  {"set_udp_behavior_test", 0, (test_callback_fn)set_udp_behavior_test},
-  {"add_tcp_server_udp_client_test", 0, (test_callback_fn)add_tcp_server_udp_client_test},
-  {"add_udp_server_tcp_client_test", 0, (test_callback_fn)add_udp_server_tcp_client_test},
-  {0, 0, 0}
-};
-
-test_st upd_io_tests[] ={
-  {"udp_set_test", 0, (test_callback_fn)udp_set_test},
-  {"udp_buffered_set_test", 0, (test_callback_fn)udp_buffered_set_test},
-  {"udp_set_too_big_test", 0, (test_callback_fn)udp_set_too_big_test},
-  {"udp_delete_test", 0, (test_callback_fn)udp_delete_test},
-  {"udp_buffered_delete_test", 0, (test_callback_fn)udp_buffered_delete_test},
-  {"udp_verbosity_test", 0, (test_callback_fn)udp_verbosity_test},
-  {"udp_quit_test", 0, (test_callback_fn)udp_quit_test},
-  {"udp_flush_test", 0, (test_callback_fn)udp_flush_test},
-  {"udp_incr_test", 0, (test_callback_fn)udp_incr_test},
-  {"udp_decr_test", 0, (test_callback_fn)udp_decr_test},
-  {"udp_stat_test", 0, (test_callback_fn)udp_stat_test},
-  {"udp_version_test", 0, (test_callback_fn)udp_version_test},
-  {"udp_get_test", 0, (test_callback_fn)udp_get_test},
-  {"udp_mixed_io_test", 0, (test_callback_fn)udp_mixed_io_test},
-  {0, 0, 0}
-};
-
-collection_st collection[] ={
-  {"udp_setup", (test_callback_fn)init_udp, 0, udp_setup_server_tests},
-  {"udp_io", (test_callback_fn)init_udp, 0, upd_io_tests},
-  {"udp_binary_io", (test_callback_fn)binary_init_udp, 0, upd_io_tests},
-  {0, 0, 0, 0}
-};
-
-#define SERVERS_TO_CREATE 5
-
-#include "libmemcached_world.h"
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-
-  world->create= (test_callback_create_fn)world_create;
-  world->destroy= (test_callback_fn)world_destroy;
-
-  world->test.startup= (test_callback_fn)world_test_startup;
-  world->test.flush= (test_callback_fn)world_flush;
-  world->test.pre_run= (test_callback_fn)world_pre_run;
-  world->test.post_run= (test_callback_fn)world_post_run;
-  world->test.on_error= (test_callback_error_fn)world_on_error;
-
-  world->collection.startup= (test_callback_fn)world_container_startup;
-  world->collection.shutdown= (test_callback_fn)world_container_shutdown;
-
-  world->runner= &defualt_libmemcached_runner;
-}
@@ -0,0 +1,577 @@
+/*  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.
+ *
+ */
+
+
+/*
+  Sample test application.
+*/
+
+#include <mem_config.h>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcached/server_instance.h>
+#include <libmemcached/io.h>
+#include <libmemcached/udp.hpp>
+#include <libmemcachedutil-1.0/util.h>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <unistd.h>
+#include <time.h>
+
+#include <libtest/server.h>
+
+#include "libmemcached/instance.hpp"
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+/**
+  @note This should be testing to see if the server really supports the binary protocol.
+*/
+static test_return_t pre_binary(memcached_st *memc)
+{
+  memcached_st *memc_clone= memcached_clone(NULL, memc);
+  test_true(memc_clone);
+
+  // The memcached_version needs to be done on a clone, because the server
+  // will not toggle protocol on an connection.
+  memcached_version(memc_clone);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_version(memc));
+  test_compare(true, libmemcached_util_version_check(memc, 1, 2, 1));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
+  test_compare(true, memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL));
+
+  memcached_free(memc_clone);
+
+  return TEST_SUCCESS;
+}
+
+typedef std::vector<uint16_t> Expected;
+
+static void increment_request_id(uint16_t *id)
+{
+  (*id)++;
+  if ((*id & UDP_REQUEST_ID_THREAD_MASK) != 0)
+  {
+    *id= 0;
+  }
+}
+
+static void get_udp_request_ids(memcached_st *memc, Expected &ids)
+{
+  for (uint32_t x= 0; x < memcached_server_count(memc); x++)
+  {
+    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, x);
+
+    ids.push_back(get_udp_datagram_request_id((struct udp_datagram_header_st *) ((const memcached_instance_st * )instance)->write_buffer));
+  }
+}
+
+static test_return_t post_udp_op_check(memcached_st *memc, Expected& expected_req_ids)
+{
+  (void)memc;
+  (void)expected_req_ids;
+#if 0
+  memcached_server_st *cur_server = memcached_server_list(memc);
+  uint16_t *cur_req_ids = get_udp_request_ids(memc);
+
+  for (size_t x= 0; x < memcached_server_count(memc); x++)
+  {
+    test_true(cur_server[x].cursor_active == 0);
+    test_true(cur_req_ids[x] == expected_req_ids[x]);
+  }
+  free(expected_req_ids);
+  free(cur_req_ids);
+
+#endif
+  return TEST_SUCCESS;
+}
+
+/*
+** There is a little bit of a hack here, instead of removing
+** the servers, I just set num host to 0 and them add then new udp servers
+**/
+static test_return_t init_udp(memcached_st *memc)
+{
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t init_udp_valgrind(memcached_st *memc)
+{
+  if (getenv("LOG_COMPILER"))
+  {
+    return TEST_SKIPPED; 
+  }
+
+  test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t binary_init_udp(memcached_st *memc)
+{
+  if (getenv("LOG_COMPILER"))
+  {
+    return TEST_SKIPPED; 
+  }
+
+  test_skip(TEST_SUCCESS, pre_binary(memc));
+
+  return init_udp(memc);
+}
+
+/* Make sure that I cant add a tcp server to a udp client */
+static test_return_t add_tcp_server_udp_client_test(memcached_st *memc)
+{
+  (void)memc;
+#if 0
+  memcached_server_st server;
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+  memcached_server_clone(&server, &memc->hosts[0]);
+  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
+  test_true(memcached_server_add(memc, server.hostname, server.port) == MEMCACHED_INVALID_HOST_PROTOCOL);
+#endif
+  return TEST_SUCCESS;
+}
+
+/* Make sure that I cant add a udp server to a tcp client */
+static test_return_t add_udp_server_tcp_client_test(memcached_st *memc)
+{
+  (void)memc;
+#if 0
+  memcached_server_st server;
+  const memcached_instance_st * instance=
+    memcached_server_instance_by_position(memc, 0);
+  memcached_server_clone(&server, &memc->hosts[0]);
+  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
+
+  memcached_st tcp_client;
+  memcached_create(&tcp_client);
+  test_true(memcached_server_add_udp(&tcp_client, server.hostname, server.port) == MEMCACHED_INVALID_HOST_PROTOCOL);
+#endif
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t version_TEST(memcached_st *memc)
+{
+  test_compare(MEMCACHED_NOT_SUPPORTED, memcached_version(memc));
+  return TEST_SUCCESS;
+}
+
+static test_return_t verbosity_TEST(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS, memcached_verbosity(memc, 0));
+  return TEST_SUCCESS;
+}
+
+static test_return_t memcached_get_TEST(memcached_st *memc)
+{
+  memcached_return_t rc;
+  test_null(memcached_get(memc,
+                          test_literal_param(__func__),
+                          0, 0, &rc));
+  test_compare(MEMCACHED_NOT_SUPPORTED, rc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t memcached_mget_execute_by_key_TEST(memcached_st *memc)
+{
+  char **keys= NULL;
+  size_t *key_length= NULL;
+  test_compare(MEMCACHED_NOT_SUPPORTED,
+               memcached_mget_execute_by_key(memc,
+                                             test_literal_param(__func__), // Group key
+                                             keys, key_length, // Actual key
+                                             0, // Number of keys
+                                             0, // callbacks
+                                             0, // context
+                                             0)); // Number of callbacks
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t memcached_stat_TEST(memcached_st *memc)
+{
+  memcached_return_t rc;
+  test_null(memcached_stat(memc, 0, &rc));
+  test_compare(MEMCACHED_NOT_SUPPORTED, rc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t set_udp_behavior_test(memcached_st *memc)
+{
+  memcached_quit(memc);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, memc->distribution));
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, true));
+  test_compare(true, memc->flags.use_udp);
+  test_compare(false, memc->flags.reply);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, false));
+  test_compare(false, memc->flags.use_udp);
+  test_compare(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NOREPLY, false));
+  test_compare(true, memc->flags.reply);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t udp_set_test(memcached_st *memc)
+{
+  // Assume we are running under valgrind, and bail 
+  if (getenv("LOG_COMPILER"))
+  {
+    return TEST_SUCCESS; 
+  }
+
+  const unsigned int num_iters= 1025; //request id rolls over at 1024
+
+  test_true(memc);
+
+  for (size_t x= 0; x < num_iters;x++)
+  {
+    Expected expected_ids;
+    get_udp_request_ids(memc, expected_ids);
+    unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
+    test_true(server_key < memcached_server_count(memc));
+    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, server_key);
+    size_t init_offset= instance->write_buffer_offset;
+
+    test_compare_hint(MEMCACHED_SUCCESS, 
+                      memcached_set(memc,
+                                    test_literal_param("foo"),
+                                    test_literal_param("when we sanitize"),
+                                    time_t(0), uint32_t(0)),
+                      memcached_last_error_message(memc));
+
+    /*
+      NB, the check below assumes that if new write_ptr is less than
+      the original write_ptr that we have flushed. For large payloads, this
+      maybe an invalid assumption, but for the small payload we have it is OK
+    */
+    if (instance->write_buffer_offset < init_offset)
+    {
+      increment_request_id(&expected_ids[server_key]);
+    }
+
+    test_compare(TEST_SUCCESS, post_udp_op_check(memc, expected_ids));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t udp_buffered_set_test(memcached_st *memc)
+{
+  test_true(memc);
+  test_compare(MEMCACHED_INVALID_ARGUMENTS,
+               memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t udp_set_too_big_test(memcached_st *memc)
+{
+  test_true(memc);
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  std::vector<char> value;
+  value.resize(1024 * 1024 * 10);
+
+  test_compare_hint(MEMCACHED_WRITE_FAILURE,
+                    memcached_set(memc,
+                                  test_literal_param(__func__), 
+                                  &value[0], value.size(),
+                                  time_t(0), uint32_t(0)),
+                    memcached_last_error_message(memc));
+  memcached_quit(memc);
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_delete_test(memcached_st *memc)
+{
+  test_true(memc);
+
+  //request id rolls over at 1024
+  for (size_t x= 0; x < 1025; x++)
+  {
+    Expected expected_ids;
+    get_udp_request_ids(memc, expected_ids);
+
+    unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
+    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, server_key);
+    size_t init_offset= instance->write_buffer_offset;
+
+    test_compare(MEMCACHED_SUCCESS,
+                 memcached_delete(memc, test_literal_param("foo"), 0));
+
+    if (instance->write_buffer_offset < init_offset)
+    {
+      increment_request_id(&expected_ids[server_key]);
+    }
+
+    test_compare(TEST_SUCCESS, post_udp_op_check(memc, expected_ids));
+  }
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t udp_buffered_delete_test(memcached_st *memc)
+{
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1);
+  return udp_delete_test(memc);
+}
+
+static test_return_t udp_verbosity_test(memcached_st *memc)
+{
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  for (size_t x= 0; x < memcached_server_count(memc); x++)
+  {
+    increment_request_id(&expected_ids[x]);
+  }
+
+  test_compare(MEMCACHED_SUCCESS, memcached_verbosity(memc, 3));
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_quit_test(memcached_st *memc)
+{
+  Expected expected_ids;
+  memcached_quit(memc);
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_flush_test(memcached_st *memc)
+{
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  for (size_t x= 0; x < memcached_server_count(memc); x++)
+  {
+    increment_request_id(&expected_ids[x]);
+  }
+  memcached_error_print(memc);
+  test_compare_hint(MEMCACHED_SUCCESS, memcached_flush(memc, 0), memcached_last_error_message(memc));
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_incr_test(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("incr"), 
+                             test_literal_param("1"),
+                             (time_t)0, (uint32_t)0));
+
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  unsigned int server_key= memcached_generate_hash(memc, test_literal_param("incr"));
+  increment_request_id(&expected_ids[server_key]);
+
+  uint64_t newvalue;
+  test_compare(MEMCACHED_SUCCESS, memcached_increment(memc, test_literal_param("incr"), 1, &newvalue));
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_decr_test(memcached_st *memc)
+{
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, 
+                             test_literal_param(__func__),
+                             test_literal_param("1"),
+                             time_t(0), uint32_t(0)));
+
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  unsigned int server_key= memcached_generate_hash(memc,
+                                                   test_literal_param(__func__));
+  increment_request_id(&expected_ids[server_key]);
+
+  uint64_t newvalue;
+  test_compare(MEMCACHED_SUCCESS, memcached_decrement(memc,
+                                                      test_literal_param(__func__),
+                                                      1, &newvalue));
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+
+static test_return_t udp_stat_test(memcached_st *memc)
+{
+  memcached_return_t rc;
+  char args[]= "";
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+  memcached_stat_st *rv= memcached_stat(memc, args, &rc);
+  memcached_stat_free(memc, rv);
+  test_compare(MEMCACHED_NOT_SUPPORTED, rc);
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_version_test(memcached_st *memc)
+{
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+
+  test_compare(MEMCACHED_NOT_SUPPORTED,
+               memcached_version(memc));
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_get_test(memcached_st *memc)
+{
+  memcached_return_t rc;
+  size_t vlen;
+  Expected expected_ids;
+  get_udp_request_ids(memc, expected_ids);
+  test_null(memcached_get(memc, test_literal_param("foo"), &vlen, NULL, &rc));
+  test_compare(MEMCACHED_NOT_SUPPORTED, rc);
+
+  return post_udp_op_check(memc, expected_ids);
+}
+
+static test_return_t udp_mixed_io_test(memcached_st *memc)
+{
+  test_st mixed_io_ops [] ={
+    {"udp_set_test", 0,
+      (test_callback_fn*)udp_set_test},
+    {"udp_set_too_big_test", 0,
+      (test_callback_fn*)udp_set_too_big_test},
+    {"udp_delete_test", 0,
+      (test_callback_fn*)udp_delete_test},
+    {"udp_verbosity_test", 0,
+      (test_callback_fn*)udp_verbosity_test},
+    {"udp_quit_test", 0,
+      (test_callback_fn*)udp_quit_test},
+#if 0
+    {"udp_flush_test", 0,
+      (test_callback_fn*)udp_flush_test},
+#endif
+    {"udp_incr_test", 0,
+      (test_callback_fn*)udp_incr_test},
+    {"udp_decr_test", 0,
+      (test_callback_fn*)udp_decr_test},
+    {"udp_version_test", 0,
+      (test_callback_fn*)udp_version_test}
+  };
+
+  for (size_t x= 0; x < 500; x++)
+  {
+    test_st current_op= mixed_io_ops[(random() % 8)];
+    test_compare(TEST_SUCCESS, current_op.test_fn(memc));
+  }
+  return TEST_SUCCESS;
+}
+
+test_st compatibility_TESTS[] ={
+  {"version", 0, (test_callback_fn*)version_TEST },
+  {"version", 0, (test_callback_fn*)verbosity_TEST },
+  {"memcached_get()", 0, (test_callback_fn*)memcached_get_TEST },
+  {"memcached_mget_execute_by_key()", 0, (test_callback_fn*)memcached_mget_execute_by_key_TEST },
+  {"memcached_stat()", 0, (test_callback_fn*)memcached_stat_TEST },
+  {0, 0, 0}
+};
+
+test_st udp_setup_server_tests[] ={
+  {"set_udp_behavior_test", 0, (test_callback_fn*)set_udp_behavior_test},
+  {"add_tcp_server_udp_client_test", 0, (test_callback_fn*)add_tcp_server_udp_client_test},
+  {"add_udp_server_tcp_client_test", 0, (test_callback_fn*)add_udp_server_tcp_client_test},
+  {0, 0, 0}
+};
+
+test_st upd_io_tests[] ={
+  {"udp_set_test", 0, (test_callback_fn*)udp_set_test},
+  {"udp_buffered_set_test", 0, (test_callback_fn*)udp_buffered_set_test},
+  {"udp_set_too_big_test", 0, (test_callback_fn*)udp_set_too_big_test},
+  {"udp_delete_test", 0, (test_callback_fn*)udp_delete_test},
+  {"udp_buffered_delete_test", 0, (test_callback_fn*)udp_buffered_delete_test},
+  {"udp_verbosity_test", 0, (test_callback_fn*)udp_verbosity_test},
+  {"udp_quit_test", 0, (test_callback_fn*)udp_quit_test},
+  {"udp_flush_test", 0, (test_callback_fn*)udp_flush_test},
+  {"udp_incr_test", 0, (test_callback_fn*)udp_incr_test},
+  {"udp_decr_test", 0, (test_callback_fn*)udp_decr_test},
+  {"udp_stat_test", 0, (test_callback_fn*)udp_stat_test},
+  {"udp_version_test", 0, (test_callback_fn*)udp_version_test},
+  {"udp_get_test", 0, (test_callback_fn*)udp_get_test},
+  {"udp_mixed_io_test", 0, (test_callback_fn*)udp_mixed_io_test},
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"udp_setup", (test_callback_fn*)init_udp, 0, udp_setup_server_tests},
+  {"compatibility", (test_callback_fn*)init_udp, 0, compatibility_TESTS},
+  {"udp_io", (test_callback_fn*)init_udp_valgrind, 0, upd_io_tests},
+  {"udp_binary_io", (test_callback_fn*)binary_init_udp, 0, upd_io_tests},
+  {0, 0, 0, 0}
+};
+
+#include "tests/libmemcached_world.h"
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+
+  world->create((test_callback_create_fn*)world_create);
+  world->destroy((test_callback_destroy_fn*)world_destroy);
+
+  world->set_runner(new LibmemcachedRunner);
+}
@@ -0,0 +1,104 @@
+/*  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
+
+namespace test {
+
+class Memc {
+public:
+  Memc()
+  {
+    _memc= memcached_create(NULL);
+
+    if (_memc == NULL)
+    {
+      throw "memcached_create() failed";
+    }
+  }
+
+  Memc(const memcached_st* arg)
+  {
+    _memc= memcached_clone(NULL, arg);
+
+    if (_memc == NULL)
+    {
+      throw "memcached_clone() failed";
+    }
+  }
+
+  Memc(const std::string& arg)
+  {
+    _memc= memcached(arg.c_str(), arg.size());
+    if (_memc == NULL)
+    {
+      throw "memcached() failed";
+    }
+  }
+
+  Memc(in_port_t arg)
+  {
+    _memc= memcached_create(NULL);
+
+    if (_memc == NULL)
+    {
+      throw "memcached_create() failed";
+    }
+    memcached_server_add(_memc, "localhost", arg);
+  }
+
+  memcached_st* operator&() const
+  { 
+    return _memc;
+  }
+
+  memcached_st* operator->() const
+  { 
+    return _memc;
+  }
+
+  ~Memc()
+  {
+    memcached_free(_memc);
+  }
+
+private:
+  memcached_st *_memc;
+
+};
+
+} // namespace test
@@ -0,0 +1,126 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memcapable
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+# pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable;
+
+static test_return_t quiet_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "%d", int(get_free_port()));
+  const char *args[]= { "-p", buffer, "-q", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "-h", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t ascii_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "%d", int(default_port()));
+  const char *args[]= { "-p", buffer, "-a", 0 };
+
+  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t binary_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "%d", int(default_port()));
+  const char *args[]= { "-p", buffer, "-b", 0 };
+
+  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);
+
+  return TEST_SUCCESS;
+}
+
+test_st memcapable_tests[] ={
+  {"--quiet", 0, quiet_test},
+  {"-h", 0, help_test},
+  {"-a, ascii", 0, ascii_test},
+  {"-b, binary", 0, binary_test},
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memcapable", 0, 0, memcapable_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t&)
+{
+  SKIP_UNLESS(libtest::has_memcached());
+
+  SKIP_UNLESS(server_startup(servers, "memcached", libtest::default_port(), NULL));
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  executable= "./clients/memcapable";
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,151 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memcat
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("clients/memcat");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t cat_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo"), 0, 0, 0, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t NOT_FOUND_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+
+  memcached_st *memc= memcached(buffer, length);
+  ASSERT_TRUE(memc);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_st memcat_tests[] ={
+  {"--help", true, help_test },
+  {"cat(FOUND)", true, cat_test },
+  {"cat(NOT_FOUND)", true, NOT_FOUND_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memcat", 0, 0, memcat_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (not server_startup(servers, "memcached", libtest::default_port(), NULL))
+  {
+    error= TEST_FAILURE;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,123 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memcp
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+#include <sys/stat.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memcp");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+#if 0
+static test_return_t server_test(void *)
+{
+  int fd;
+  std::string tmp_file= create_tmpfile("memcp", fd);
+  ASSERT_TRUE(tmp_file.c_str());
+  struct stat buf;
+  ASSERT_EQ(fstat(fd, &buf), 0);
+  ASSERT_EQ(buf.st_size, 0);
+
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, tmp_file.c_str(), 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+  close(fd);
+  unlink(tmp_file.c_str());
+
+  return TEST_SUCCESS;
+}
+#endif
+
+test_st memcp_tests[] ={
+  {"--help", true, help_test },
+#if 0
+  {"--server_test", true, server_test },
+#endif
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memcp", 0, 0, memcp_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_FAILURE;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,129 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memdump
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memdump");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", "--quiet", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t FOUND_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo"), 0, 0, 0, 0));
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo2"), 0, 0, 0, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  length= snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_st memdump_tests[] ={
+  {"--help", true, help_test },
+  {"--server", true, server_test },
+  {"FOUND", true, FOUND_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memdump", 0, 0, memdump_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t&)
+{
+  SKIP_UNLESS(libtest::has_memcached());
+
+  ASSERT_TRUE(server_startup(servers, "memcached", libtest::default_port(), NULL));
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,131 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memerror
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memerror");
+
+static test_return_t help_TEST(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t version_TEST(void *)
+{
+  const char *args[]= { "--version", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t error_test(void *)
+{
+  const char *args[]= { "memcached_success", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t SUCCESS_TEST(void *)
+{
+  const char *args[]= { "0", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t bad_input_test(void *)
+{
+  const char *args[]= { "bad input", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memerror_tests[] ={
+  {"--help", 0, help_TEST},
+  {"--version", 0, version_TEST},
+  {"<error>", 0, error_test},
+  {"0", 0, SUCCESS_TEST},
+  {"<bad input>", 0, bad_input_test},
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memerror", 0, 0, memerror_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st&, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  return NULL;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,166 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memexist
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memexist");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t exist_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo"), 0, 0, 0, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t NOT_FOUND_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+
+  memcached_st *memc= memcached(buffer, length);
+  ASSERT_TRUE(memc);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_version(void*)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  memcached_st *memc= memcached(buffer, length);
+  ASSERT_TRUE(memc);
+  
+  test_return_t result= TEST_SUCCESS;
+  if (libmemcached_util_version_check(memc, 1, 4, 8) == false)
+  {
+    result= TEST_SKIPPED;
+  }
+  memcached_free(memc);
+
+  return result;
+}
+
+test_st memexist_tests[] ={
+  {"--help", true, help_test },
+  {"exist(FOUND)", true, exist_test },
+  {"exist(NOT_FOUND)", true, NOT_FOUND_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memexist", check_version, 0, memexist_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_SKIPPED;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,119 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memflush
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable;
+
+static test_return_t quiet_test(void *)
+{
+  const char *args[]= { "--quiet", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memflush_tests[] ={
+  {"--quiet", true, quiet_test },
+  {"--help", true, help_test },
+  {"--server", true, server_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memflush", 0, 0, memflush_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == 0)
+  {
+    error= TEST_SKIPPED;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  executable= "./clients/memflush";
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,121 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memping
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("clients/memping");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t ping_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t NOT_FOUND_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=nonexist.libmemcached.org:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memping_TESTS[] ={
+  {"--help", true, help_test },
+  {"ping(FOUND)", true, ping_TEST },
+  {"ping(NOT_FOUND)", true, NOT_FOUND_TEST },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memping", 0, 0, memping_TESTS },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_FAILURE;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
+
@@ -0,0 +1,171 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memrm
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memrm");
+
+static test_return_t quiet_test(void *)
+{
+  const char *args[]= { "--quiet", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t rm_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+
+  memcached_st *memc= memcached(buffer, strlen(buffer));
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo"), 0, 0, 0, 0));
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_SUCCESS, rc);
+
+  char memrm_buffer[1024];
+  snprintf(memrm_buffer, sizeof(memrm_buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t NOT_FOUND_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "foo", 0 };
+
+  memcached_st *memc= memcached(buffer, strlen(buffer));
+  test_true(memc);
+
+  memcached_return_t rc;
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc));
+  test_compare(MEMCACHED_NOTFOUND, rc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t multiple_NOT_FOUND_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "protocols", "foo", "mine", "bar", "dog", "cat", "foo", "mine",
+    "eye", "for", "the", "to", "not", "know", "what", "I", "should", "be", "doing", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memrm_tests[] ={
+  {"--quiet", true, quiet_test },
+  {"--help", true, help_test },
+  {"rm(FOUND)", true, rm_test },
+  {"rm(NOT_FOUND)", true, NOT_FOUND_TEST },
+  {"multiple rm(NOT_FOUND)", true, multiple_NOT_FOUND_TEST },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memrm", 0, 0, memrm_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_FAILURE;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,192 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memslap
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable;
+
+static test_return_t quiet_test(void *)
+{
+  const char *args[]= { "--quiet", 0 };
+
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_initial_load_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", "--initial-load=1000", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_initial_load_execute_number_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", "--initial-load=1000", "--execute-number=10", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_initial_load_execute_number_test_get_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", "--initial-load=1000", "--execute-number=10", "--test=get", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_initial_load_execute_number_test_set_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", "--initial-load=1000", "--execute-number=10", "--test=set", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_concurrency_initial_load_execute_number_test_set_non_blocking_test(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { buffer, "--concurrency=10", "--initial-load=1000", "--execute-number=10", "--test=set", "--non-blocking", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memslap_tests[] ={
+  {"--quiet", true, quiet_test },
+  {"--help", true, help_test },
+  {"--server_test", true, server_test },
+  {"--concurrency=10", true, server_concurrency_test },
+  {"--initial-load=1000", true, server_concurrency_initial_load_test },
+  {"--execute-number=10", true, server_concurrency_initial_load_execute_number_test },
+  {"--test=get", true, server_concurrency_initial_load_execute_number_test_get_test },
+  {"--test=set", true, server_concurrency_initial_load_execute_number_test_set_test },
+  {"--test=set --non-blockin", true, server_concurrency_initial_load_execute_number_test_set_non_blocking_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memslap", 0, 0, memslap_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  const char *argv[]= { "memslap", 0 };
+  if (server_startup(servers, "memcached", libtest::default_port(), argv) == false)
+  {
+    error= TEST_FAILURE;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  executable= "./clients/memslap";
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,130 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memstat
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable("./clients/memstat");
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t binary_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(libtest::default_port()));
+  const char *args[]= { buffer, " --binary ", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t server_version_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(libtest::default_port()));
+  const char *args[]= { buffer, " --server-version", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+  return TEST_SUCCESS;
+}
+
+static test_return_t binary_server_version_TEST(void *)
+{
+  char buffer[1024];
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(libtest::default_port()));
+  const char *args[]= { buffer, " --binary --server-version", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+test_st memstat_tests[] ={
+  {"--help", 0, help_test},
+  {"--binary", 0, binary_TEST},
+  {"--server-version", 0, server_version_TEST},
+  {"--binary --server-version", 0, binary_server_version_TEST},
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memstat", 0, 0, memstat_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_SKIPPED;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+  world->create(world_create);
+}
+
@@ -0,0 +1,162 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Test memtouch
+ *
+ *  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.
+ *
+ */
+
+
+/*
+  Test that we are cycling the servers we are creating during testing.
+*/
+
+#include <mem_config.h>
+
+#include <libtest/test.hpp>
+#include <libmemcached-1.0/memcached.h>
+#include <libmemcachedutil-1.0/util.h>
+
+using namespace libtest;
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
+static std::string executable;
+
+static test_return_t help_test(void *)
+{
+  const char *args[]= { "--help", 0 };
+
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t touch_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS,
+               memcached_set(memc, test_literal_param("foo"), 0, 0, 0, 0));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_exist(memc, test_literal_param("foo")));
+
+  snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { "--expire=30", buffer, "foo", 0 };
+  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));
+
+  test_compare(MEMCACHED_SUCCESS, memcached_exist(memc, test_literal_param("foo")));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t NOT_FOUND_test(void *)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+
+  test_compare(MEMCACHED_SUCCESS, memcached_flush(memc, 0));
+
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));
+
+  length= snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port()));
+  const char *args[]= { "--expire=30", buffer, "foo", 0 };
+  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));
+
+  test_compare(MEMCACHED_NOTFOUND, memcached_exist(memc, test_literal_param("foo")));
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t check_version(void*)
+{
+  char buffer[1024];
+  int length= snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port()));
+  memcached_st *memc= memcached(buffer, length);
+  test_true(memc);
+  
+  test_return_t result= TEST_SUCCESS;
+  if (libmemcached_util_version_check(memc, 1, 4, 8) == false)
+  {
+    result= TEST_SKIPPED;
+  }
+  memcached_free(memc);
+
+  return result;
+}
+
+test_st memtouch_tests[] ={
+  {"--help", true, help_test },
+  {"touch(FOUND)", true, touch_test },
+  {"touch(NOT_FOUND)", true, NOT_FOUND_test },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memtouch", check_version, 0, memtouch_tests },
+  {0, 0, 0, 0}
+};
+
+static void *world_create(server_startup_st& servers, test_return_t& error)
+{
+  if (libtest::has_memcached() == false)
+  {
+    error= TEST_SKIPPED;
+    return NULL;
+  }
+
+  if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false)
+  {
+    error= TEST_SKIPPED;
+  }
+
+  return &servers;
+}
+
+
+void get_world(libtest::Framework* world)
+{
+  executable= "./clients/memtouch";
+  world->collections(collection);
+  world->create(world_create);
+}
@@ -0,0 +1,41 @@
+/*  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
+
+LIBTEST_LOCAL
+test_return_t memcached_increment_namespace(memcached_st *memc);
@@ -0,0 +1,28 @@
+# 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
+
+noinst_HEADERS+= tests/libmemcached-1.0/parser.h
+
+tests_parser_SOURCES=
+tests_parser_CXXFLAGS=
+tests_parser_LDADD=
+
+tests_parser_SOURCES+= tests/parser.cc
+
+tests_parser_CXXFLAGS+= $(AM_CXXFLAGS) $(NO_EFF_CXX)
+tests_parser_LDADD+= $(TESTS_LDADDS)
+check_PROGRAMS+= tests/parser
+noinst_PROGRAMS+= tests/parser
+
+test-parser: tests/parser
+	@tests/parser
+
+valgrind-parser: tests/parser
+	@$(VALGRIND_COMMAND) tests/parser
@@ -0,0 +1,107 @@
+/*  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 <mem_config.h>
+
+/*
+  C++ interface test
+*/
+#include <libmemcached-1.0/memcached.hpp>
+#include <libtest/test.hpp>
+
+using namespace libtest;
+
+static test_return_t memcached_NULL_string_TEST(void*)
+{
+  test_null(memcached(NULL, 75));
+  return TEST_SUCCESS;
+}
+
+static test_return_t memcached_zero_string_length_TEST(void*)
+{
+  test_null(memcached("value", 0));
+  return TEST_SUCCESS;
+}
+
+static test_return_t putenv_localhost_quoted_TEST(void*)
+{
+  test_zero(setenv("LIBMEMCACHED", "\"--server=localhost\"", 1));
+  test_null(memcached(NULL, 0));
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t putenv_NULL_TEST(void*)
+{
+  test_zero(setenv("LIBMEMCACHED", "", 1));
+  memcached_st *memc= memcached(NULL, 0);
+  test_true(memc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+static test_return_t putenv_localhost_TEST(void*)
+{
+  test_zero(setenv("LIBMEMCACHED", "--server=localhost", 1));
+  memcached_st *memc= memcached(NULL, 0);
+  test_true(memc);
+
+  memcached_free(memc);
+
+  return TEST_SUCCESS;
+}
+
+test_st memcached_TESTS[] ={
+  {"memcached(NULL, 75)", false, (test_callback_fn*)memcached_NULL_string_TEST },
+  {"memcached(\"value\", 0)", false, (test_callback_fn*)memcached_zero_string_length_TEST },
+  {"putenv(LIBMEMCACHED=--server=localhost)", false, (test_callback_fn*)putenv_localhost_TEST },
+  {"putenv(LIBMEMCACHED)", false, (test_callback_fn*)putenv_NULL_TEST },
+  {"putenv(LIBMEMCACHED=--server=\"localhost\")", false, (test_callback_fn*)putenv_localhost_quoted_TEST },
+  {0, 0, 0}
+};
+
+collection_st collection[] ={
+  {"memcached()", 0, 0, memcached_TESTS},
+  {0, 0, 0, 0}
+};
+
+void get_world(libtest::Framework* world)
+{
+  world->collections(collection);
+}
+
@@ -1,316 +0,0 @@
-/*
-  C++ interface test
-*/
-#include "libmemcached/memcached.hpp"
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
-#include "server.h"
-
-#include "test.h"
-
-#include <string>
-#include <iostream>
-
-using namespace std;
-using namespace memcache;
-
-extern "C" {
-   test_return_t basic_test(memcached_st *memc);
-   test_return_t increment_test(memcached_st *memc);
-   test_return_t basic_master_key_test(memcached_st *memc);
-   test_return_t mget_result_function(memcached_st *memc);
-   test_return_t basic_behavior(memcached_st *memc);
-   test_return_t mget_test(memcached_st *memc);
-   memcached_return_t callback_counter(const memcached_st *,
-                                       memcached_result_st *,
-                                       void *context);
-}
-
-static void populate_vector(vector<char> &vec, const string &str)
-{
-  vec.reserve(str.length());
-  vec.assign(str.begin(), str.end());
-}
-
-static void copy_vec_to_string(vector<char> &vec, string &str)
-{
-  str.clear();
-  if (! vec.empty())
-  {
-    str.assign(vec.begin(), vec.end());
-  }
-}
-
-test_return_t basic_test(memcached_st *memc)
-{
-  Memcache foo(memc);
-  const string value_set("This is some data");
-  std::vector<char> value;
-  std::vector<char> test_value;
-
-  populate_vector(value, value_set);
-
-  foo.set("mine", value, 0, 0);
-  foo.get("mine", test_value);
-
-  assert((memcmp(&test_value[0], &value[0], test_value.size()) == 0));
-
-  /*
-   * Simple test of the exceptions here...this should throw an exception
-   * saying that the key is empty.
-   */
-  try
-  {
-    foo.set("", value, 0, 0);
-  }
-  catch (Error &err)
-  {
-    return TEST_SUCCESS;
-  }
-
-  return TEST_FAILURE;
-}
-
-test_return_t increment_test(memcached_st *memc)
-{
-  Memcache mcach(memc);
-  bool rc;
-  const string key("blah");
-  const string inc_value("1");
-  std::vector<char> inc_val;
-  vector<char> ret_value;
-  string ret_string;
-  uint64_t int_inc_value;
-  uint64_t int_ret_value;
-
-  populate_vector(inc_val, inc_value);
-
-  rc= mcach.set(key, inc_val, 0, 0);
-  if (rc == false)
-  {
-    return TEST_FAILURE;
-  }
-  mcach.get(key, ret_value);
-  if (ret_value.empty())
-  {
-    return TEST_FAILURE;
-  }
-  copy_vec_to_string(ret_value, ret_string);
-
-  int_inc_value= uint64_t(atol(inc_value.c_str()));
-  int_ret_value= uint64_t(atol(ret_string.c_str()));
-  assert(int_ret_value == int_inc_value);
-
-  rc= mcach.increment(key, 1, &int_ret_value);
-  assert(rc == true);
-  assert(int_ret_value == 2);
-
-  rc= mcach.increment(key, 1, &int_ret_value);
-  assert(rc == true);
-  assert(int_ret_value == 3);
-
-  rc= mcach.increment(key, 5, &int_ret_value);
-  assert(rc == true);
-  assert(int_ret_value == 8);
-
-  return TEST_SUCCESS;
-}
-
-test_return_t basic_master_key_test(memcached_st *memc)
-{
-  Memcache foo(memc);
-  const string value_set("Data for server A");
-  vector<char> value;
-  vector<char> test_value;
-  const string master_key_a("server-a");
-  const string master_key_b("server-b");
-  const string key("xyz");
-
-  populate_vector(value, value_set);
-
-  foo.setByKey(master_key_a, key, value, 0, 0);
-  foo.getByKey(master_key_a, key, test_value);
-
-  assert((memcmp(&value[0], &test_value[0], value.size()) == 0));
-
-  test_value.clear();
-
-  foo.getByKey(master_key_b, key, test_value);
-  assert((memcmp(&value[0], &test_value[0], value.size()) == 0));
-
-  return TEST_SUCCESS;
-}
-
-/* Count the results */
-memcached_return_t callback_counter(const memcached_st *,
-                                    memcached_result_st *,
-                                    void *context)
-{
-  unsigned int *counter= static_cast<unsigned int *>(context);
-
-  *counter= *counter + 1;
-
-  return MEMCACHED_SUCCESS;
-}
-
-test_return_t mget_result_function(memcached_st *memc)
-{
-  Memcache mc(memc);
-  bool rc;
-  string key1("fudge");
-  string key2("son");
-  string key3("food");
-  vector<string> keys;
-  vector< vector<char> *> values;
-  vector<char> val1;
-  vector<char> val2;
-  vector<char> val3;
-  populate_vector(val1, key1);
-  populate_vector(val2, key2);
-  populate_vector(val3, key3);
-  keys.reserve(3);
-  keys.push_back(key1);
-  keys.push_back(key2);
-  keys.push_back(key3);
-  values.reserve(3);
-  values.push_back(&val1);
-  values.push_back(&val2);
-  values.push_back(&val3);
-  unsigned int counter;
-  memcached_execute_fn callbacks[1];
-
-  /* We need to empty the server before we continue the test */
-  rc= mc.flush(0);
-  rc= mc.setAll(keys, values, 50, 9);
-  assert(rc == true);
-
-  rc= mc.mget(keys);
-  assert(rc == true);
-
-  callbacks[0]= &callback_counter;
-  counter= 0;
-  rc= mc.fetchExecute(callbacks, static_cast<void *>(&counter), 1);
-
-  assert(counter == 3);
-
-  return TEST_SUCCESS;
-}
-
-test_return_t mget_test(memcached_st *memc)
-{
-  Memcache mc(memc);
-  bool rc;
-  memcached_return_t mc_rc;
-  vector<string> keys;
-  vector< vector<char> *> values;
-  keys.reserve(3);
-  keys.push_back("fudge");
-  keys.push_back("son");
-  keys.push_back("food");
-  vector<char> val1;
-  vector<char> val2;
-  vector<char> val3;
-  populate_vector(val1, "fudge");
-  populate_vector(val2, "son");
-  populate_vector(val3, "food");
-  values.reserve(3);
-  values.push_back(&val1);
-  values.push_back(&val2);
-  values.push_back(&val3);
-
-  string return_key;
-  vector<char> return_value;
-
-  /* We need to empty the server before we continue the test */
-  rc= mc.flush(0);
-  assert(rc == true);
-
-  rc= mc.mget(keys);
-  assert(rc == true);
-
-  while ((mc_rc= mc.fetch(return_key, return_value)) != MEMCACHED_END)
-  {
-    assert(return_value.size() != 0);
-    return_value.clear();
-  }
-  assert(mc_rc == MEMCACHED_END);
-
-  rc= mc.setAll(keys, values, 50, 9);
-  assert(rc == true);
-
-  rc= mc.mget(keys);
-  assert(rc == true);
-
-  while ((mc_rc= mc.fetch(return_key, return_value)) != MEMCACHED_END)
-  {
-    assert(return_key.length() == return_value.size());
-    assert(!memcmp(&return_value[0], return_key.c_str(), return_value.size()));
-  }
-
-  return TEST_SUCCESS;
-}
-
-test_return_t basic_behavior(memcached_st *memc)
-{
-  Memcache mc(memc);
-  bool rc;
-  uint64_t value = 1;
-  rc = mc.setBehavior(MEMCACHED_BEHAVIOR_VERIFY_KEY, value);
-  assert(rc);
-  uint64_t behavior = mc.getBehavior(MEMCACHED_BEHAVIOR_VERIFY_KEY);
-  assert(behavior == value);
-
-  return TEST_SUCCESS;
-}
-
-test_st tests[] ={
-  { "basic", 0,
-    reinterpret_cast<test_callback_fn>(basic_test) },
-  { "basic_master_key", 0,
-    reinterpret_cast<test_callback_fn>(basic_master_key_test) },
-  { "increment_test", 0,
-    reinterpret_cast<test_callback_fn>(increment_test) },
-  { "mget", 1,
-    reinterpret_cast<test_callback_fn>(mget_test) },
-  { "mget_result_function", 1,
-    reinterpret_cast<test_callback_fn>(mget_result_function) },
-  { "basic_behavior", 0,
-    reinterpret_cast<test_callback_fn>(basic_behavior) },
-  {0, 0, 0}
-};
-
-collection_st collection[] ={
-  {"block", 0, 0, tests},
-  {0, 0, 0, 0}
-};
-
-#define SERVERS_TO_CREATE 5
-
-#include "libmemcached_world.h"
-
-void get_world(world_st *world)
-{
-  world->collections= collection;
-
-  world->create= reinterpret_cast<test_callback_create_fn>(world_create);
-  world->destroy= reinterpret_cast<test_callback_fn>(world_destroy);
-
-  world->test.startup= reinterpret_cast<test_callback_fn>(world_test_startup);
-  world->test.flush= reinterpret_cast<test_callback_fn>(world_flush);
-  world->test.pre_run= reinterpret_cast<test_callback_fn>(world_pre_run);
-  world->test.post_run= reinterpret_cast<test_callback_fn>(world_post_run);
-  world->test.on_error= reinterpret_cast<test_callback_error_fn>(world_on_error);
-
-  world->collection.startup= reinterpret_cast<test_callback_fn>(world_container_startup);
-  world->collection.shutdown= reinterpret_cast<test_callback_fn>(world_container_shutdown);
-
-  world->runner= &defualt_libmemcached_runner;
-}
@@ -0,0 +1,44 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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
+
+test_return_t memcached_pool_test(memcached_st *);
+test_return_t connection_pool_test(memcached_st *);
+test_return_t connection_pool2_test(memcached_st *);
+test_return_t connection_pool3_test(memcached_st *);
+test_return_t regression_bug_962815(memcached_st *);
@@ -0,0 +1,48 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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
+
+memcached_return_t server_print_callback(const memcached_st *ptr,
+                                         const memcached_instance_st *server,
+                                         void *context);
+
+memcached_return_t server_print_version_callback(const memcached_st *ptr,
+                                                 const memcached_server_st *server,
+                                                 void *context);
+
+const char * print_version(memcached_st *memc);
@@ -0,0 +1,54 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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
+
+test_return_t replication_set_test(memcached_st *memc);
+
+test_return_t replication_get_test(memcached_st *memc);
+
+test_return_t replication_mget_test(memcached_st *memc);
+
+test_return_t replication_delete_test(memcached_st *memc);
+
+test_return_t replication_randomize_mget_test(memcached_st *memc);
+
+test_return_t replication_randomize_mget_fail_test(memcached_st *memc);
+
+test_return_t replication_miss_test(memcached_st *memc);
+
+test_return_t check_replication_sanity_TEST(memcached_st*);
@@ -0,0 +1,153 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+#include "tests/libmemcached-1.0/generate.h"
+#include "tests/memc.hpp"
+#include "tests/print.h"
+
+class LibmemcachedRunner : public libtest::Runner {
+public:
+  test_return_t run(test_callback_fn* func, void *object)
+  {
+    return _runner_default(libmemcached_test_callback_fn(func), (libmemcached_test_container_st*)object);
+  }
+
+  test_return_t flush(void* arg)
+  {
+    return flush((libmemcached_test_container_st*)arg);
+  }
+
+  test_return_t flush(libmemcached_test_container_st *container)
+  {
+    test::Memc memc(container->parent());
+    memcached_flush(&memc, 0);
+    memcached_quit(&memc);
+
+    return TEST_SUCCESS;
+  }
+
+  test_return_t pre(test_callback_fn* func, void *object)
+  {
+    return _pre_runner_default(libmemcached_test_callback_fn(func), (libmemcached_test_container_st*)object);
+  }
+
+  test_return_t post(test_callback_fn* func, void *object)
+  {
+    return _post_runner_default(libmemcached_test_callback_fn(func), (libmemcached_test_container_st*)object);
+  }
+
+private:
+  test_return_t _runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
+  {
+    test_true(container);
+    test_true(container->parent());
+    test::Memc memc(container->parent());
+
+    test_compare(true, check());
+
+    test_return_t ret= TEST_SUCCESS;
+    if (func)
+    {
+      test_true(container);
+      ret= func(&memc);
+    }
+
+    return ret;
+  }
+
+  test_return_t _pre_runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
+  {
+    container->reset();
+    {
+      char buffer[BUFSIZ];
+
+      test_compare(MEMCACHED_SUCCESS,
+                   libmemcached_check_configuration(container->construct.option_string().c_str(), container->construct.option_string().size(),
+                                                    buffer, sizeof(buffer)));
+
+      test_null(container->parent());
+      container->parent(memcached(container->construct.option_string().c_str(), container->construct.option_string().size()));
+      test_true(container->parent());
+#if 0
+      test_compare(MEMCACHED_SUCCESS, memcached_version(container->parent()));
+#endif
+
+      if (container->construct.sasl())
+      {
+        if (memcached_failed(memcached_behavior_set(container->parent(), MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1)))
+        {
+          container->reset();
+          return TEST_FAILURE;
+        }
+
+        if (memcached_failed(memcached_set_sasl_auth_data(container->parent(), container->construct.username().c_str(), container->construct.password().c_str())))
+        {
+          container->reset();
+          return TEST_FAILURE;
+        }
+      }
+    }
+
+    test_compare(true, check());
+
+    if (func)
+    {
+      return func(container->parent());
+    }
+
+    return TEST_SUCCESS;
+  }
+
+  test_return_t _post_runner_default(libmemcached_test_callback_fn func, libmemcached_test_container_st *container)
+  {
+    test_compare(true, check());
+    cleanup_pairs(NULL);
+
+    test_return_t rc= TEST_SUCCESS;
+    if (func)
+    {
+      rc= func(container->parent());
+    }
+    container->reset();
+
+    return rc;
+  }
+};
+
@@ -1,239 +0,0 @@
-/* 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:
- *
- */
-
-/*
-  Startup, and shutdown the memcached servers.
-*/
-
-#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT+10
-
-#define PID_FILE_BASE "/tmp/%ulibmemcached_memc.pid"
-
-#include "config.h"
-
-#include <assert.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-
-#include <libmemcached/memcached.h>
-#include <libmemcached/util.h>
-
-#include "server.h"
-
-static struct timespec global_sleep_value= { .tv_sec= 0, .tv_nsec= 50000 };
-
-static void global_sleep(void)
-{
-#ifdef WIN32
-  sleep(1);
-#else
-  nanosleep(&global_sleep_value, NULL);
-#endif
-}
-
-static void kill_file(const char *file_buffer)
-{
-  FILE *fp= fopen(file_buffer, "r");
-
-  while ((fp= fopen(file_buffer, "r")))
-  {
-    char pid_buffer[1024];
-
-    if (fgets(pid_buffer, sizeof(pid_buffer), fp) != NULL)
-    {
-      pid_t pid= (pid_t)atoi(pid_buffer);
-      if (pid != 0)
-      {
-        if (kill(pid, SIGTERM) == -1)
-        {
-          remove(file_buffer); // If this happens we may be dealing with a dead server that left its pid file.
-        }
-        else
-        {
-          uint32_t counter= 3;
-          while ((kill(pid, 0) == 0) && --counter)
-          {
-            global_sleep();
-          }
-        }
-      }
-    }
-
-    global_sleep();
-
-    fclose(fp);
-  }
-}
-
-void server_startup(server_startup_st *construct)
-{
-  if ((construct->server_list= getenv("MEMCACHED_SERVERS")))
-  {
-    printf("servers %s\n", construct->server_list);
-    construct->servers= memcached_servers_parse(construct->server_list);
-    construct->server_list= NULL;
-    construct->count= 0;
-  }
-  else
-  {
-    {
-      char server_string_buffer[8096];
-      char *end_ptr;
-      end_ptr= server_string_buffer;
-
-      for (uint32_t x= 0; x < construct->count; x++)
-      {
-        int count;
-        int status;
-        in_port_t port;
-
-        {
-          char *var;
-          char variable_buffer[1024];
-
-          snprintf(variable_buffer, sizeof(variable_buffer), "LIBMEMCACHED_PORT_%u", x);
-
-          if ((var= getenv(variable_buffer)))
-          {
-            port= (in_port_t)atoi(var);
-          }
-          else
-          {
-            port= (in_port_t)(x + TEST_PORT_BASE);
-          }
-        }
-
-        char buffer[PATH_MAX];
-        snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
-        kill_file(buffer);
-
-        if (x == 0)
-        {
-          snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u -m 128",
-                   MEMCACHED_BINARY, x, port, port);
-        }
-        else
-        {
-          snprintf(buffer, sizeof(buffer), "%s -d -u root -P "PID_FILE_BASE" -t 1 -p %u -U %u",
-                   MEMCACHED_BINARY, x, port, port);
-        }
-	if (libmemcached_util_ping("localhost", port, NULL))
-	{
-	  fprintf(stderr, "Server on port %u already exists\n", port);
-	}
-	else
-	{
-	  status= system(buffer);
-	  fprintf(stderr, "STARTING SERVER: %s  status:%d\n", buffer, status);
-	}
-        count= sprintf(end_ptr, "localhost:%u,", port);
-        end_ptr+= count;
-      }
-      *end_ptr= 0;
-
-
-      int *pids= calloc(construct->count, sizeof(int));
-      for (uint32_t x= 0; x < construct->count; x++)
-      {
-        char buffer[PATH_MAX]; /* Nothing special for number */
-
-        snprintf(buffer, sizeof(buffer), PID_FILE_BASE, x);
-
-        uint32_t counter= 3000; // Absurd, just to catch run away process
-        while (pids[x] <= 0  && --counter)
-        {
-          FILE *file= fopen(buffer, "r");
-          if (file)
-          {
-            char pid_buffer[1024];
-            char *found= fgets(pid_buffer, sizeof(pid_buffer), file);
-
-            if (found)
-            {
-              pids[x]= atoi(pid_buffer);
-              fclose(file);
-
-              if (pids[x] > 0)
-                break;
-            }
-            fclose(file);
-          }
-          global_sleep();
-        }
-
-        bool was_started= false;
-        if (pids[x] > 0)
-        {
-          counter= 30;
-          while (--counter)
-          {
-            if (kill(pids[x], 0) == 0)
-            {
-              was_started= true;
-              break;
-            }
-            global_sleep();
-          }
-        }
-
-        if (was_started == false)
-        {
-          fprintf(stderr, "Failed to open buffer %s(%d)\n", buffer, pids[x]);
-          for (uint32_t y= 0; y < construct->count; y++)
-          {
-            if (pids[y] > 0)
-              kill(pids[y], SIGTERM);
-          }
-          abort();
-        }
-      }
-      free(pids);
-
-      construct->server_list= strdup(server_string_buffer);
-    }
-    printf("servers %s\n", construct->server_list);
-    construct->servers= memcached_servers_parse(construct->server_list);
-  }
-
-  assert(construct->servers);
-
-  srandom((unsigned int)time(NULL));
-
-  for (uint32_t x= 0; x < memcached_server_list_count(construct->servers); x++)
-  {
-    printf("\t%s : %d\n", memcached_server_name(&construct->servers[x]), memcached_server_port(&construct->servers[x]));
-    assert(construct->servers[x].fd == -1);
-    assert(construct->servers[x].cursor_active == 0);
-  }
-
-  printf("\n");
-}
-
-void server_shutdown(server_startup_st *construct)
-{
-  if (construct->server_list)
-  {
-    for (uint32_t x= 0; x < construct->count; x++)
-    {
-      char file_buffer[PATH_MAX]; /* Nothing special for number */
-      snprintf(file_buffer, sizeof(file_buffer), PID_FILE_BASE, x);
-      kill_file(file_buffer);
-    }
-
-    free(construct->server_list);
-  }
-}
@@ -1,33 +0,0 @@
-/*
- * 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.
- */
-
-/*
-  Server startup and shutdown functions.
-*/
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <libmemcached/memcached.h>
-
-typedef struct server_startup_st server_startup_st;
-
-struct server_startup_st
-{
-  uint8_t count;
-  uint8_t udp;
-  memcached_server_st *servers;
-  char *server_list;
-};
-
-void server_startup(server_startup_st *construct);
-void server_shutdown(server_startup_st *construct);
-
-#ifdef	__cplusplus
-}
-#endif
@@ -0,0 +1,43 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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
+
+test_return_t memcached_server_add_null_test(memcached_st*);
+test_return_t memcached_server_add_empty_test(memcached_st*);
+test_return_t memcached_server_many_TEST(memcached_st*);
+test_return_t memcached_server_many_weighted_TEST(memcached_st*);
@@ -1,29 +0,0 @@
-/* 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:
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-#include "server.h"
-
-int main(void)
-{
-  server_startup_st construct;
-
-  memset(&construct, 0, sizeof(server_startup_st));
-
-  construct.count= 4;
-
-  server_startup(&construct);
-
-  return 0;
-}
@@ -0,0 +1,67 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached client and server 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
+
+LIBTEST_LOCAL
+test_return_t string_static_null(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_null(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_with_size(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_with_size_toobig(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_append(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_append_toobig(void *);
+
+LIBTEST_LOCAL
+test_return_t string_alloc_append_multiple(void *);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -1,371 +0,0 @@
-/* uTest
- * 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.
- */
-
-/*
-  Sample test application.
-*/
-
-#include "config.h"
-
-#include <unistd.h>
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdint.h>
-
-#include "libmemcached/memcached.h"
-
-#include "test.h"
-
-static void world_stats_print(world_stats_st *stats)
-{
-  fputc('\n', stderr);
-  fprintf(stderr, "Total Collections\t\t\t\t%u\n", stats->collection_total);
-  fprintf(stderr, "\tFailed Collections\t\t\t%u\n", stats->collection_failed);
-  fprintf(stderr, "\tSkipped Collections\t\t\t%u\n", stats->collection_skipped);
-  fprintf(stderr, "\tSucceeded Collections\t\t%u\n", stats->collection_success);
-  fputc('\n', stderr);
-  fprintf(stderr, "Total\t\t\t\t%u\n", stats->total);
-  fprintf(stderr, "\tFailed\t\t\t%u\n", stats->failed);
-  fprintf(stderr, "\tSkipped\t\t\t%u\n", stats->skipped);
-  fprintf(stderr, "\tSucceeded\t\t%u\n", stats->success);
-}
-
-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;
-}
-
-const char *test_strerror(test_return_t code)
-{
-  switch (code) {
-  case TEST_SUCCESS:
-    return "ok";
-  case TEST_FAILURE:
-    return "failed";
-  case TEST_MEMORY_ALLOCATION_FAILURE:
-    return "memory allocation";
-  case TEST_SKIPPED:
-    return "skipped";
-  case TEST_MAXIMUM_RETURN:
-  default:
-    fprintf(stderr, "Unknown return value\n");
-    abort();
-  }
-}
-
-void create_core(void)
-{
-  if (getenv("LIBMEMCACHED_NO_COREDUMP") == NULL)
-  {
-    pid_t pid= fork();
-
-    if (pid == 0)
-    {
-      abort();
-    }
-    else
-    {
-      while (waitpid(pid, NULL, 0) != pid)
-      {
-        ;
-      }
-    }
-  }
-}
-
-
-static test_return_t _runner_default(test_callback_fn func, void *p)
-{
-  if (func)
-  {
-    return func(p);
-  }
-  else
-  {
-    return TEST_SUCCESS;
-  }
-}
-
-static world_runner_st defualt_runners= {
-  _runner_default,
-  _runner_default,
-  _runner_default
-};
-
-static test_return_t _default_callback(void *p)
-{
-  (void)p;
-
-  return TEST_SUCCESS;
-}
-
-static inline void set_default_fn(test_callback_fn *fn)
-{
-  if (*fn == NULL)
-  {
-    *fn= _default_callback;
-  }
-}
-
-static collection_st *init_world(world_st *world)
-{
-  if (! world->runner)
-  {
-    world->runner= &defualt_runners;
-  }
-
-  set_default_fn(&world->collection.startup);
-  set_default_fn(&world->collection.shutdown);
-
-  return world->collections;
-}
-
-
-int main(int argc, char *argv[])
-{
-  test_return_t return_code;
-  unsigned int x;
-  char *collection_to_run= NULL;
-  char *wildcard= NULL;
-  world_st world;
-  collection_st *collection;
-  collection_st *next;
-  void *world_ptr;
-
-  world_stats_st stats;
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  if (sasl_client_init(NULL) != SASL_OK)
-  {
-     fprintf(stderr, "Failed to initialize sasl library!\n");
-     return 1;
-  }
-#endif
-
-  memset(&stats, 0, sizeof(stats));
-  memset(&world, 0, sizeof(world));
-  get_world(&world);
-
-  collection= init_world(&world);
-
-  if (world.create)
-  {
-    test_return_t error;
-    world_ptr= world.create(&error);
-    if (error != TEST_SUCCESS)
-      exit(1);
-  }
-  else
-  {
-    world_ptr= NULL;
-  }
-
-  if (argc > 1)
-    collection_to_run= argv[1];
-
-  if (argc == 3)
-    wildcard= argv[2];
-
-  for (next= collection; next->name; next++)
-  {
-    test_return_t collection_rc= TEST_SUCCESS;
-    test_st *run;
-    bool failed= false;
-    bool skipped= false;
-
-    run= next->tests;
-    if (collection_to_run && fnmatch(collection_to_run, next->name, 0))
-      continue;
-
-    stats.collection_total++;
-
-    collection_rc= world.collection.startup(world_ptr);
-
-    if (collection_rc != TEST_SUCCESS)
-      goto skip_pre;
-
-    if (next->pre)
-    {
-      collection_rc= world.runner->pre(next->pre, world_ptr);
-    }
-
-skip_pre:
-    switch (collection_rc)
-    {
-      case TEST_SUCCESS:
-        fprintf(stderr, "\n%s\n\n", next->name);
-        break;
-      case TEST_FAILURE:
-        fprintf(stderr, "\n%s [ failed ]\n\n", next->name);
-        stats.collection_failed++;
-        goto cleanup;
-      case TEST_SKIPPED:
-        fprintf(stderr, "\n%s [ skipping ]\n\n", next->name);
-        stats.collection_skipped++;
-        goto cleanup;
-      case TEST_MEMORY_ALLOCATION_FAILURE:
-      case TEST_MAXIMUM_RETURN:
-      default:
-        assert(0);
-        break;
-    }
-
-
-    for (x= 0; run->name; run++)
-    {
-      struct timeval start_time, end_time;
-      long int load_time= 0;
-
-      if (wildcard && fnmatch(wildcard, run->name, 0))
-        continue;
-
-      fprintf(stderr, "Testing %s", run->name);
-
-      if (world.test.startup)
-      {
-        world.test.startup(world_ptr);
-      }
-
-      if (run->requires_flush && world.test.flush)
-      {
-        world.test.flush(world_ptr);
-      }
-
-      if (world.test.pre_run)
-      {
-        world.test.pre_run(world_ptr);
-      }
-
-
-      // Runner code
-      {
-#if 0
-        if (next->pre && world.runner->pre)
-        {
-          return_code= world.runner->pre(next->pre, world_ptr);
-
-          if (return_code != TEST_SUCCESS)
-          {
-            goto error;
-          }
-        }
-#endif
-
-        gettimeofday(&start_time, NULL);
-        return_code= world.runner->run(run->test_fn, world_ptr);
-        gettimeofday(&end_time, NULL);
-        load_time= timedif(end_time, start_time);
-
-#if 0
-        if (next->post && world.runner->post)
-        {
-          (void) world.runner->post(next->post, world_ptr);
-        }
-#endif
-      }
-
-      if (world.test.post_run)
-      {
-        world.test.post_run(world_ptr);
-      }
-
-      stats.total++;
-
-      fprintf(stderr, "\t\t\t\t\t");
-
-      switch (return_code)
-      {
-      case TEST_SUCCESS:
-        fprintf(stderr, "%ld.%03ld ", load_time / 1000, load_time % 1000);
-        stats.success++;
-        break;
-      case TEST_FAILURE:
-        stats.failed++;
-        failed= true;
-        break;
-      case TEST_SKIPPED:
-        stats.skipped++;
-        skipped= true;
-        break;
-      case TEST_MEMORY_ALLOCATION_FAILURE:
-        fprintf(stderr, "Exhausted memory, quitting\n");
-        abort();
-      case TEST_MAXIMUM_RETURN:
-      default:
-        assert(0); // Coding error.
-        break;
-      }
-
-      fprintf(stderr, "[ %s ]\n", test_strerror(return_code));
-
-      if (world.test.on_error)
-      {
-        test_return_t rc;
-        rc= world.test.on_error(return_code, world_ptr);
-
-        if (rc != TEST_SUCCESS)
-          break;
-      }
-    }
-
-    if (next->post && world.runner->post)
-    {
-      (void) world.runner->post(next->post, world_ptr);
-    }
-
-    if (! failed && ! skipped)
-    {
-      stats.collection_success++;
-    }
-cleanup:
-
-    world.collection.shutdown(world_ptr);
-  }
-
-  if (stats.collection_failed || stats.collection_skipped)
-  {
-    fprintf(stderr, "Some test failures and/or skipped test occurred.\n\n");
-  }
-  else
-  {
-    fprintf(stderr, "All tests completed successfully\n\n");
-  }
-
-  if (world.destroy)
-  {
-    test_return_t error;
-    error= world.destroy(world_ptr);
-
-    if (error != TEST_SUCCESS)
-    {
-      fprintf(stderr, "Failure during shutdown.\n");
-      stats.failed++; // We do this to make our exit code return 1
-    }
-  }
-
-  world_stats_print(&stats);
-
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
-  sasl_done();
-#endif
-
-  return stats.failed == 0 ? 0 : 1;
-}
@@ -1,195 +0,0 @@
-/* uTest
- * 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.
- */
-
-/*
-  Structures for generic tests.
-*/
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-
-#if !defined(__cplusplus)
-# include <stdbool.h>
-#endif
-
-typedef struct world_st world_st;
-typedef struct collection_st collection_st;
-typedef struct test_st test_st;
-
-typedef enum {
-  TEST_SUCCESS= 0, /* Backwards compatibility */
-  TEST_FAILURE,
-  TEST_MEMORY_ALLOCATION_FAILURE,
-  TEST_SKIPPED,
-  TEST_MAXIMUM_RETURN /* Always add new error code before */
-} test_return_t;
-
-typedef void *(*test_callback_create_fn)(test_return_t *error);
-typedef test_return_t (*test_callback_fn)(void *);
-typedef test_return_t (*test_callback_runner_fn)(test_callback_fn, void *);
-typedef test_return_t (*test_callback_error_fn)(test_return_t, void *);
-
-/* Help function for use with gettimeofday() */
-long int timedif(struct timeval a, struct timeval b);
-
-/**
-  A structure describing the test case.
-*/
-struct test_st {
-  const char *name;
-  bool requires_flush;
-  test_callback_fn test_fn;
-};
-
-
-/**
-  A structure which describes a collection of test cases.
-*/
-struct collection_st {
-  const char *name;
-  test_callback_fn pre;
-  test_callback_fn post;
-  test_st *tests;
-};
-
-
-/**
-  Structure which houses the actual callers for the test cases contained in
-  the collections.
-*/
-typedef struct {
-  test_callback_runner_fn pre;
-  test_callback_runner_fn run;
-  test_callback_runner_fn post;
-} world_runner_st;
-
-
-/**
-  world_st 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.
-*/
-
-struct world_st {
-  collection_st *collections;
-
-  /* These methods are called outside of any collection call. */
-  test_callback_create_fn create;
-  test_callback_fn destroy;
-
-  struct {
-    /* This is called a the beginning of any test run. */
-    test_callback_fn startup;
-
-    /* This called on a test if the test requires a flush call (the bool is from test_st) */
-    test_callback_fn flush;
-
-    /**
-      These are run before/after the test. If implemented. Their execution is not controlled
-      by the test.
-    */
-    test_callback_fn pre_run;
-    test_callback_fn post_run;
-
-    /**
-      If an error occurs during the test, this is called.
-    */
-    test_callback_error_fn on_error;
-  } test;
-
-  struct {
-    /* This is called a the beginning of any collection run. */
-    test_callback_fn startup;
-
-    /* This is called at the end of any collection run. */
-    test_callback_fn shutdown;
-  } collection;
-
-
-  /**
-    Runner represents the callers for the tests. If not implemented we will use
-    a set of default implementations.
-  */
-  world_runner_st *runner;
-};
-
-
-
-/**
-  @note world_stats_st is a simple structure for tracking test successes.
-*/
-typedef struct {
-  uint32_t collection_success;
-  uint32_t collection_skipped;
-  uint32_t collection_failed;
-  uint32_t collection_total;
-  uint32_t success;
-  uint32_t skipped;
-  uint32_t failed;
-  uint32_t total;
-} world_stats_st;
-
-/* How we make all of this work :) */
-void get_world(world_st *world);
-
-void create_core(void);
-
-/**
-  @note Friendly print function for errors.
-*/
-const char *test_strerror(test_return_t code);
-
-#define test_fail(A) \
-do \
-{ \
-  if (1) { \
-    fprintf(stderr, "\nFailed in %s:%d: %s\n", __FILE__, __LINE__, #A);\
-    create_core(); \
-    return TEST_FAILURE; \
-  } \
-} while (0)
-
-#define test_true(A) \
-do \
-{ \
-  if (! (A)) { \
-    fprintf(stderr, "\nAssertion failed in %s:%d: %s\n", __FILE__, __LINE__, #A);\
-    create_core(); \
-    return TEST_FAILURE; \
-  } \
-} while (0)
-
-#define test_false(A) \
-do \
-{ \
-  if ((A)) { \
-    fprintf(stderr, "\nAssertion failed in %s:%d: %s\n", __FILE__, __LINE__, #A);\
-    create_core(); \
-    return TEST_FAILURE; \
-  } \
-} while (0)
-
-#define test_strcmp(A,B) \
-do \
-{ \
-  if (strcmp((A), (B))) \
-  { \
-    fprintf(stderr, "\n%s:%d: %s -> %s\n", __FILE__, __LINE__, (A), (B)); \
-    create_core(); \
-    return TEST_FAILURE; \
-  } \
-} while (0)
-
-#ifdef	__cplusplus
-}
-#endif
@@ -0,0 +1,41 @@
+/*  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
+
+test_return_t test_memcached_touch(memcached_st *);
+test_return_t test_memcached_touch_by_key(memcached_st *);
@@ -0,0 +1,51 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  Libmemcached Client and Server 
+ *
+ *  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_st;
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+LIBTEST_LOCAL
+test_return_t virtual_back_map(memcached_st *);
+
+#ifdef	__cplusplus
+}
+#endif
@@ -1,20 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-if HAVE_LIBGTEST
-check_PROGRAMS += unittests/unittests
-endif
-
-unittests_unittests_SOURCES= \
-			     unittests/main.cc \
-			     unittests/strings.cc
-
-unittests_unittest_CXXFLAGS= ${AM_CXXFLAGS} ${NO_WERROR}
-unittests_unittests_LDADD= \
-			   tests/libserver.la \
-			   libmemcached/libmemcachedinternal.la \
-			   ${TESTS_LDADDS} ${LTLIBGTEST}
-# Shorthand
-unit: check-TESTS
-
@@ -1,21 +0,0 @@
-/* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
- *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
- *  Copyright (C) 2010 Monty Taylor
- *
- *  All rights reserved.
- *
- *  Use and distribution licensed under the BSD license.  See
- *  the COPYING file in the parent directory for full text.
- */
-
-#include "config.h"
-
-#include <gtest/gtest.h>
-
-
-int main(int argc, char **argv)
-{
-  ::testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
@@ -1,134 +0,0 @@
-/* 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.
- */
-
-#include "config.h"
-
-#define __STDC_LIMIT_MACROS
-#include <stdint.h>
-
-#include <gtest/gtest.h>
-
-#include <libmemcached/common.h>
-
-TEST(memcached_string_st, memcached_create_static)
-{
-  memcached_string_st string;
-  memcached_string_st *string_ptr;
-
-  memcached_st *memc= memcached_create(NULL);
-  string_ptr= memcached_string_create(memc, &string, 0);
-  ASSERT_TRUE(string.options.is_initialized);
-  ASSERT_TRUE(string_ptr);
-
-  /* The following two better be the same! */
-  ASSERT_FALSE(memcached_is_allocated(string_ptr));
-  ASSERT_FALSE(memcached_is_allocated(&string));
-  EXPECT_EQ(&string, string_ptr);
-
-  ASSERT_TRUE(string.options.is_initialized);
-  ASSERT_TRUE(memcached_is_initialized(&string));
-  memcached_string_free(&string);
-  ASSERT_FALSE(memcached_is_initialized(&string));
-
-  memcached_free(memc);
-}
-
-TEST(memcached_string_st, memcached_create_null)
-{
-  memcached_string_st *string;
-  memcached_st *memc= memcached_create(NULL);
-
-  string= memcached_string_create(memc, NULL, 0);
-  ASSERT_TRUE(string);
-  ASSERT_TRUE(memcached_is_allocated(string));
-  ASSERT_TRUE(memcached_is_initialized(string));
-  memcached_string_free(string);
-
-  memcached_free(memc);
-}
-
-TEST(memcached_string_st, string_alloc_with_size)
-{
-  memcached_string_st *string;
-  memcached_st *memc= memcached_create(NULL);
-
-  string= memcached_string_create(memc, NULL, 1024);
-  ASSERT_TRUE(string);
-  ASSERT_TRUE(memcached_is_allocated(string));
-  ASSERT_TRUE(memcached_is_initialized(string));
-  memcached_string_free(string);
-
-  memcached_free(memc);
-}
-
-TEST(memcached_string_st, string_alloc_with_size_toobig)
-{
-  memcached_st *memc= memcached_create(NULL);
-  memcached_string_st *string;
-
-  string= memcached_string_create(memc, NULL, SIZE_MAX);
-  ASSERT_FALSE(string);
-
-  memcached_free(memc);
-}
-
-TEST(memcached_string_st, string_alloc_append)
-{
-  char buffer[SMALL_STRING_LEN];
-  memcached_string_st *string;
-
-  memcached_st *memc= memcached_create(NULL);
-
-  /* Ring the bell! */
-  memset(buffer, 6, SMALL_STRING_LEN);
-
-  string= memcached_string_create(memc, NULL, 100);
-  ASSERT_TRUE(string);
-  ASSERT_TRUE(memcached_is_allocated(string));
-  ASSERT_TRUE(memcached_is_initialized(string));
-
-  for (uint32_t x= 0; x < 1024; x++)
-  {
-    memcached_return_t rc;
-    rc= memcached_string_append(string, buffer, SMALL_STRING_LEN);
-    EXPECT_EQ(rc, MEMCACHED_SUCCESS);
-  }
-  ASSERT_TRUE(memcached_is_allocated(string));
-  memcached_string_free(string);
-
-  memcached_free(memc);
-}
-
-TEST(memcached_string_st, string_alloc_append_toobig)
-{
-  memcached_return_t rc;
-  char buffer[SMALL_STRING_LEN];
-  memcached_string_st *string;
-
-  memcached_st *memc= memcached_create(NULL);
-
-  /* Ring the bell! */
-  memset(buffer, 6, SMALL_STRING_LEN);
-
-  string= memcached_string_create(memc, NULL, 100);
-  ASSERT_TRUE(string);
-  ASSERT_TRUE(memcached_is_allocated(string));
-  ASSERT_TRUE(memcached_is_initialized(string));
-
-  for (uint32_t x= 0; x < 1024; x++)
-  {
-    rc= memcached_string_append(string, buffer, SMALL_STRING_LEN);
-    EXPECT_EQ(rc, MEMCACHED_SUCCESS);
-  }
-  rc= memcached_string_append(string, buffer, SIZE_MAX);
-  EXPECT_EQ(rc, MEMCACHED_MEMORY_ALLOCATION_FAILURE);
-  ASSERT_TRUE(memcached_is_allocated(string));
-  memcached_string_free(string);
-
-  memcached_free(memc);
-}
@@ -0,0 +1,194 @@
+/*    $Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $    */
+/*    $NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $    */
+/*-
+ * Copyright (c) 1990, 1993
+ *    The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 2010
+ *    Stewart Smith
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (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>
+
+#if defined __SUNPRO_C || defined __DECC || defined __HP_cc
+# pragma ident "@(#)$Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $"
+# pragma ident "$NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $"
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <sys/select.h>
+
+#include <util/daemon.hpp>
+
+#include <iostream>
+
+namespace datadifferential {
+namespace util {
+
+pid_t parent_pid;
+
+extern "C"
+{
+
+static void sigusr1_handler(int sig)
+{
+  if (sig == SIGUSR1)
+  {
+    _exit(EXIT_SUCCESS);
+  }
+}
+
+}
+
+bool daemon_is_ready(bool close_io)
+{
+  if (kill(parent_pid, SIGUSR1) == -1)
+  {
+    perror("kill");
+    return false;
+  }
+
+  if (close_io == false)
+  {
+    return true;;
+  }
+
+  int fd;
+  if ((fd = open("/dev/null", O_RDWR, 0)) < 0)
+  {
+    perror("open");
+    return false;
+  }
+  else
+  {
+    if (dup2(fd, STDIN_FILENO) < 0)
+    {
+      perror("dup2 stdin");
+      return false;
+    }
+
+    if (dup2(fd, STDOUT_FILENO) < 0)
+    {
+      perror("dup2 stdout");
+      return false;
+    }
+
+    if (dup2(fd, STDERR_FILENO) < 0)
+    {
+      perror("dup2 stderr");
+      return false;
+    }
+
+    if (fd > STDERR_FILENO)
+    {
+      if (close(fd) < 0)
+      {
+        perror("close");
+        return false;
+      }
+    }
+  }
+
+  return true;
+}
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
+bool daemonize(bool is_chdir, bool wait_sigusr1)
+{
+  struct sigaction new_action;
+
+  new_action.sa_handler= sigusr1_handler;
+  sigemptyset(&new_action.sa_mask);
+  new_action.sa_flags= 0;
+  sigaction(SIGUSR1, &new_action, NULL);
+
+  parent_pid= getpid();
+
+  pid_t child= fork();
+
+  switch (child)
+  {
+  case -1:
+    return false;
+
+  case 0:
+    break;
+
+  default:
+    if (wait_sigusr1)
+    {
+      /* parent */
+      int exit_code= EXIT_FAILURE;
+      int status;
+      while (waitpid(child, &status, 0) != child)
+      { }
+
+      if (WIFEXITED(status))
+      {
+        exit_code= WEXITSTATUS(status);
+      }
+      if (WIFSIGNALED(status))
+      {
+        exit_code= EXIT_FAILURE;
+      }
+      _exit(exit_code);
+    }
+    else
+    {
+      _exit(EXIT_SUCCESS);
+    }
+  }
+
+  /* child */
+  if (setsid() == -1)
+  {
+    perror("setsid");
+    return false;
+  }
+
+  if (is_chdir)
+  {
+    if (chdir("/") < 0)
+    {
+      perror("chdir");
+      return false;
+    }
+  }
+
+  return true; 
+}
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,43 @@
+/*    $Header: /cvsroot/wikipedia/willow/src/bin/willow/daemon.c,v 1.1 2005/05/02 19:15:21 kateturner Exp $    */
+/*    $NetBSD: daemon.c,v 1.9 2003/08/07 16:42:46 agc Exp $    */
+/*-
+ * Copyright (c) 1990, 1993
+ *    The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 2010
+ *    Stewart Smith
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (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 datadifferential {
+namespace util {
+
+bool daemon_is_ready(bool close_io);
+bool daemonize(bool is_chdir= true, bool wait_sigusr1= true);
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,21 @@
+# 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
+
+
+noinst_HEADERS+= \
+		 util/daemon.hpp \
+		 util/instance.hpp \
+		 util/logfile.hpp \
+		 util/log.hpp \
+		 util/operation.hpp \
+		 util/signal.hpp \
+		 util/string.hpp \
+		 util/pidfile.hpp
@@ -0,0 +1,117 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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 <cassert>
+#include <cerrno>
+#include <cstddef>
+#include <cstdio>
+#include <netinet/in.h>
+#include <string>
+#include <sys/socket.h>
+
+#include "util/operation.hpp"
+
+struct addrinfo;
+
+namespace datadifferential {
+namespace util {
+
+class Instance
+{
+private:
+  enum connection_state_t {
+    NOT_WRITING,
+    NEXT_CONNECT_ADDRINFO,
+    CONNECT,
+    CONNECTING,
+    CONNECTED,
+    WRITING,
+    READING,
+    FINISHED
+  };
+  std::string _last_error;
+
+public: // Callbacks
+  class Finish {
+
+  public:
+    virtual ~Finish() { }
+
+    virtual bool call(const bool, const std::string &)= 0;
+  };
+
+
+public:
+  Instance(const std::string& hostname_arg, const std::string& service_arg);
+
+  Instance(const std::string& hostname_arg, const in_port_t port_arg);
+
+  ~Instance();
+
+  bool run();
+
+  void set_finish(Finish *arg)
+  {
+    _finish_fn= arg;
+  }
+
+  void push(util::Operation *next)
+  {
+    _operations.push_back(next);
+  }
+
+private:
+  void close_socket();
+
+  void free_addrinfo();
+
+  bool more_to_read() const;
+
+  std::string _host;
+  std::string _service;
+  int _sockfd;
+  connection_state_t state;
+  struct addrinfo *_addrinfo;
+  struct addrinfo *_addrinfo_next;
+  Finish *_finish_fn;
+  Operation::vector _operations;
+};
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,226 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ *  Data Differential Utility 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 <cerrno>
+#include <cstdarg>
+#include <cstdio>
+#include <fcntl.h>
+#include <iostream>
+#include <string>
+#include <syslog.h>
+
+#define UTIL_MAX_ERROR_SIZE 2048
+
+namespace datadifferential {
+namespace util {
+
+/** Verbosity levels.
+ */
+enum verbose_t
+{
+  // Logging this will cause shutdown
+  VERBOSE_FATAL= LOG_EMERG, // syslog:LOG_EMERG
+
+  VERBOSE_ALERT= LOG_ALERT, // syslog:LOG_ALERT
+  VERBOSE_CRITICAL= LOG_CRIT, //  syslog:LOG_CRIT
+
+  VERBOSE_ERROR= LOG_ERR, // syslog:LOG_ERR
+
+  VERBOSE_WARN= LOG_WARNING, // syslog:LOG_WARNING
+
+  VERBOSE_NOTICE= LOG_NOTICE, // syslog:LOG_NOTICE
+
+  VERBOSE_INFO= LOG_INFO, // syslog:LOG_INFO
+
+  VERBOSE_DEBUG= LOG_DEBUG // syslog:LOG_DEBUG
+};
+
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+
+struct log_info_st
+{
+  std::string name;
+  std::string filename;
+  int fd;
+  bool opt_syslog;
+  bool opt_file;
+  bool init_success;
+
+  log_info_st(const std::string& name_arg, const std::string &filename_arg, bool syslog_arg) :
+    name(name_arg),
+    filename(filename_arg),
+    fd(-1),
+    opt_syslog(syslog_arg),
+    opt_file(false),
+    init_success(false)
+  {
+    if (opt_syslog)
+    {
+      openlog(name.c_str(), LOG_PID | LOG_NDELAY, LOG_USER);
+    }
+
+    init();
+  }
+
+  void init()
+  {
+    if (filename.size())
+    {
+      if (filename.compare("stderr") == 0)
+      {
+        fd= STDERR_FILENO;
+      }
+      else
+      {
+        fd= open(filename.c_str(), O_CREAT | O_WRONLY | O_APPEND, 0644);
+        if (fd == -1)
+        {
+          if (opt_syslog)
+          {
+            char buffer[1024];
+            char *getcwd_ret= getcwd(buffer, sizeof(buffer));
+            syslog(LOG_ERR, "Could not open log file \"%.*s\", from \"%s\", open failed with (%s)", 
+                   int(filename.size()), filename.c_str(), 
+                   getcwd_ret,
+                   strerror(errno));
+          }
+          std::cerr << "Could not open log file for writing, switching to stderr." << std::endl;
+
+          fd= STDERR_FILENO;
+        }
+      }
+
+      opt_file= true;
+    }
+
+    init_success= true;
+  }
+
+  bool initialized() const
+  {
+    return init_success;
+  }
+
+  int file() const
+  {
+    return fd;
+  }
+
+  void write(verbose_t verbose, const char *format, ...)
+  {
+    if (opt_file or opt_syslog)
+    {
+      va_list args;
+      va_start(args, format);
+      char mesg[BUFSIZ];
+      int mesg_length= vsnprintf(mesg, sizeof(mesg), format, args);
+      va_end(args);
+
+      if (opt_file)
+      {
+        char buffer[UTIL_MAX_ERROR_SIZE];
+        int buffer_length= snprintf(buffer, sizeof(buffer), "%7s %.*s\n", verbose_name(verbose), mesg_length, mesg);
+        if (::write(file(), buffer, buffer_length) == -1)
+        {
+          std::cerr << "Could not write to log file." << std::endl;
+          syslog(LOG_EMERG, "gearmand could not open log file %s, got error %s", filename.c_str(), strerror(errno));
+        }
+
+      }
+
+      if (opt_syslog)
+      {
+        syslog(int(verbose), "%7s %.*s", verbose_name(verbose), mesg_length, mesg);
+      }
+    }
+  }
+
+  ~log_info_st()
+  {
+    if (fd != -1 and fd != STDERR_FILENO)
+    {
+      close(fd);
+    }
+
+    if (opt_syslog)
+    {
+      closelog();
+    }
+  }
+
+private:
+  const char *verbose_name(verbose_t verbose)
+  {
+    switch (verbose)
+    {
+    case VERBOSE_FATAL:
+      return "FATAL";
+
+    case VERBOSE_ALERT:
+      return "ALERT";
+
+    case VERBOSE_CRITICAL:
+      return "CRITICAL";
+
+    case VERBOSE_ERROR:
+      return "ERROR";
+
+    case VERBOSE_WARN:
+      return "WARNING";
+
+    case VERBOSE_NOTICE:
+      return "NOTICE";
+
+    case VERBOSE_INFO:
+      return "INFO";
+
+    case VERBOSE_DEBUG:
+      return "DEBUG";
+
+    default:
+      break;
+    }
+
+    return "UNKNOWN";
+  }
+};
+
+} // namespace util
+} // namespace datadifferential
@@ -0,0 +1,66 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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 <string>
+#include <fstream>
+
+namespace datadifferential {
+namespace util {
+
+class Logfile
+{
+public:
+  Logfile(const std::string &arg);
+
+  ~Logfile();
+
+  std::ofstream &log()
+  {
+    return _log_file;
+  }
+
+  bool open();
+
+private:
+  const std::string _filename;
+  std::ofstream _log_file;
+};
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,103 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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 <cstring>
+#include <iosfwd>
+#include <vector>
+
+namespace datadifferential {
+namespace util {
+
+class Operation {
+  typedef std::vector<char> Packet;
+
+public:
+  typedef std::vector<Operation *> vector;
+
+  Operation(const char *command, size_t command_length, bool expect_response= true) :
+    _expect_response(expect_response),
+    packet(),
+    _response()
+  {
+    packet.resize(command_length);
+    memcpy(&packet[0], command, command_length);
+  }
+
+  ~Operation()
+  { }
+
+  size_t size() const
+  {
+    return packet.size();
+  }
+
+  const char* ptr() const
+  {
+    return &(packet)[0];
+  }
+
+  bool has_response() const
+  {
+    return _expect_response;
+  }
+
+  void push(const char *buffer, size_t buffer_size)
+  {
+    size_t response_size= _response.size();
+    _response.resize(response_size +buffer_size);
+    memcpy(&_response[0] +response_size, buffer, buffer_size);
+  }
+
+  // Return false on error
+  bool response(std::string &);
+
+  bool reconnect() const
+  {
+    return false;
+  }
+
+private:
+  bool _expect_response;
+  Packet packet;
+  Packet _response;
+};
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,162 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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 "mem_config.h"
+
+#include "util/pidfile.hpp"
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <fcntl.h>
+#include <iostream>
+#include <sstream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+extern "C" {
+
+  char pid_file[1024 * 4]= { 0 };
+
+  static void remove_pidfile(void)
+  {
+    if (pid_file[0])
+    {
+      if (unlink(pid_file) == -1)
+      {
+        std::cerr << "Could not remove pidfile: " << pid_file << "(" << strerror(errno) << ")" << std::endl;
+      }
+
+      pid_file[0]= 0;
+    }
+  }
+
+}
+
+namespace datadifferential {
+namespace util {
+
+Pidfile::Pidfile(const std::string &arg) :
+  _last_errno(0),
+  _filename(arg)
+{
+}
+
+
+Pidfile::~Pidfile()
+{
+  if (not _filename.empty())
+  {
+    if (access(_filename.c_str(), F_OK) == -1)
+    {
+      std::stringstream error_stream;
+      error_stream << "Could not access the pid file: " << _filename << "(" << strerror(errno) << ")";
+      _error_message= error_stream.str();
+    }
+    else if (unlink(_filename.c_str()) == -1)
+    {
+      std::stringstream error_stream;
+      error_stream << "Could not remove the pid file: " << _filename << "(" << strerror(errno) << ")";
+      _error_message= error_stream.str();
+    }
+  }
+  pid_file[0]= 0;
+}
+
+bool Pidfile::create()
+{
+  if (_filename.empty())
+  {
+    return true;
+  }
+
+  if (access(_filename.c_str(), F_OK) == 0)
+  {
+    if (unlink(_filename.c_str()) == -1)
+    {
+      std::stringstream error_stream;
+      error_stream << "Unable to remove exisiting file:" << _filename << "(" << strerror(errno) << ")";
+      _error_message= error_stream.str();
+
+      return false;
+    }
+  }
+
+  int oflags= O_CREAT|O_WRONLY|O_TRUNC;
+#ifdef HAVE_O_CLOEXEC
+  oflags= oflags | O_CLOEXEC;
+#endif
+
+  int file;
+  if ((file = open(_filename.c_str(), oflags, S_IRWXU|S_IRGRP|S_IROTH)) < 0)
+  {
+    std::stringstream error_stream;
+    error_stream << "Could not open pid file for writing: " << _filename << "(" << strerror(errno) << ")";
+    _error_message= error_stream.str();
+    
+    return false;
+  }
+
+  char buffer[BUFSIZ];
+  unsigned long temp= static_cast<unsigned long>(getpid());
+  int length= snprintf(buffer, sizeof(buffer), "%lu\n", temp);
+  if (write(file, buffer, length) != length)
+  { 
+    std::stringstream error_stream;
+    error_stream << "Could not write pid to file: " << _filename << "(" << strerror(errno) << ")";
+    _error_message= error_stream.str();
+    close(file);
+
+    return false;
+  }
+
+  if (close(file) < 0)
+  {
+    _error_message+= "Could not close() file after writing pid to it: "; 
+    _error_message+= _filename;
+    return false;
+  }
+  snprintf(pid_file, sizeof(pid_file), "%s", _filename.c_str());
+  atexit(remove_pidfile);
+
+  return true;
+}
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,66 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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 <string>
+
+namespace datadifferential {
+namespace util {
+
+class Pidfile
+{
+public:
+  Pidfile(const std::string &arg);
+
+  ~Pidfile();
+
+  const std::string &error_message()
+  {
+    return _error_message;
+  }
+
+  bool create();
+
+private:
+  int _last_errno;
+  const std::string _filename;
+  std::string _error_message;
+};
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,106 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ *
+ *  Data Differential Utility 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 <pthread.h>
+#include <semaphore.h>
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+typedef void (signal_callback_fn)();
+
+#ifdef	__cplusplus
+}
+#endif
+
+namespace datadifferential {
+namespace util {
+
+enum shutdown_t {
+  SHUTDOWN_RUNNING,
+  SHUTDOWN_GRACEFUL,
+  SHUTDOWN_FORCED
+};
+
+class SignalThread {
+  bool _exit_on_signal;
+  sigset_t set;
+  sem_t lock;
+  uint64_t magic_memory;
+  volatile shutdown_t __shutdown;
+  pthread_mutex_t shutdown_mutex;
+
+public:
+
+  SignalThread(bool exit_on_signal_arg= false);
+
+  void test();
+  void post();
+  bool setup();
+
+  bool exit_on_signal()
+  {
+    return _exit_on_signal;
+  }
+
+  int wait(int& sig)
+  {
+    return sigwait(&set, &sig);
+  }
+
+  ~SignalThread();
+
+  void set_shutdown(shutdown_t arg);
+  bool is_shutdown();
+  shutdown_t get_shutdown();
+
+  void sighup();
+  void sighup(signal_callback_fn* arg);
+
+private:
+  pthread_t thread;
+  signal_callback_fn* _sighup;
+};
+
+} /* namespace util */
+} /* namespace datadifferential */
@@ -0,0 +1,57 @@
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
+ * 
+ *  DataDifferential Utility 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.
+ *
+ */
+
+
+/*
+  Simple defines
+*/
+
+#include <cstring>
+#include <cstddef>
+
+#pragma once
+
+#define util_literal_param(X) (X), (static_cast<size_t>((sizeof(X) - 1)))
+#define util_literal_param_size(X) static_cast<size_t>(sizeof(X) - 1)
+
+#define util_literal_compare_param(X) (static_cast<size_t>((sizeof(X) - 1))), (X)
+
+#define util_string_make_from_cstr(X) (X), ((X) ? strlen(X) : 0)
+
+#define util_string_make_from_array(__array) (__array), (strlen(__array))
+
+#define util_array_length(__array) sizeof(__array)/sizeof(&__array)
+
@@ -0,0 +1 @@
+m4_define([VERSION_NUMBER], [1.0.18])
@@ -4,8 +4,10 @@
 noinst_HEADERS+= win32/wrappers.h
 
 if BUILD_WIN32_WRAPPERS
+libhashkit_libhashkit_la_LDFLAGS+=-no-undefined
 libmemcached_libmemcached_la_LDFLAGS+=-no-undefined
+if BUILD_LIBMEMCACHED_PROTOCOL
 libmemcached_libmemcachedprotocol_la_LDFLAGS+=-no-undefined
+endif
 libmemcached_libmemcachedutil_la_LDFLAGS+=-no-undefined
-libhashkit_libhashkit_la_LDFLAGS+=-no-undefined
 endif
@@ -9,8 +9,7 @@
  *          to avoid a bunch of ifdefs in the rest of the code
  *
  */
-#ifndef WIN32_WRAPPERS_H
-#define WIN32_WRAPPERS_H 1
+#pragma once 
 
 #include <inttypes.h>
 
@@ -29,17 +28,42 @@
  * WinSock use a separate range for error codes. Let's just map to the
  * WinSock ones.
  */
-#define EADDRINUSE WSAEADDRINUSE
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define EINPROGRESS WSAEINPROGRESS
-#define EALREADY WSAEALREADY
-#define EISCONN WSAEISCONN
-#define ENOTCONN WSAENOTCONN
-#define ENOBUFS WSAENOBUFS
-#define SHUT_RDWR SD_BOTH
+#ifndef EADDRINUSE
+# define EADDRINUSE WSAEADDRINUSE
+#endif
+
+#ifndef EWOULDBLOCK
+# define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+
+#ifndef EINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
+#endif
+
+#ifndef EALREADY
+# define EALREADY WSAEALREADY
+#endif
+
+#ifndef EISCONN
+# define EISCONN WSAEISCONN
+#endif
+
+#ifndef ENOTCONN
+# define ENOTCONN WSAENOTCONN
+#endif
+
+#ifndef ENOBUFS
+# define ENOBUFS WSAENOBUFS
+#endif
+
+#ifndef SHUT_RDWR
+# define SHUT_RDWR SD_BOTH
+#endif
 
 /* EAI_SYSTEM isn't defined anywhere... just set it to... 11? */
-#define EAI_SYSTEM 11
+#ifndef EAI_SYSTEM
+# define EAI_SYSTEM 11
+#endif
 
 /* Best effort mapping of functions to alternative functions */
 #define index(a,b) strchr(a,b)
@@ -51,5 +75,3 @@
 #define waitpid(a,b,c) (-1)
 #define fnmatch(a,b,c) (-1)
 #define sleep(a) Sleep(a*1000)
-
-#endif /* WIN32_WRAPPERS_H */
@@ -0,0 +1,58 @@
+diff --git a/src/libmemcached/build-aux/missing b/src/libmemcached/build-aux/missing
+index cdea514..11c96a6 100755
+--- a/src/libmemcached/build-aux/missing
++++ b/src/libmemcached/build-aux/missing
+@@ -1,7 +1,7 @@
+ #! /bin/sh
+ # Common wrapper for a few potentially missing GNU programs.
+ 
+-scriptversion=2012-06-26.16; # UTC
++scriptversion=2014-12-17.19; # UTC
+ 
+ # Copyright (C) 1996-2013 Free Software Foundation, Inc.
+ # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+@@ -96,6 +96,7 @@ if test $st -eq 63; then
+ elif test $st -eq 127; then
+   # Program was missing.
+   msg="missing on your system"
++  exit 0 # Added for Memcached::libmemcached 1.001800 - ignore missing programs.
+ else
+   # Program was found and executed, but failed.  Give up.
+   exit $st
+diff --git a/src/libmemcached/clients/memflush.cc b/src/libmemcached/clients/memflush.cc
+index 8bd0dbf..71545ea 100644
+--- a/src/libmemcached/clients/memflush.cc
++++ b/src/libmemcached/clients/memflush.cc
+@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
+ {
+   options_parse(argc, argv);
+ 
+-  if (opt_servers == false)
++  if (opt_servers == NULL)
+   {
+     char *temp;
+ 
+@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
+       opt_servers= strdup(temp);
+     }
+ 
+-    if (opt_servers == false)
++    if (opt_servers == NULL)
+     {
+       std::cerr << "No Servers provided" << std::endl;
+       exit(EXIT_FAILURE);
+diff --git a/src/libmemcached/libmemcached/byteorder.cc b/src/libmemcached/libmemcached/byteorder.cc
+index 9f11aa8..cc5ff42 100644
+--- a/src/libmemcached/libmemcached/byteorder.cc
++++ b/src/libmemcached/libmemcached/byteorder.cc
+@@ -38,6 +38,10 @@
+ #include "mem_config.h"
+ #include "libmemcached/byteorder.h"
+ 
++#ifdef HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
+ /* Byte swap a 64-bit number. */
+ #ifndef swap64
+ static inline uint64_t swap64(uint64_t in)
@@ -17,8 +17,12 @@ diag( "Testing Memcached::libmemcached $VERSION, Perl $], $^O, $^X" );
 ok defined &Memcached::libmemcached::memcached_lib_version,
     '&Memcached::libmemcached::memcached_lib_version should be defined';
 
-my $lib_version = Memcached::libmemcached::memcached_lib_version();
+my $lib_version = Memcached::libmemcached::memcached_lib_version(); # 1.0.8
 ok $lib_version;
 
-like $VERSION, qr/^\Q$lib_version\E\d\d/,
-    "$VERSION should be $lib_version with two digits appended",
+# 1.0.8 => 1.00.08
+(my $lib_ver = $lib_version) =~ s/\.(\d)\b/ sprintf ".%02d", $1 /eg;
+$lib_ver =~ s/\.(\d+)$/$1/; # drop second period
+
+like $VERSION, qr/^\Q$lib_ver\E\d\d/,
+    "$VERSION should be $lib_ver with two digits appended",
@@ -15,7 +15,7 @@ use Memcached::libmemcached
     #   other functions used by the tests
     qw(
         memcached_server_add_unix_socket
-        MEMCACHED_FAILURE
+        MEMCACHED_INVALID_ARGUMENTS
     );
 
 use lib 't/lib';
@@ -24,19 +24,20 @@ use libmemcached_test;
 my $memc = libmemcached_test_create();
 
 plan tests => 6;
+$| = 1;
 
 is memcached_strerror($memc, 0), 'SUCCESS';
 is memcached_strerror($memc, 1), 'FAILURE';
 
 # XXX also test dual-var nature of return codes here
 my $rc = memcached_server_add_unix_socket($memc, undef); # should fail
-ok !defined($rc), 'rc should not be defined';
+is $rc, undef, 'rc should not be defined';
 
 my $errstr = $memc->errstr;
 #use Devel::Peek; Dump($errstr);
-cmp_ok $errstr, '==', MEMCACHED_FAILURE(),
-    'should be MEMCACHED_FAILURE integer in numeric context';
-cmp_ok $errstr, 'eq', "FAILURE",
-    'should be "FAILURE" string in string context';
+cmp_ok $errstr, '==', MEMCACHED_INVALID_ARGUMENTS(),
+    'should be MEMCACHED_INVALID_ARGUMENTS integer in numeric context';
+cmp_ok $errstr, 'eq', "INVALID ARGUMENTS",
+    'should be "INVALID ARGUMENTS" string in string context';
 
 is $errstr, memcached_errstr($memc);
@@ -0,0 +1,31 @@
+# tests for functions documented in memcached_create.pod
+
+use strict;
+use warnings;
+
+use Test::More tests => 8;
+
+BEGIN {
+use_ok( 'Memcached::libmemcached',
+#   functions explicitly tested by this file
+qw(
+),
+#   other functions used by the tests
+qw(
+    memcached_server_add
+));
+}
+
+my ($memc);
+
+ok $memc = Memcached::libmemcached->new();
+is ref $memc, 'Memcached::libmemcached';
+
+ok memcached_server_add($memc, "localhost", 11211);
+ok memcached_server_add($memc, "localhost", 11212);
+ok $memc->get_server_for_key("test3") eq "localhost:11211", "get_server_for_key test3 == localhost:11211";
+ok $memc->get_server_for_key("test") eq "localhost:11212", "get_server_for_key test == localhost:11212";
+
+undef $memc;
+
+ok 1;
@@ -129,8 +129,7 @@ T_FLAGS
 INPUT
 T_EXPIRATION
         /* T_EXPIRATION */
-        /* XXX add logic for default expiration */
-        $var = ($type)SvUV($arg)
+        $var = (SvOK($arg)) ? ($type)SvUV($arg) : 0;
 
 OUTPUT
 T_MEMCACHED
@@ -141,7 +140,7 @@ T_MEMCACHED
             /* setup $arg as a ref to a blessed hash hv */
             lmc_state_st *lmc_state;
             HV *hv = newHV();
-            char *classname = \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\";
+            const char *classname = \"${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\";
             /* take (sub)class name to use from class_sv if appropriate */
             if (class_sv && SvOK(class_sv) && sv_derived_from(class_sv, classname))
                 classname = (SvROK(class_sv)) ? sv_reftype(class_sv, 0) : SvPV_nolen(class_sv);