vinted-memcached 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/BENCHMARKS +142 -0
- data/CHANGELOG +176 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +45 -0
- data/LICENSE +184 -0
- data/Manifest +209 -0
- data/README.rdoc +124 -0
- data/Rakefile +134 -0
- data/TODO +1 -0
- data/ext/extconf-make.rb +25 -0
- data/ext/extconf.rb +78 -0
- data/ext/libmemcached-0.32/AUTHORS +7 -0
- data/ext/libmemcached-0.32/COPYING +32 -0
- data/ext/libmemcached-0.32/ChangeLog +303 -0
- data/ext/libmemcached-0.32/INSTALL +302 -0
- data/ext/libmemcached-0.32/Makefile.am +36 -0
- data/ext/libmemcached-0.32/Makefile.in +911 -0
- data/ext/libmemcached-0.32/NEWS +1 -0
- data/ext/libmemcached-0.32/README +33 -0
- data/ext/libmemcached-0.32/THANKS +14 -0
- data/ext/libmemcached-0.32/TODO +11 -0
- data/ext/libmemcached-0.32/aclocal.m4 +2108 -0
- data/ext/libmemcached-0.32/clients/Makefile.am +80 -0
- data/ext/libmemcached-0.32/clients/Makefile.in +773 -0
- data/ext/libmemcached-0.32/clients/client_options.h +32 -0
- data/ext/libmemcached-0.32/clients/execute.c +64 -0
- data/ext/libmemcached-0.32/clients/execute.h +5 -0
- data/ext/libmemcached-0.32/clients/generator.c +74 -0
- data/ext/libmemcached-0.32/clients/generator.h +20 -0
- data/ext/libmemcached-0.32/clients/memcat.c +178 -0
- data/ext/libmemcached-0.32/clients/memcp.c +251 -0
- data/ext/libmemcached-0.32/clients/memdump.c +170 -0
- data/ext/libmemcached-0.32/clients/memerror.c +80 -0
- data/ext/libmemcached-0.32/clients/memflush.c +143 -0
- data/ext/libmemcached-0.32/clients/memrm.c +160 -0
- data/ext/libmemcached-0.32/clients/memslap.c +441 -0
- data/ext/libmemcached-0.32/clients/memstat.c +326 -0
- data/ext/libmemcached-0.32/clients/utilities.c +207 -0
- data/ext/libmemcached-0.32/clients/utilities.h +41 -0
- data/ext/libmemcached-0.32/config/compile +143 -0
- data/ext/libmemcached-0.32/config/config.guess +1561 -0
- data/ext/libmemcached-0.32/config/config.rpath +666 -0
- data/ext/libmemcached-0.32/config/config.sub +1686 -0
- data/ext/libmemcached-0.32/config/depcomp +630 -0
- data/ext/libmemcached-0.32/config/install-sh +520 -0
- data/ext/libmemcached-0.32/config/ltmain.sh +9636 -0
- data/ext/libmemcached-0.32/config/missing +376 -0
- data/ext/libmemcached-0.32/config.h.in +254 -0
- data/ext/libmemcached-0.32/configure +23843 -0
- data/ext/libmemcached-0.32/configure.ac +120 -0
- data/ext/libmemcached-0.32/libmemcached/Makefile.am +111 -0
- data/ext/libmemcached-0.32/libmemcached/Makefile.in +1069 -0
- data/ext/libmemcached-0.32/libmemcached/byteorder.c +31 -0
- data/ext/libmemcached-0.32/libmemcached/common.h +189 -0
- data/ext/libmemcached-0.32/libmemcached/crc.c +86 -0
- data/ext/libmemcached-0.32/libmemcached/hsieh_hash.c +68 -0
- data/ext/libmemcached-0.32/libmemcached/jenkins_hash.c +213 -0
- data/ext/libmemcached-0.32/libmemcached/libmemcached.ver +1 -0
- data/ext/libmemcached-0.32/libmemcached/libmemcached_probes.d +30 -0
- data/ext/libmemcached-0.32/libmemcached/libmemcached_probes.h +82 -0
- data/ext/libmemcached-0.32/libmemcached/md5.c +354 -0
- data/ext/libmemcached-0.32/libmemcached/memcached/README.txt +7 -0
- data/ext/libmemcached-0.32/libmemcached/memcached/protocol_binary.h +385 -0
- data/ext/libmemcached-0.32/libmemcached/memcached.c +153 -0
- data/ext/libmemcached-0.32/libmemcached/memcached.h +305 -0
- data/ext/libmemcached-0.32/libmemcached/memcached.hpp +799 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_allocators.c +72 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_analyze.c +100 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_auto.c +207 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_behavior.c +290 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_callback.c +175 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_configure.h.in +23 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_connect.c +371 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_constants.h +146 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_delete.c +0 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_do.c +72 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_dump.c +79 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_exist.c +114 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_exist.h +20 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_fetch.c +102 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_flush.c +89 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_flush_buffers.c +23 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_get.c +494 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_get.h +87 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_hash.c +252 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_hosts.c +510 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_internal.h +31 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_io.c +594 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_io.h +72 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_key.c +28 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_parse.c +74 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_pool.h +38 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_purge.c +76 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_quit.c +75 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_response.c +529 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_result.c +57 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_result.h +59 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_sasl.c +225 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_sasl.h +44 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_server.c +159 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_server.h +93 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_stats.c +437 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_storage.c +514 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_storage.h +107 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_strerror.c +92 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_string.c +138 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_string.h +53 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_touch.c +60 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_touch.h +31 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_types.h +44 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_util.h +15 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_verbosity.c +36 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_version.c +112 -0
- data/ext/libmemcached-0.32/libmemcached/memcached_watchpoint.h +38 -0
- data/ext/libmemcached-0.32/libmemcached/murmur_hash.c +76 -0
- data/ext/libmemcached-0.32/libmemcached/visibility.h +51 -0
- data/ext/libmemcached-0.32/libmemcachedutil/Makefile.am +11 -0
- data/ext/libmemcached-0.32/libmemcachedutil/Makefile.in +604 -0
- data/ext/libmemcached-0.32/libmemcachedutil/libmemcachedutil.ver +1 -0
- data/ext/libmemcached-0.32/libmemcachedutil/memcached_pool.c +170 -0
- data/ext/libmemcached-0.32/m4/ac_cxx_compile_stdcxx_0x.m4 +103 -0
- data/ext/libmemcached-0.32/m4/ac_cxx_header_stdcxx_98.m4 +67 -0
- data/ext/libmemcached-0.32/m4/acx_pthread.m4 +276 -0
- data/ext/libmemcached-0.32/m4/byteorder.m4 +40 -0
- data/ext/libmemcached-0.32/m4/deprecated.m4 +17 -0
- data/ext/libmemcached-0.32/m4/enable_utillib.m4 +16 -0
- data/ext/libmemcached-0.32/m4/extensions.m4 +94 -0
- data/ext/libmemcached-0.32/m4/hsieh.m4 +18 -0
- data/ext/libmemcached-0.32/m4/lib-prefix.m4 +221 -0
- data/ext/libmemcached-0.32/m4/libtool.m4 +7831 -0
- data/ext/libmemcached-0.32/m4/ltoptions.m4 +369 -0
- data/ext/libmemcached-0.32/m4/ltsugar.m4 +123 -0
- data/ext/libmemcached-0.32/m4/ltversion.m4 +23 -0
- data/ext/libmemcached-0.32/m4/lt~obsolete.m4 +98 -0
- data/ext/libmemcached-0.32/m4/memcached.m4 +30 -0
- data/ext/libmemcached-0.32/m4/pandora_64bit.m4 +55 -0
- data/ext/libmemcached-0.32/m4/pandora_canonical.m4 +151 -0
- data/ext/libmemcached-0.32/m4/pandora_check_compiler_version.m4 +37 -0
- data/ext/libmemcached-0.32/m4/pandora_check_cxx_standard.m4 +16 -0
- data/ext/libmemcached-0.32/m4/pandora_enable_dtrace.m4 +41 -0
- data/ext/libmemcached-0.32/m4/pandora_ensure_gcc_version.m4 +36 -0
- data/ext/libmemcached-0.32/m4/pandora_have_better_malloc.m4 +54 -0
- data/ext/libmemcached-0.32/m4/pandora_have_sasl.m4 +133 -0
- data/ext/libmemcached-0.32/m4/pandora_header_assert.m4 +23 -0
- data/ext/libmemcached-0.32/m4/pandora_libtool.m4 +15 -0
- data/ext/libmemcached-0.32/m4/pandora_optimize.m4 +79 -0
- data/ext/libmemcached-0.32/m4/pandora_shared_ptr.m4 +56 -0
- data/ext/libmemcached-0.32/m4/pandora_vc_build.m4 +32 -0
- data/ext/libmemcached-0.32/m4/pandora_warnings.m4 +262 -0
- data/ext/libmemcached-0.32/m4/pod2man.m4 +7 -0
- data/ext/libmemcached-0.32/m4/protocol_binary.m4 +23 -0
- data/ext/libmemcached-0.32/m4/setsockopt.m4 +57 -0
- data/ext/libmemcached-0.32/m4/visibility.m4 +52 -0
- data/ext/libmemcached-0.32/support/Makefile.am +4 -0
- data/ext/libmemcached-0.32/support/Makefile.in +487 -0
- data/ext/libmemcached-0.32/support/libmemcached-fc.spec.in +105 -0
- data/ext/libmemcached-0.32/support/libmemcached.pc.in +10 -0
- data/ext/libmemcached-0.32/support/libmemcached.spec +105 -0
- data/ext/libmemcached-0.32/support/libmemcached.spec.in +105 -0
- data/ext/libmemcached-0.32/support/set_benchmark.sh +5 -0
- data/ext/libmemcached-0.32/tests/Makefile.am +113 -0
- data/ext/libmemcached-0.32/tests/Makefile.in +762 -0
- data/ext/libmemcached-0.32/tests/atomsmasher.c +245 -0
- data/ext/libmemcached-0.32/tests/function.c +4904 -0
- data/ext/libmemcached-0.32/tests/ketama_test_cases.h +108 -0
- data/ext/libmemcached-0.32/tests/output.cmp +7 -0
- data/ext/libmemcached-0.32/tests/output.res +7 -0
- data/ext/libmemcached-0.32/tests/output2.res +46 -0
- data/ext/libmemcached-0.32/tests/plus.cpp +293 -0
- data/ext/libmemcached-0.32/tests/r/memcat.res +19 -0
- data/ext/libmemcached-0.32/tests/r/memcp.res +27 -0
- data/ext/libmemcached-0.32/tests/r/memrm.res +19 -0
- data/ext/libmemcached-0.32/tests/r/memslap.res +33 -0
- data/ext/libmemcached-0.32/tests/r/memstat.res +33 -0
- data/ext/libmemcached-0.32/tests/server.c +118 -0
- data/ext/libmemcached-0.32/tests/server.h +25 -0
- data/ext/libmemcached-0.32/tests/start.c +16 -0
- data/ext/libmemcached-0.32/tests/t/memcat.test +4 -0
- data/ext/libmemcached-0.32/tests/t/memcp.test +3 -0
- data/ext/libmemcached-0.32/tests/t/memrm.test +3 -0
- data/ext/libmemcached-0.32/tests/t/memslap.test +5 -0
- data/ext/libmemcached-0.32/tests/t/memstat.test +3 -0
- data/ext/libmemcached-0.32/tests/test.c +137 -0
- data/ext/libmemcached-0.32/tests/test.h +46 -0
- data/ext/libmemcached-0.32/tests/udp.c +76 -0
- data/ext/rlibmemcached.i +258 -0
- data/ext/rlibmemcached_wrap.c +13917 -0
- data/lib/memcached/auth.rb +16 -0
- data/lib/memcached/behaviors.rb +78 -0
- data/lib/memcached/exceptions.rb +84 -0
- data/lib/memcached/experimental.rb +48 -0
- data/lib/memcached/marshal_codec.rb +10 -0
- data/lib/memcached/memcached.rb +732 -0
- data/lib/memcached/rails.rb +250 -0
- data/lib/memcached.rb +33 -0
- data/memcached.gemspec +0 -0
- data/test/profile/benchmark.rb +280 -0
- data/test/profile/c_profiler.rb +14 -0
- data/test/profile/exercise.rb +185 -0
- data/test/profile/rb_profiler.rb +21 -0
- data/test/profile/valgrind.rb +10 -0
- data/test/setup.rb +30 -0
- data/test/teardown.rb +0 -0
- data/test/test_helper.rb +18 -0
- data/test/unit/binding_test.rb +8 -0
- data/test/unit/memcached_experimental_test.rb +272 -0
- data/test/unit/memcached_test.rb +1487 -0
- data/test/unit/rails_test.rb +330 -0
- metadata +336 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# serial 6 -*- Autoconf -*-
|
|
2
|
+
# Enable extensions on systems that normally disable them.
|
|
3
|
+
|
|
4
|
+
# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
|
|
5
|
+
# This file is free software; the Free Software Foundation
|
|
6
|
+
# gives unlimited permission to copy and/or distribute it,
|
|
7
|
+
# with or without modifications, as long as this notice is preserved.
|
|
8
|
+
|
|
9
|
+
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
|
|
10
|
+
# Autoconf. Perhaps we can remove this once we can assume Autoconf
|
|
11
|
+
# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
|
|
12
|
+
# enough in this area it's likely we'll need to redefine
|
|
13
|
+
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
|
|
14
|
+
|
|
15
|
+
# AC_USE_SYSTEM_EXTENSIONS
|
|
16
|
+
# ------------------------
|
|
17
|
+
# Enable extensions on systems that normally disable them,
|
|
18
|
+
# typically due to standards-conformance issues.
|
|
19
|
+
# Remember that #undef in AH_VERBATIM gets replaced with #define by
|
|
20
|
+
# AC_DEFINE. The goal here is to define all known feature-enabling
|
|
21
|
+
# macros, then, if reports of conflicts are made, disable macros that
|
|
22
|
+
# cause problems on some platforms (such as __EXTENSIONS__).
|
|
23
|
+
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],
|
|
24
|
+
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
|
|
25
|
+
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
|
26
|
+
|
|
27
|
+
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
28
|
+
|
|
29
|
+
AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
|
|
30
|
+
if test "$MINIX" = yes; then
|
|
31
|
+
AC_DEFINE([_POSIX_SOURCE], [1],
|
|
32
|
+
[Define to 1 if you need to in order for `stat' and other
|
|
33
|
+
things to work.])
|
|
34
|
+
AC_DEFINE([_POSIX_1_SOURCE], [2],
|
|
35
|
+
[Define to 2 if the system does not provide POSIX.1 features
|
|
36
|
+
except with this defined.])
|
|
37
|
+
AC_DEFINE([_MINIX], [1],
|
|
38
|
+
[Define to 1 if on MINIX.])
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
|
|
42
|
+
dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
|
|
43
|
+
dnl provided.
|
|
44
|
+
case "$host_os" in
|
|
45
|
+
hpux*)
|
|
46
|
+
AC_DEFINE([_XOPEN_SOURCE], [500],
|
|
47
|
+
[Define to 500 only on HP-UX.])
|
|
48
|
+
;;
|
|
49
|
+
esac
|
|
50
|
+
|
|
51
|
+
AH_VERBATIM([__EXTENSIONS__],
|
|
52
|
+
[/* Enable extensions on AIX 3, Interix. */
|
|
53
|
+
#ifndef _ALL_SOURCE
|
|
54
|
+
# undef _ALL_SOURCE
|
|
55
|
+
#endif
|
|
56
|
+
/* Enable GNU extensions on systems that have them. */
|
|
57
|
+
#ifndef _GNU_SOURCE
|
|
58
|
+
# undef _GNU_SOURCE
|
|
59
|
+
#endif
|
|
60
|
+
/* Enable threading extensions on Solaris. */
|
|
61
|
+
#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
62
|
+
# undef _POSIX_PTHREAD_SEMANTICS
|
|
63
|
+
#endif
|
|
64
|
+
/* Enable extensions on HP NonStop. */
|
|
65
|
+
#ifndef _TANDEM_SOURCE
|
|
66
|
+
# undef _TANDEM_SOURCE
|
|
67
|
+
#endif
|
|
68
|
+
/* Enable general extensions on Solaris. */
|
|
69
|
+
#ifndef __EXTENSIONS__
|
|
70
|
+
# undef __EXTENSIONS__
|
|
71
|
+
#endif
|
|
72
|
+
])
|
|
73
|
+
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
|
|
74
|
+
[ac_cv_safe_to_define___extensions__],
|
|
75
|
+
[AC_COMPILE_IFELSE(
|
|
76
|
+
[AC_LANG_PROGRAM([[
|
|
77
|
+
# define __EXTENSIONS__ 1
|
|
78
|
+
]AC_INCLUDES_DEFAULT])],
|
|
79
|
+
[ac_cv_safe_to_define___extensions__=yes],
|
|
80
|
+
[ac_cv_safe_to_define___extensions__=no])])
|
|
81
|
+
test $ac_cv_safe_to_define___extensions__ = yes &&
|
|
82
|
+
AC_DEFINE([__EXTENSIONS__])
|
|
83
|
+
AC_DEFINE([_ALL_SOURCE])
|
|
84
|
+
AC_DEFINE([_GNU_SOURCE])
|
|
85
|
+
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
|
|
86
|
+
AC_DEFINE([_TANDEM_SOURCE])
|
|
87
|
+
])# AC_USE_SYSTEM_EXTENSIONS
|
|
88
|
+
|
|
89
|
+
# gl_USE_SYSTEM_EXTENSIONS
|
|
90
|
+
# ------------------------
|
|
91
|
+
# Enable extensions on systems that normally disable them,
|
|
92
|
+
# typically due to standards-conformance issues.
|
|
93
|
+
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],
|
|
94
|
+
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])])
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
dnl ---------------------------------------------------------------------------
|
|
2
|
+
dnl Macro: ENABLE_HSIEH_HASH
|
|
3
|
+
dnl ---------------------------------------------------------------------------
|
|
4
|
+
AC_DEFUN([ENABLE_HSIEH_HASH],
|
|
5
|
+
[AC_ARG_ENABLE([hsieh_hash],
|
|
6
|
+
[AS_HELP_STRING([--enable-hsieh_hash],
|
|
7
|
+
[build with support for hsieh hashing. @<:default=off@:>@])],
|
|
8
|
+
[ac_cv_enable_hsieh_hash=yes],
|
|
9
|
+
[ac_cv_enable_hsieh_hash=no])
|
|
10
|
+
|
|
11
|
+
AS_IF([test "$ac_cv_enable_hsieh_hash" = "yes"],
|
|
12
|
+
[AC_DEFINE([HAVE_HSIEH_HASH], [1], [Enables hsieh hashing support])])
|
|
13
|
+
|
|
14
|
+
AM_CONDITIONAL([INCLUDE_HSIEH_SRC], [test "$ac_cv_enable_hsieh_hash" = "yes"])
|
|
15
|
+
])
|
|
16
|
+
dnl ---------------------------------------------------------------------------
|
|
17
|
+
dnl End Macro: ENABLE_HSIEH_HASH
|
|
18
|
+
dnl ---------------------------------------------------------------------------
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# lib-prefix.m4 serial 6 (gettext-0.18)
|
|
2
|
+
dnl Copyright (C) 2001-2005, 2008 Free Software Foundation, Inc.
|
|
3
|
+
dnl This file is free software; the Free Software Foundation
|
|
4
|
+
dnl gives unlimited permission to copy and/or distribute it,
|
|
5
|
+
dnl with or without modifications, as long as this notice is preserved.
|
|
6
|
+
|
|
7
|
+
dnl From Bruno Haible.
|
|
8
|
+
|
|
9
|
+
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
|
10
|
+
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
|
11
|
+
dnl require excessive bracketing.
|
|
12
|
+
ifdef([AC_HELP_STRING],
|
|
13
|
+
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
|
14
|
+
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
|
15
|
+
|
|
16
|
+
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
|
17
|
+
dnl to access previously installed libraries. The basic assumption is that
|
|
18
|
+
dnl a user will want packages to use other packages he previously installed
|
|
19
|
+
dnl with the same --prefix option.
|
|
20
|
+
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
|
21
|
+
dnl libraries, but is otherwise very convenient.
|
|
22
|
+
AC_DEFUN([AC_LIB_PREFIX],
|
|
23
|
+
[
|
|
24
|
+
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
|
25
|
+
AC_REQUIRE([AC_PROG_CC])
|
|
26
|
+
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
27
|
+
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
|
28
|
+
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
29
|
+
dnl By default, look in $includedir and $libdir.
|
|
30
|
+
use_additional=yes
|
|
31
|
+
AC_LIB_WITH_FINAL_PREFIX([
|
|
32
|
+
eval additional_includedir=\"$includedir\"
|
|
33
|
+
eval additional_libdir=\"$libdir\"
|
|
34
|
+
])
|
|
35
|
+
AC_LIB_ARG_WITH([lib-prefix],
|
|
36
|
+
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
|
37
|
+
--without-lib-prefix don't search for libraries in includedir and libdir],
|
|
38
|
+
[
|
|
39
|
+
if test "X$withval" = "Xno"; then
|
|
40
|
+
use_additional=no
|
|
41
|
+
else
|
|
42
|
+
if test "X$withval" = "X"; then
|
|
43
|
+
AC_LIB_WITH_FINAL_PREFIX([
|
|
44
|
+
eval additional_includedir=\"$includedir\"
|
|
45
|
+
eval additional_libdir=\"$libdir\"
|
|
46
|
+
])
|
|
47
|
+
else
|
|
48
|
+
additional_includedir="$withval/include"
|
|
49
|
+
additional_libdir="$withval/$acl_libdirstem"
|
|
50
|
+
fi
|
|
51
|
+
fi
|
|
52
|
+
])
|
|
53
|
+
if test $use_additional = yes; then
|
|
54
|
+
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
|
55
|
+
dnl But don't add it
|
|
56
|
+
dnl 1. if it's the standard /usr/include,
|
|
57
|
+
dnl 2. if it's already present in $CPPFLAGS,
|
|
58
|
+
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
|
59
|
+
dnl 4. if it doesn't exist as a directory.
|
|
60
|
+
if test "X$additional_includedir" != "X/usr/include"; then
|
|
61
|
+
haveit=
|
|
62
|
+
for x in $CPPFLAGS; do
|
|
63
|
+
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
64
|
+
if test "X$x" = "X-I$additional_includedir"; then
|
|
65
|
+
haveit=yes
|
|
66
|
+
break
|
|
67
|
+
fi
|
|
68
|
+
done
|
|
69
|
+
if test -z "$haveit"; then
|
|
70
|
+
if test "X$additional_includedir" = "X/usr/local/include"; then
|
|
71
|
+
if test -n "$GCC"; then
|
|
72
|
+
case $host_os in
|
|
73
|
+
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
|
74
|
+
esac
|
|
75
|
+
fi
|
|
76
|
+
fi
|
|
77
|
+
if test -z "$haveit"; then
|
|
78
|
+
if test -d "$additional_includedir"; then
|
|
79
|
+
dnl Really add $additional_includedir to $CPPFLAGS.
|
|
80
|
+
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
|
81
|
+
fi
|
|
82
|
+
fi
|
|
83
|
+
fi
|
|
84
|
+
fi
|
|
85
|
+
dnl Potentially add $additional_libdir to $LDFLAGS.
|
|
86
|
+
dnl But don't add it
|
|
87
|
+
dnl 1. if it's the standard /usr/lib,
|
|
88
|
+
dnl 2. if it's already present in $LDFLAGS,
|
|
89
|
+
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
|
90
|
+
dnl 4. if it doesn't exist as a directory.
|
|
91
|
+
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
|
92
|
+
haveit=
|
|
93
|
+
for x in $LDFLAGS; do
|
|
94
|
+
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
95
|
+
if test "X$x" = "X-L$additional_libdir"; then
|
|
96
|
+
haveit=yes
|
|
97
|
+
break
|
|
98
|
+
fi
|
|
99
|
+
done
|
|
100
|
+
if test -z "$haveit"; then
|
|
101
|
+
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
|
102
|
+
if test -n "$GCC"; then
|
|
103
|
+
case $host_os in
|
|
104
|
+
linux*) haveit=yes;;
|
|
105
|
+
esac
|
|
106
|
+
fi
|
|
107
|
+
fi
|
|
108
|
+
if test -z "$haveit"; then
|
|
109
|
+
if test -d "$additional_libdir"; then
|
|
110
|
+
dnl Really add $additional_libdir to $LDFLAGS.
|
|
111
|
+
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
|
112
|
+
fi
|
|
113
|
+
fi
|
|
114
|
+
fi
|
|
115
|
+
fi
|
|
116
|
+
fi
|
|
117
|
+
])
|
|
118
|
+
|
|
119
|
+
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
|
120
|
+
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
|
121
|
+
dnl $exec_prefix will expand at the end of the configure script.
|
|
122
|
+
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
|
123
|
+
[
|
|
124
|
+
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
|
125
|
+
dnl at the end of configure.
|
|
126
|
+
if test "X$prefix" = "XNONE"; then
|
|
127
|
+
acl_final_prefix="$ac_default_prefix"
|
|
128
|
+
else
|
|
129
|
+
acl_final_prefix="$prefix"
|
|
130
|
+
fi
|
|
131
|
+
if test "X$exec_prefix" = "XNONE"; then
|
|
132
|
+
acl_final_exec_prefix='${prefix}'
|
|
133
|
+
else
|
|
134
|
+
acl_final_exec_prefix="$exec_prefix"
|
|
135
|
+
fi
|
|
136
|
+
acl_save_prefix="$prefix"
|
|
137
|
+
prefix="$acl_final_prefix"
|
|
138
|
+
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
|
139
|
+
prefix="$acl_save_prefix"
|
|
140
|
+
])
|
|
141
|
+
|
|
142
|
+
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
|
143
|
+
dnl variables prefix and exec_prefix bound to the values they will have
|
|
144
|
+
dnl at the end of the configure script.
|
|
145
|
+
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
|
146
|
+
[
|
|
147
|
+
acl_save_prefix="$prefix"
|
|
148
|
+
prefix="$acl_final_prefix"
|
|
149
|
+
acl_save_exec_prefix="$exec_prefix"
|
|
150
|
+
exec_prefix="$acl_final_exec_prefix"
|
|
151
|
+
$1
|
|
152
|
+
exec_prefix="$acl_save_exec_prefix"
|
|
153
|
+
prefix="$acl_save_prefix"
|
|
154
|
+
])
|
|
155
|
+
|
|
156
|
+
dnl AC_LIB_PREPARE_MULTILIB creates
|
|
157
|
+
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
|
158
|
+
dnl "lib" or "lib64" or "lib/64",
|
|
159
|
+
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
|
160
|
+
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
|
161
|
+
dnl "lib/amd64".
|
|
162
|
+
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
|
163
|
+
[
|
|
164
|
+
dnl There is no formal standard regarding lib and lib64.
|
|
165
|
+
dnl On glibc systems, the current practice is that on a system supporting
|
|
166
|
+
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
|
167
|
+
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
|
168
|
+
dnl the compiler's default mode by looking at the compiler's library search
|
|
169
|
+
dnl path. If at least one of its elements ends in /lib64 or points to a
|
|
170
|
+
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
|
171
|
+
dnl Otherwise we use the default, namely "lib".
|
|
172
|
+
dnl On Solaris systems, the current practice is that on a system supporting
|
|
173
|
+
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
|
174
|
+
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
|
175
|
+
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
|
176
|
+
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
177
|
+
acl_libdirstem=lib
|
|
178
|
+
acl_libdirstem2=
|
|
179
|
+
case "$host_os" in
|
|
180
|
+
solaris*)
|
|
181
|
+
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
|
182
|
+
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
|
|
183
|
+
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
|
184
|
+
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
|
185
|
+
dnl symlink is missing, so we set acl_libdirstem2 too.
|
|
186
|
+
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
|
187
|
+
[AC_RUN_IFELSE([
|
|
188
|
+
AC_LANG_PROGRAM([], [[
|
|
189
|
+
return sizeof(void*) == 8 ? 0 : 1;
|
|
190
|
+
]])
|
|
191
|
+
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
|
|
192
|
+
])
|
|
193
|
+
if test $gl_cv_solaris_64bit = yes; then
|
|
194
|
+
acl_libdirstem=lib/64
|
|
195
|
+
case "$host_cpu" in
|
|
196
|
+
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
|
197
|
+
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
|
198
|
+
esac
|
|
199
|
+
fi
|
|
200
|
+
;;
|
|
201
|
+
*)
|
|
202
|
+
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
|
203
|
+
if test -n "$searchpath"; then
|
|
204
|
+
acl_save_IFS="${IFS= }"; IFS=":"
|
|
205
|
+
for searchdir in $searchpath; do
|
|
206
|
+
if test -d "$searchdir"; then
|
|
207
|
+
case "$searchdir" in
|
|
208
|
+
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
|
209
|
+
*) searchdir=`cd "$searchdir" && pwd`
|
|
210
|
+
case "$searchdir" in
|
|
211
|
+
*/lib64 ) acl_libdirstem=lib64 ;;
|
|
212
|
+
esac ;;
|
|
213
|
+
esac
|
|
214
|
+
fi
|
|
215
|
+
done
|
|
216
|
+
IFS="$acl_save_IFS"
|
|
217
|
+
fi
|
|
218
|
+
;;
|
|
219
|
+
esac
|
|
220
|
+
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
|
221
|
+
])
|