Merge lp:~mordred/gearmand/pandora-build into lp:gearmand/1.0

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mordred/gearmand/pandora-build
Merge into: lp:gearmand/1.0
Diff against target: 191 lines (+104/-3)
7 files modified
m4/pandora_canonical.m4 (+12/-1)
m4/pandora_have_better_malloc.m4 (+2/-1)
m4/pandora_have_libdl.m4 (+1/-1)
m4/pandora_have_libmemcached.m4 (+19/-0)
m4/pandora_platform.m4 (+8/-0)
m4/pandora_print_callstack.m4 (+61/-0)
m4/pandora_visibility.m4 (+1/-0)
To merge this branch: bzr merge lp:~mordred/gearmand/pandora-build
Reviewer Review Type Date Requested Status
Brian Aker Pending
Review via email: mp+17284@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Latest pandora.

lp:~mordred/gearmand/pandora-build updated
314. By Brian Aker <brian@gaz>

Merge Monty

315. By Brian Aker <brian@gaz>

Merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'm4/pandora_canonical.m4'
2--- m4/pandora_canonical.m4 2009-12-30 18:08:00 +0000
3+++ m4/pandora_canonical.m4 2010-01-13 10:51:14 +0000
4@@ -4,13 +4,23 @@
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl Which version of the canonical setup we're using
8-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.91])
9+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.95])
10
11 AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
12+ AC_ARG_ENABLE([fat-binaries],
13+ [AS_HELP_STRING([--enable-fat-binaries],
14+ [Enable fat binary support on OSX @<:@default=off@:>@])],
15+ [ac_enable_fat_binaries="$enableval"],
16+ [ac_enable_fat_binaries="no"])
17+
18 dnl Force dependency tracking on for Sun Studio builds
19 AS_IF([test "x${enable_dependency_tracking}" = "x"],[
20 enable_dependency_tracking=yes
21 ])
22+ dnl If we're building OSX Fat Binaries, we have to turn off -M options
23+ AS_IF([test "x${ac_enable_fat_binaries}" = "xyes"],[
24+ enable_dependency_tracking=no
25+ ])
26 ])
27
28 dnl The standard setup for how we build Pandora projects
29@@ -232,5 +242,6 @@
30 AC_SUBST([AM_CFLAGS])
31 AC_SUBST([AM_CXXFLAGS])
32 AC_SUBST([AM_CPPFLAGS])
33+ AC_SUBST([AM_LDFLAGS])
34
35 ])
36
37=== modified file 'm4/pandora_have_better_malloc.m4'
38--- m4/pandora_have_better_malloc.m4 2009-12-18 19:25:00 +0000
39+++ m4/pandora_have_better_malloc.m4 2010-01-13 10:51:14 +0000
40@@ -64,4 +64,5 @@
41 AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[
42 AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC])
43 LIBS="${LIBS} ${BETTER_MALLOC_LIBS}"
44-])
45\ No newline at end of file
46+])
47+
48
49=== modified file 'm4/pandora_have_libdl.m4'
50--- m4/pandora_have_libdl.m4 2009-12-18 18:02:39 +0000
51+++ m4/pandora_have_libdl.m4 2010-01-13 10:51:14 +0000
52@@ -15,7 +15,7 @@
53 AC_CHECK_LIB(dl,dlopen)
54 AC_CHECK_FUNCS(dlopen)
55 LIBDL_LIBS="$LIBS"
56- LIBS="$my_save_LIBS"
57+ LIBS="${save_LIBS}"
58 AC_SUBST(LIBDL_LIBS)
59
60 AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"])
61
62=== modified file 'm4/pandora_have_libmemcached.m4'
63--- m4/pandora_have_libmemcached.m4 2009-12-18 19:25:00 +0000
64+++ m4/pandora_have_libmemcached.m4 2010-01-13 10:51:14 +0000
65@@ -24,10 +24,28 @@
66 memcached_dump_func *df;
67 memcached_lib_version();
68 ])
69+ AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
70+ #include <libmemcached/protocol_handler.h>
71+ ],[
72+ struct memcached_protocol_st *protocol_handle;
73+ protocol_handle= memcached_protocol_create_instance();
74+ ])
75 ],[
76 ac_cv_libmemcached="no"
77 ])
78
79+ AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
80+ [pandora_cv_libmemcached_server_fn],
81+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
82+#include <libmemcached/memcached.h>
83+memcached_server_fn callbacks[1];
84+ ]])],
85+ [pandora_cv_libmemcached_server_fn=yes],
86+ [pandora_cv_libmemcached_server_fn=no])])
87+ AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
88+ AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
89+ ])
90+
91 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
92
93 ])
94@@ -41,3 +59,4 @@
95 AS_IF([test x$ac_cv_libmemcached = xno],
96 AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
97 ])
98+
99
100=== modified file 'm4/pandora_platform.m4'
101--- m4/pandora_platform.m4 2009-09-29 04:30:01 +0000
102+++ m4/pandora_platform.m4 2010-01-13 10:51:14 +0000
103@@ -74,4 +74,12 @@
104 [Cause Sun Studio to not be quite so strict with standards conflicts])
105 ])
106
107+ AS_IF([test "x$TARGET_OSX" = "xtrue"],[
108+ AS_IF([test "x$ac_enable_fat_binaries" = "xyes"],[
109+ AM_CFLAGS="-arch i386 -arch x86_64 -arch ppc"
110+ AM_CXXFLAGS="-arch i386 -arch x86_64 -arch ppc"
111+ AM_LDFLAGS="-arch i386 -arch x86_64 -arch ppc"
112+ ])
113+ ])
114+
115 ])
116
117=== added file 'm4/pandora_print_callstack.m4'
118--- m4/pandora_print_callstack.m4 1970-01-01 00:00:00 +0000
119+++ m4/pandora_print_callstack.m4 2010-01-13 10:51:14 +0000
120@@ -0,0 +1,61 @@
121+dnl Copyright (C) 2009 Sun Microsystems
122+dnl This file is free software; Sun Microsystems
123+dnl gives unlimited permission to copy and/or distribute it,
124+dnl with or without modifications, as long as this notice is preserved.
125+
126+dnl Try to define a macro to dump the current callstack.
127+AC_DEFUN([PANDORA_PRINT_CALLSTACK],[
128+ AC_CHECK_HEADERS([ucontext.h])
129+ AS_IF([test "x$ac_cv_header_ucontext_h" = "xyes"],
130+ [ AC_CHECK_FUNCS([printstack]) ])
131+
132+
133+ AS_IF([ test "x$ac_cv_func_printstack" != "xyes"],
134+ [ AC_CHECK_HEADERS([dlfcn.h])
135+ AC_CHECK_HEADERS([execinfo.h])
136+ AC_CHECK_FUNCS([backtrace])
137+ AC_CHECK_FUNCS([backtrace_symbols_fd]) ])
138+
139+ AH_BOTTOM([
140+#ifdef __cplusplus
141+#include <cstdio>
142+#define PANDORA_PRINTSTACK_STD_PREFIX std::
143+#else
144+#include <stdio.h>
145+#define PANDORA_PRINTSTACK_STD_PREFIX
146+#endif
147+
148+#if defined(HAVE_UCONTEXT_H) && defined(HAVE_PRINTSTACK)
149+#include <ucontext.h>
150+#define pandora_print_callstack(a) \
151+printstack(PANDORA_PRINTSTACK_STD_PREFIX fileno(a))
152+#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS_FD)
153+
154+#include <execinfo.h>
155+
156+#define pandora_print_callstack(a) \
157+{ \
158+ void *stack[100]; \
159+ int depth = backtrace(stack, 100); \
160+ backtrace_symbols_fd(stack, depth, PANDORA_PRINTSTACK_STD_PREFIX fileno(a)); \
161+}
162+#elif defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && !defined(HAVE_BACKTRACE_SYMBOLS_FD)
163+
164+#include <execinfo.h>
165+
166+#define pandora_print_callstack(a) \
167+{ \
168+ void *stack[100]; \
169+ int depth= backtrace(stack, 100); \
170+ char **symbol= backtrace_symbols(stack, depth); \
171+ for (int x= 0; x < size; ++x) \
172+ PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, "%s\n", symbol[x]); \
173+}
174+#else
175+#define pandora_print_callstack(a) \
176+ PANDORA_PRINTSTACK_STD_PREFIX fprintf(a, \
177+ "Stackdump not supported for this platform\n");
178+#endif
179+ ])
180+
181+])
182
183=== modified file 'm4/pandora_visibility.m4'
184--- m4/pandora_visibility.m4 2009-12-30 08:42:51 +0000
185+++ m4/pandora_visibility.m4 2010-01-13 10:51:14 +0000
186@@ -1,4 +1,5 @@
187 dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
188+dnl Copyright (C) 2009 Monty Taylor
189 dnl This file is free software; the Free Software Foundation
190 dnl gives unlimited permission to copy and/or distribute it,
191 dnl with or without modifications, as long as this notice is preserved.

Subscribers

People subscribed via source and target branches