Merge lp:~mordred/libdrizzle/update-build into lp:~drizzle-trunk/libdrizzle/classic

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mordred/libdrizzle/update-build
Merge into: lp:~drizzle-trunk/libdrizzle/classic
Diff against target: 2155 lines (+1720/-53)
38 files modified
.bzrignore (+0/-1)
Makefile.am (+2/-2)
config/autorun.sh (+0/-6)
configure.ac (+0/-3)
libdrizzle/libdrizzle.ver (+0/-1)
m4/pandora_canonical.m4 (+88/-10)
m4/pandora_cinttypes.m4 (+31/-0)
m4/pandora_cstdint.m4 (+30/-0)
m4/pandora_cxx_demangle.m4 (+24/-0)
m4/pandora_drizzle_build.m4 (+77/-0)
m4/pandora_fdatasync.m4 (+25/-0)
m4/pandora_have_better_malloc.m4 (+5/-0)
m4/pandora_have_gcc_atomics.m4 (+37/-0)
m4/pandora_have_libavahi.m4 (+41/-0)
m4/pandora_have_libbdb.m4 (+40/-0)
m4/pandora_have_libdl.m4 (+51/-0)
m4/pandora_have_libevent.m4 (+66/-0)
m4/pandora_have_libgearman.m4 (+2/-2)
m4/pandora_have_libmemcached.m4 (+0/-1)
m4/pandora_have_libpcre.m4 (+73/-0)
m4/pandora_have_libreadline.m4 (+242/-0)
m4/pandora_have_libtokyocabinet.m4 (+52/-0)
m4/pandora_have_libuuid.m4 (+55/-0)
m4/pandora_have_libxml2.m4 (+52/-0)
m4/pandora_have_libz.m4 (+51/-0)
m4/pandora_header_assert.m4 (+2/-2)
m4/pandora_libtool.m4 (+9/-0)
m4/pandora_plugins.m4 (+17/-5)
m4/pandora_pthread.m4 (+180/-0)
m4/pandora_run_cpplint.m4 (+8/-0)
m4/pandora_sasl.m4 (+133/-0)
m4/pandora_stack_direction.m4 (+39/-0)
m4/pandora_stl_hash.m4 (+107/-0)
m4/pandora_vc_build.m4 (+69/-3)
m4/pandora_version.m4 (+11/-0)
m4/pandora_warnings.m4 (+43/-7)
m4/pandora_with_gettext.m4 (+41/-0)
m4/pandora_with_memcached.m4 (+17/-10)
To merge this branch: bzr merge lp:~mordred/libdrizzle/update-build
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+15700@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

pandora build fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2009-08-10 21:57:14 +0000
+++ .bzrignore 2009-12-05 23:40:29 +0000
@@ -41,4 +41,3 @@
41tests/drizzle_query_st41tests/drizzle_query_st
42tests/drizzle_result_st42tests/drizzle_result_st
43tests/drizzle_st43tests/drizzle_st
44config/plugin.ac
4544
=== modified file 'Makefile.am'
--- Makefile.am 2009-10-05 06:58:37 +0000
+++ Makefile.am 2009-12-05 23:40:29 +0000
@@ -33,9 +33,9 @@
33 -DBUILDING_LIBDRIZZLE33 -DBUILDING_LIBDRIZZLE
3434
35libdrizzle_la_LDFLAGS= \35libdrizzle_la_LDFLAGS= \
36 $(AM_LDFLAGS) \
36 -version-info \37 -version-info \
37 $(LIBDRIZZLE_LIBRARY_VERSION) \38 $(LIBDRIZZLE_LIBRARY_VERSION)
38 $(LD_VERSION_SCRIPT)
3939
40libdrizzle_la_SOURCES= \40libdrizzle_la_SOURCES= \
41 libdrizzle/drizzle.c \41 libdrizzle/drizzle.c \
4242
=== modified file 'config/autorun.sh'
--- config/autorun.sh 2009-10-07 01:12:30 +0000
+++ config/autorun.sh 2009-12-05 23:40:29 +0000
@@ -68,12 +68,6 @@
68 . config/pre_hook.sh68 . config/pre_hook.sh
69fi69fi
7070
71# We need to some file here for the m4_sinclude, even if it's just empty
72if test ! -f config/plugin.ac
73then
74 touch config/plugin.ac
75fi
76
77# Try to detect the supported binaries if the user didn't71# Try to detect the supported binaries if the user didn't
78# override that by pushing the environment variable72# override that by pushing the environment variable
79if test x$LIBTOOLIZE = x; then73if test x$LIBTOOLIZE = x; then
8074
=== modified file 'configure.ac'
--- configure.ac 2009-11-05 22:47:42 +0000
+++ configure.ac 2009-12-05 23:40:29 +0000
@@ -39,10 +39,7 @@
3939
40PANDORA_HAVE_LIBSQLITE340PANDORA_HAVE_LIBSQLITE3
4141
42AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
43AC_CHECK_FUNC(inet_ntoa, [], [AC_CHECK_LIB(nsl, inet_ntoa)])42AC_CHECK_FUNC(inet_ntoa, [], [AC_CHECK_LIB(nsl, inet_ntoa)])
44# This may get things to compile even if bind-8 is installed
45AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
4643
47AC_CHECK_FUNCS(memchr memmove memset socket strcasecmp strtoul)44AC_CHECK_FUNCS(memchr memmove memset socket strcasecmp strtoul)
4845
4946
=== removed file 'libdrizzle/libdrizzle.ver'
--- libdrizzle/libdrizzle.ver 2009-02-02 18:00:27 +0000
+++ libdrizzle/libdrizzle.ver 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1libdrizzle_0 { global: *; };
20
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2009-10-07 01:12:30 +0000
+++ m4/pandora_canonical.m4 2009-12-05 23:40:29 +0000
@@ -4,7 +4,7 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.62])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.82])
88
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 dnl Force dependency tracking on for Sun Studio builds10 dnl Force dependency tracking on for Sun Studio builds
@@ -24,6 +24,8 @@
24 m4_define([PCT_IGNORE_SHARED_PTR],[no])24 m4_define([PCT_IGNORE_SHARED_PTR],[no])
25 m4_define([PCT_FORCE_GCC42],[no])25 m4_define([PCT_FORCE_GCC42],[no])
26 m4_define([PCT_SRC_IN_SRC],[no])26 m4_define([PCT_SRC_IN_SRC],[no])
27 m4_define([PCT_VERSION_FROM_VC],[no])
28 m4_define([PCT_USE_VISIBILITY],[yes])
27 m4_foreach([pct_arg],[$*],[29 m4_foreach([pct_arg],[$*],[
28 m4_case(pct_arg,30 m4_case(pct_arg,
29 [use-gnulib], [31 [use-gnulib], [
@@ -42,9 +44,17 @@
42 m4_undefine([PCT_FORCE_GCC42])44 m4_undefine([PCT_FORCE_GCC42])
43 m4_define([PCT_FORCE_GCC42],[yes])45 m4_define([PCT_FORCE_GCC42],[yes])
44 ],46 ],
47 [skip-visibility], [
48 m4_undefine([PCT_USE_VISIBILITY])
49 m4_define([PCT_USE_VISIBILITY],[no])
50 ],
45 [src-in-src], [51 [src-in-src], [
46 m4_undefine([PCT_SRC_IN_SRC])52 m4_undefine([PCT_SRC_IN_SRC])
47 m4_define([PCT_SRC_IN_SRC],[yes])53 m4_define([PCT_SRC_IN_SRC],[yes])
54 ],
55 [version-from-vc], [
56 m4_undefine([PCT_VERSION_FROM_VC])
57 m4_define([PCT_VERSION_FROM_VC],[yes])
48 ])58 ])
49 ])59 ])
5060
@@ -58,7 +68,7 @@
58 68
59 AC_CANONICAL_TARGET69 AC_CANONICAL_TARGET
60 70
61 AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects)71 AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects foreign)
62 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])72 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
6373
64 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])74 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])
@@ -67,6 +77,11 @@
67 AC_REQUIRE([PANDORA_MAC_GCC42])77 AC_REQUIRE([PANDORA_MAC_GCC42])
68 AC_REQUIRE([PANDORA_64BIT])78 AC_REQUIRE([PANDORA_64BIT])
6979
80 m4_if(PCT_VERSION_FROM_VC,yes,[
81 PANDORA_VC_VERSION
82 ])
83 PANDORA_VERSION
84
70 dnl Once we can use a modern autoconf, we can use this85 dnl Once we can use a modern autoconf, we can use this
71 dnl AC_PROG_CC_C9986 dnl AC_PROG_CC_C99
72 AC_REQUIRE([AC_PROG_CXX])87 AC_REQUIRE([AC_PROG_CXX])
@@ -90,6 +105,7 @@
90 AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[105 AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
91 AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])106 AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
92 ])107 ])
108
93 ])109 ])
94 110
95 PANDORA_SHARED_PTR111 PANDORA_SHARED_PTR
@@ -104,6 +120,9 @@
104 AC_CONFIG_LIBOBJ_DIR([gnulib])120 AC_CONFIG_LIBOBJ_DIR([gnulib])
105 ])121 ])
106122
123 PANDORA_CHECK_C_VERSION
124 PANDORA_CHECK_CXX_VERSION
125
107 AC_C_BIGENDIAN126 AC_C_BIGENDIAN
108 AC_C_CONST127 AC_C_CONST
109 AC_C_INLINE128 AC_C_INLINE
@@ -114,17 +133,76 @@
114 AC_TYPE_SIZE_T133 AC_TYPE_SIZE_T
115 AC_SYS_LARGEFILE134 AC_SYS_LARGEFILE
116135
117136 # off_t is not a builtin type
118 PANDORA_CHECK_C_VERSION137 AC_CHECK_SIZEOF(off_t, 4)
119 PANDORA_CHECK_CXX_VERSION138 AS_IF([test "$ac_cv_sizeof_off_t" -eq 0],[
139 AC_MSG_ERROR("${PACKAGE} needs an off_t type.")
140 ])
141
142 AC_CHECK_SIZEOF(size_t)
143 AS_IF([test "$ac_cv_sizeof_size_t" -eq 0],[
144 AC_MSG_ERROR("${PACKAGE} needs an size_t type.")
145 ])
146
147 AC_DEFINE_UNQUOTED([SIZEOF_SIZE_T],[$ac_cv_sizeof_size_t],[Size of size_t as computed by sizeof()])
148 AC_CHECK_SIZEOF(long long)
149 AC_DEFINE_UNQUOTED([SIZEOF_LONG_LONG],[$ac_cv_sizeof_long_long],[Size of long long as computed by sizeof()])
150 AC_CACHE_CHECK([if time_t is unsigned], [ac_cv_time_t_unsigned],[
151 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
152 [[
153#include <time.h>
154 ]],
155 [[
156 int array[(((time_t)-1) > 0) ? 1 : -1];
157 ]])
158 ],[
159 ac_cv_time_t_unsigned=yes
160 ],[
161 ac_cv_time_t_unsigned=no
162 ])
163 ])
164 AS_IF([test "$ac_cv_time_t_unsigned" = "yes"],[
165 AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
166 ])
167
168 dnl AC_FUNC_ALLOCA would test for stack direction if we didn't have a working
169 dnl alloca - but we need to know it anyway for check_stack_overrun.
170 PANDORA_STACK_DIRECTION
171
172 save_LIBS="${LIBS}"
173 LIBS=""
174 AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity))
175 LIBM="${LIBS}"
176 LIBS="${save_LIBS}"
177 AC_SUBST([LIBM])
178
179 AC_CHECK_FUNC(setsockopt, [], [AC_CHECK_LIB(socket, setsockopt)])
180 AC_CHECK_FUNC(bind, [], [AC_CHECK_LIB(bind, bind)])
181
182
120183
121 PANDORA_OPTIMIZE184 PANDORA_OPTIMIZE
122185
123 dnl We need to inject error into the cflags to test if visibility works or not186 AC_LANG_PUSH(C++)
124 save_CFLAGS="${CFLAGS}"187 # Test whether madvise() is declared in C++ code -- it is not on some
125 CFLAGS="${CFLAGS} -Werror"188 # systems, such as Solaris
126 gl_VISIBILITY189 AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
127 CFLAGS="${save_CFLAGS}"190 #if HAVE_SYS_MMAN_H
191 #include <sys/types.h>
192 #include <sys/mman.h>
193 #endif
194 ]])
195 AC_LANG_POP()
196
197 PANDORA_HAVE_GCC_ATOMICS
198
199 m4_if(PCT_USE_VISIBILITY,[yes],[
200 dnl We need to inject error into the cflags to test if visibility works or not
201 save_CFLAGS="${CFLAGS}"
202 CFLAGS="${CFLAGS} -Werror"
203 gl_VISIBILITY
204 CFLAGS="${save_CFLAGS}"
205 ])
128206
129 PANDORA_HEADER_ASSERT207 PANDORA_HEADER_ASSERT
130208
131209
=== added file 'm4/pandora_cinttypes.m4'
--- m4/pandora_cinttypes.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_cinttypes.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,31 @@
1# We check two things: where the include file is for cinttypes. We
2# include AC_TRY_COMPILE for all the combinations we've seen in the
3# wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or
4# HAVE_BOOST_CINTTYPES depending
5# on location.
6
7AC_DEFUN([PANDORA_CXX_CINTTYPES],
8 [AC_REQUIRE([PANDORA_CXX_CSTDINT])
9 AC_MSG_CHECKING(the location of cinttypes)
10 AC_LANG_PUSH(C++)
11 ac_cv_cxx_cinttypes=""
12 for location in tr1/cinttypes boost/cinttypes cinttypes; do
13 if test -z "$ac_cv_cxx_cinttypes"; then
14 AC_TRY_COMPILE([#include $ac_cv_cxx_cstdint;
15 #include <$location>],
16 [uint32_t foo= UINT32_C(1)],
17 [ac_cv_cxx_cinttypes="<$location>";])
18 fi
19 done
20 AC_LANG_POP()
21 if test -n "$ac_cv_cxx_cinttypes"; then
22 AC_MSG_RESULT([$ac_cv_cxx_cinttypes])
23 else
24 AC_DEFINE([__STDC_LIMIT_MACROS],[1],[Use STDC Limit Macros in C++])
25 ac_cv_cxx_cinttypes="<inttypes.h>"
26 AC_MSG_RESULT()
27 AC_MSG_WARN([Could not find a cinttypes header.])
28 fi
29 AC_DEFINE_UNQUOTED(CINTTYPES_H,$ac_cv_cxx_cinttypes,
30 [the location of <cinttypes>])
31])
032
=== added file 'm4/pandora_cstdint.m4'
--- m4/pandora_cstdint.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_cstdint.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,30 @@
1# We check two things: where the include file is for cstdint. We
2# include AC_TRY_COMPILE for all the combinations we've seen in the
3# wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or
4# HAVE_BOOST_CSTDINT depending
5# on location.
6
7AC_DEFUN([PANDORA_CXX_CSTDINT],
8 [AC_MSG_CHECKING(the location of cstdint)
9 AC_LANG_PUSH(C++)
10 ac_cv_cxx_cstdint=""
11 for location in tr1/cstdint boost/cstdint cstdint; do
12 if test -z "$ac_cv_cxx_cstdint"; then
13 AC_TRY_COMPILE([#include <$location>],
14 [uint32_t t],
15 [ac_cv_cxx_cstdint="<$location>";])
16 fi
17 done
18 AC_LANG_POP()
19 if test -n "$ac_cv_cxx_cstdint"; then
20 AC_MSG_RESULT([$ac_cv_cxx_cstdint])
21 else
22 AC_DEFINE([__STDC_CONSTANT_MACROS],[1],[Use STDC Constant Macros in C++])
23 AC_DEFINE([__STDC_FORMAT_MACROS],[1],[Use STDC Format Macros in C++])
24 ac_cv_cxx_cstdint="<stdint.h>"
25 AC_MSG_RESULT()
26 AC_MSG_WARN([Could not find a cstdint header.])
27 fi
28 AC_DEFINE_UNQUOTED(CSTDINT_H,$ac_cv_cxx_cstdint,
29 [the location of <cstdint>])
30])
031
=== added file 'm4/pandora_cxx_demangle.m4'
--- m4/pandora_cxx_demangle.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_cxx_demangle.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,24 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6dnl Check for all of the headers and libs that Drizzle needs. We check all
7dnl of these for plugins too, to ensure that all of the appropriate defines
8dnl are set.
9
10AC_DEFUN([PANDORA_CXX_DEMANGLE],[
11 AC_LANG_PUSH([C++])
12 AC_CHECK_HEADERS(cxxabi.h)
13 AC_CACHE_CHECK([checking for abi::__cxa_demangle], pandora_cv_cxa_demangle,
14 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cxxabi.h>]], [[
15 char *foo= 0; int bar= 0;
16 foo= abi::__cxa_demangle(foo, foo, 0, &bar);
17 ]])],[pandora_cv_cxa_demangle=yes],[pandora_cv_cxa_demangle=no])])
18 AC_LANG_POP()
19
20 AS_IF([test "x$pandora_cv_cxa_demangle" = xyes],[
21 AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
22 [Define to 1 if you have the `abi::__cxa_demangle' function.])
23 ])
24])
025
=== added file 'm4/pandora_drizzle_build.m4'
--- m4/pandora_drizzle_build.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_drizzle_build.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,77 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6dnl Check for all of the headers and libs that Drizzle needs. We check all
7dnl of these for plugins too, to ensure that all of the appropriate defines
8dnl are set.
9
10AC_DEFUN([PANDORA_DRIZZLE_BUILD],[
11
12 dnl We need to turn on our CXXFLAGS to make sure it shows up correctly
13 save_CXXFLAGS="${CXXFLAGS}"
14 CXXFLAGS="${CXXFLAGS} ${AM_CXXFLAGS}"
15 PANDORA_CXX_STL_HASH
16 CXXFLAGS="${save_CXXFLAGS}"
17
18 PANDORA_CXX_CSTDINT
19 PANDORA_CXX_CINTTYPES
20
21 AC_STRUCT_TM
22
23 AC_FUNC_ALLOCA
24 AC_FUNC_UTIME_NULL
25 AC_FUNC_VPRINTF
26
27 PANDORA_WORKING_FDATASYNC
28
29 AC_CHECK_FUNCS(\
30 gethrtime \
31 setupterm \
32 backtrace \
33 backtrace_symbols \
34 backtrace_symbols_fd)
35
36 AC_HEADER_STAT
37 AC_HEADER_DIRENT
38 AC_HEADER_STDC
39 AC_HEADER_SYS_WAIT
40 AC_HEADER_STDBOOL
41
42 AC_CHECK_HEADERS(sys/types.h sys/fpu.h fpu_control.h ieeefp.h)
43 AC_CHECK_HEADERS(select.h sys/select.h)
44 AC_CHECK_HEADERS(utime.h sys/utime.h )
45 AC_CHECK_HEADERS(synch.h sys/mman.h sys/socket.h)
46 AC_CHECK_HEADERS(sched.h)
47 AC_CHECK_HEADERS(sys/prctl.h)
48 AC_CHECK_HEADERS(execinfo.h)
49 AC_CHECK_HEADERS(locale.h)
50 AC_CHECK_HEADERS(termcap.h termio.h termios.h asm/termbits.h)
51 AC_CHECK_HEADERS(paths.h)
52
53
54 #--------------------------------------------------------------------
55 # Check for system libraries. Adds the library to $LIBS
56 # and defines HAVE_LIBM etc
57 #--------------------------------------------------------------------
58
59 # For the sched_yield() function on Solaris
60 AC_CHECK_FUNC(sched_yield, [],
61 [AC_CHECK_LIB(posix4, [sched_yield],
62 [AC_DEFINE(HAVE_SCHED_YIELD, 1, [Have sched_yield function]) LIBS="$LIBS -lposix4"])])
63
64 AS_IF([test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"],[
65 AC_CHECK_FUNC(gtty, [], [AC_CHECK_LIB(compat, gtty)])
66 ])
67
68 AC_CHECK_HEADERS([curses.h term.h],[],[],[[
69 #ifdef HAVE_CURSES_H
70 # include <curses.h>
71 #endif
72 ]])
73 AC_CHECK_TYPES([uint, ulong])
74
75 PANDORA_CXX_DEMANGLE
76
77])
078
=== added file 'm4/pandora_fdatasync.m4'
--- m4/pandora_fdatasync.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_fdatasync.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,25 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for a working fdatasync call
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([PANDORA_WORKING_FDATASYNC],[
12 AC_CACHE_CHECK([working fdatasync],[ac_cv_func_fdatasync],[
13 AC_LANG_PUSH(C++)
14 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
15#include <unistd.h>
16 ]],[[
17fdatasync(4);
18 ]])],
19 [ac_cv_func_fdatasync=yes],
20 [ac_cv_func_fdatasync=no])
21 AC_LANG_POP()
22 ])
23 AS_IF([test "x${ac_cv_func_fdatasync}" = "xyes"],
24 [AC_DEFINE([HAVE_FDATASYNC],[1],[If the system has a working fdatasync])])
25])
0\ No newline at end of file26\ No newline at end of file
127
=== modified file 'm4/pandora_have_better_malloc.m4'
--- m4/pandora_have_better_malloc.m4 2009-08-07 21:05:59 +0000
+++ m4/pandora_have_better_malloc.m4 2009-12-05 23:40:29 +0000
@@ -60,3 +60,8 @@
60 AC_SUBST([BETTER_MALLOC_LIBS])60 AC_SUBST([BETTER_MALLOC_LIBS])
6161
62])62])
63
64AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[
65 AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC])
66 LIBS="${LIBS} ${BETTER_MALLOC_LIBS}"
67])
63\ No newline at end of file68\ No newline at end of file
6469
=== added file 'm4/pandora_have_gcc_atomics.m4'
--- m4/pandora_have_gcc_atomics.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_gcc_atomics.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,37 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for GCC Atomic Support
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([PANDORA_HAVE_GCC_ATOMICS],[
12
13 AC_CACHE_CHECK(
14 [whether the compiler provides atomic builtins],
15 [ac_cv_gcc_atomic_builtins],
16 [AC_RUN_IFELSE(
17 [AC_LANG_PROGRAM([],[[
18 int foo= -10; int bar= 10;
19 if (!__sync_fetch_and_add(&foo, bar) || foo)
20 return -1;
21 bar= __sync_lock_test_and_set(&foo, bar);
22 if (bar || foo != 10)
23 return -1;
24 bar= __sync_val_compare_and_swap(&bar, foo, 15);
25 if (bar)
26 return -1;
27 return 0;
28 ]])],
29 [ac_cv_gcc_atomic_builtins=yes],
30 [ac_cv_gcc_atomic_builtins=no])])
31
32 AS_IF([test "x$ac_cv_gcc_atomic_builtins" = "xyes"],[
33 AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1,
34 [Define to 1 if compiler provides atomic builtins.])
35 ])
36
37])
0\ No newline at end of file38\ No newline at end of file
139
=== added file 'm4/pandora_have_libavahi.m4'
--- m4/pandora_have_libavahi.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libavahi.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,41 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBAVAHI],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libavahi
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libavahi],
14 [AS_HELP_STRING([--disable-libavahi],
15 [Build with libavahi support @<:@default=on@:>@])],
16 [ac_enable_libavahi="$enableval"],
17 [ac_enable_libavahi="yes"])
18
19 AS_IF([test "x$ac_enable_libavahi" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(avahi-client,avahi-common,[
21 #include <avahi-client/client.h>
22 #include <avahi-common/simple-watch.h>
23 ],[
24 AvahiSimplePoll *simple_poll= avahi_simple_poll_new();
25 ])
26 ],[
27 ac_cv_libavahi="no"
28 ])
29
30 AM_CONDITIONAL(HAVE_LIBAVAHI, [test "x${ac_cv_libavahi}" = "xyes"])
31])
32
33AC_DEFUN([PANDORA_HAVE_LIBAVAHI],[
34 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
35])
36
37AC_DEFUN([PANDORA_REQUIRE_LIBAVAHI],[
38 AC_REQUIRE([_PANDORA_SEARCH_LIBAVAHI])
39 AS_IF([test "x${ac_cv_libavahi}" = "xno"],
40 AC_MSG_ERROR([libavahi is required for ${PACKAGE}]))
41])
042
=== added file 'm4/pandora_have_libbdb.m4'
--- m4/pandora_have_libbdb.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libbdb.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,40 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBBDB],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for bekerely db
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libbdb],
14 [AS_HELP_STRING([--disable-libbdb],
15 [Build with libbdb support @<:@default=on@:>@])],
16 [ac_enable_libbdb="$enableval"],
17 [ac_enable_libbdb="yes"])
18
19 AS_IF([test "x$ac_enable_libbdb" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(db,,[
21 #include <db.h>
22 ],[
23 const char *test= DB_VERSION_STRING;
24 ])
25 ],[
26 ac_cv_libbdb="no"
27 ])
28
29 AM_CONDITIONAL(HAVE_LIBBDB, [test "x${ac_cv_libbdb}" = "xyes"])
30])
31
32AC_DEFUN([PANDORA_HAVE_LIBBDB],[
33 AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])
34])
35
36AC_DEFUN([PANDORA_REQUIRE_LIBBDB],[
37 AC_REQUIRE([_PANDORA_SEARCH_LIBBDB])
38 AS_IF([test "x${ac_cv_libbdb}" = "xno"],
39 AC_MSG_ERROR([libbdb is required for ${PACKAGE}]))
40])
041
=== added file 'm4/pandora_have_libdl.m4'
--- m4/pandora_have_libdl.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libdl.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,51 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libdl
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBDL],[
12
13 save_LIBS="$LIBS"
14 LIBS=""
15 AC_CHECK_LIB(dl,dlopen)
16 AC_CHECK_FUNCS(dlopen)
17 LIBDL_LIBS="$LIBS"
18 LIBS="$my_save_LIBS"
19 AC_SUBST(LIBDL_LIBS)
20
21 AM_CONDITIONAL(HAVE_LIBDL, [test "x${ac_cv_func_dlopen}" = "xyes"])
22])
23
24AC_DEFUN([_PANDORA_HAVE_LIBDL],[
25
26 AC_ARG_ENABLE([libdl],
27 [AS_HELP_STRING([--disable-libdl],
28 [Build with libdl support @<:@default=on@:>@])],
29 [ac_enable_libdl="$enableval"],
30 [ac_enable_libdl="yes"])
31
32 _PANDORA_SEARCH_LIBDL
33])
34
35
36AC_DEFUN([PANDORA_HAVE_LIBDL],[
37 AC_REQUIRE([_PANDORA_HAVE_LIBDL])
38])
39
40AC_DEFUN([_PANDORA_REQUIRE_LIBDL],[
41 ac_enable_libdl="yes"
42 _PANDORA_SEARCH_LIBDL
43
44 AS_IF([test "$ac_cv_func_dlopen" != "yes"],[
45 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.])
46 ])
47])
48
49AC_DEFUN([PANDORA_REQUIRE_LIBDL],[
50 AC_REQUIRE([_PANDORA_REQUIRE_LIBDL])
51])
052
=== added file 'm4/pandora_have_libevent.m4'
--- m4/pandora_have_libevent.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libevent.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,66 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libevent
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBEVENT],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(event,,
15 [
16 #include <sys/types.h>
17 #include <sys/time.h>
18 #include <stdlib.h>
19 #include <event.h>
20 ],[
21 struct bufferevent bev;
22 bufferevent_settimeout(&bev, 1, 1);
23 event_init();
24 event_loop(EVLOOP_ONCE);
25 ])
26
27 AM_CONDITIONAL(HAVE_LIBEVENT, [test "x${ac_cv_libevent}" = "xyes"])
28
29 AS_IF([test "x${ac_cv_libevent}" = "xyes"],[
30 save_LIBS="${LIBS}"
31 LIBS="${LIBS} ${LTLIBEVENT}"
32 AC_CHECK_FUNCS(event_base_new)
33 AC_CHECK_FUNCS(event_base_free)
34 AC_CHECK_FUNCS(event_base_get_method)
35 LIBS="$save_LIBS"
36 ])
37])
38
39AC_DEFUN([_PANDORA_HAVE_LIBEVENT],[
40
41 AC_ARG_ENABLE([libevent],
42 [AS_HELP_STRING([--disable-libevent],
43 [Build with libevent support @<:@default=on@:>@])],
44 [ac_enable_libevent="$enableval"],
45 [ac_enable_libevent="yes"])
46
47 _PANDORA_SEARCH_LIBEVENT
48])
49
50
51AC_DEFUN([PANDORA_HAVE_LIBEVENT],[
52 AC_REQUIRE([_PANDORA_HAVE_LIBEVENT])
53])
54
55AC_DEFUN([_PANDORA_REQUIRE_LIBEVENT],[
56 ac_enable_libevent="yes"
57 _PANDORA_SEARCH_LIBEVENT
58
59 AS_IF([test x$ac_cv_libevent = xno],[
60 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.])
61 ])
62])
63
64AC_DEFUN([PANDORA_REQUIRE_LIBEVENT],[
65 AC_REQUIRE([_PANDORA_REQUIRE_LIBEVENT])
66])
067
=== modified file 'm4/pandora_have_libgearman.m4'
--- m4/pandora_have_libgearman.m4 2009-07-29 18:43:09 +0000
+++ m4/pandora_have_libgearman.m4 2009-12-05 23:40:29 +0000
@@ -21,7 +21,7 @@
21 #include <libgearman/gearman.h>21 #include <libgearman/gearman.h>
22 ],[22 ],[
23 gearman_client_st gearman_client;23 gearman_client_st gearman_client;
24 gearman_version();24 gearman_client_context(&gearman_client);
25 ])25 ])
26 ],[26 ],[
27 ac_cv_libgearman="no"27 ac_cv_libgearman="no"
@@ -37,5 +37,5 @@
37AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[37AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
38 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])38 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
39 AS_IF([test "x${ac_cv_libgearman}" = "xno"],39 AS_IF([test "x${ac_cv_libgearman}" = "xno"],
40 AC_MSG_ERROR([libgearman is required for ${PACKAGE}]))40 AC_MSG_ERROR([At least version 0.10 of libgearman is required for ${PACKAGE}]))
41])41])
4242
=== modified file 'm4/pandora_have_libmemcached.m4'
--- m4/pandora_have_libmemcached.m4 2009-08-07 21:05:59 +0000
+++ m4/pandora_have_libmemcached.m4 2009-12-05 23:40:29 +0000
@@ -30,7 +30,6 @@
30 30
31 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])31 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
32 32
33 AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ])
34])33])
3534
36AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[35AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
3736
=== added file 'm4/pandora_have_libpcre.m4'
--- m4/pandora_have_libpcre.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libpcre.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,73 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libpcre
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(pcre,,
15 [#include <pcre.h>],
16 [
17 pcre *re= NULL;
18 pcre_version();
19 ])
20 AS_IF([test "x$ac_cv_libpcre" = "xno"],
21 [
22 unset ac_cv_libpcre
23 unset HAVE_LIBPCRE
24 unset LIBPCRE
25 unset LIBPCRE_PREFIX
26 unset LTLIBPCRE
27 AC_LIB_HAVE_LINKFLAGS(pcre,,
28 [#include <pcre/pcre.h>],
29 [
30 pcre *re= NULL;
31 pcre_version();
32 ])
33 AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
34 ac_cv_pcre_location="<pcre/pcre.h>"
35 ])
36 ],[
37 ac_cv_pcre_location="<pcre.h>"
38 ])
39
40 AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
41])
42
43AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
44
45 AC_ARG_ENABLE([libpcre],
46 [AS_HELP_STRING([--disable-libpcre],
47 [Build with libpcre support @<:@default=on@:>@])],
48 [ac_enable_libpcre="$enableval"],
49 [ac_enable_libpcre="yes"])
50
51 _PANDORA_SEARCH_LIBPCRE
52])
53
54
55AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
56 AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
57])
58
59AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
60 ac_enable_libpcre="yes"
61 _PANDORA_SEARCH_LIBPCRE
62
63 AS_IF([test x$ac_cv_libpcre = xno],[
64 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.])
65 ],[
66 AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
67 [Location of pcre header])
68 ])
69])
70
71AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
72 AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])
73])
074
=== added file 'm4/pandora_have_libreadline.m4'
--- m4/pandora_have_libreadline.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libreadline.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,242 @@
1#
2# SYNOPSIS
3#
4# PANDORA_HAVE_LIBREADLINE
5#
6# DESCRIPTION
7#
8# Searches for a readline compatible library. If found, defines
9# `HAVE_LIBREADLINE'. If the found library has the `add_history'
10# function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
11# locations of the necessary include files and sets `HAVE_READLINE_H'
12# or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
13# 'HAVE_HISTORY_H' if the corresponding include files exists.
14#
15# The libraries that may be readline compatible are `libedit',
16# `libeditline' and `libreadline'. Sometimes we need to link a
17# termcap library for readline to work, this macro tests these cases
18# too by trying to link with `libtermcap', `libcurses' or
19# `libncurses' before giving up.
20#
21# Here is an example of how to use the information provided by this
22# macro to perform the necessary includes or declarations in a C
23# file:
24#
25# #ifdef HAVE_LIBREADLINE
26# # if defined(HAVE_READLINE_READLINE_H)
27# # include <readline/readline.h>
28# # elif defined(HAVE_READLINE_H)
29# # include <readline.h>
30# # else /* !defined(HAVE_READLINE_H) */
31# extern char *readline ();
32# # endif /* !defined(HAVE_READLINE_H) */
33# char *cmdline = NULL;
34# #else /* !defined(HAVE_READLINE_READLINE_H) */
35# /* no readline */
36# #endif /* HAVE_LIBREADLINE */
37#
38# #ifdef HAVE_READLINE_HISTORY
39# # if defined(HAVE_READLINE_HISTORY_H)
40# # include <readline/history.h>
41# # elif defined(HAVE_HISTORY_H)
42# # include <history.h>
43# # else /* !defined(HAVE_HISTORY_H) */
44# extern void add_history ();
45# extern int write_history ();
46# extern int read_history ();
47# # endif /* defined(HAVE_READLINE_HISTORY_H) */
48# /* no history */
49# #endif /* HAVE_READLINE_HISTORY */
50#
51# LAST MODIFICATION
52#
53# 2009-11-17
54#
55# Based on VL_LIB_READLINE from Ville Laurikari
56#
57# COPYLEFT
58#
59# Copyright (c) 2009 Monty Taylor
60# Copyright (c) 2002 Ville Laurikari <vl@iki.fi>
61#
62# Copying and distribution of this file, with or without
63# modification, are permitted in any medium without royalty provided
64# the copyright notice and this notice are preserved.
65
66AC_DEFUN([PANDORA_CHECK_TIOCGWINSZ],[
67 AC_CACHE_CHECK([for TIOCGWINSZ in sys/ioctl.h],
68 [pandora_cv_tiocgwinsz_in_ioctl],[
69 AC_COMPILE_IFELSE([
70 AC_LANG_PROGRAM([[
71#include <sys/types.h>
72#include <sys/ioctl.h>
73 ]],[[
74int x= TIOCGWINSZ;
75 ]])
76 ],[
77 pandora_cv_tiocgwinsz_in_ioctl=yes
78 ],[
79 pandora_cv_tiocgwinsz_in_ioctl=no
80 ])
81 ])
82 AS_IF([test "$pandora_cv_tiocgwinsz_in_ioctl" = "yes"],[
83 AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
84 [READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.])
85 ])
86])
87
88AC_DEFUN([PANDORA_CHECK_RL_COMPENTRY], [
89 AC_CACHE_CHECK([defined rl_compentry_func_t], [pandora_cv_rl_compentry],[
90 AC_COMPILE_IFELSE([
91 AC_LANG_PROGRAM([[
92#include "stdio.h"
93#include "readline/readline.h"
94 ]],[[
95rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
96 ]])
97 ],[
98 pandora_cv_rl_compentry=yes
99 ],[
100 pandora_cv_rl_compentry=no
101 ])
102 ])
103 AS_IF([test "$pandora_cv_rl_compentry" = "yes"],[
104 AC_DEFINE([HAVE_RL_COMPENTRY], [1],
105 [Does system provide rl_compentry_func_t])
106 ])
107
108 AC_LANG_PUSH(C++)
109 save_CXXFLAGS="${CXXFLAGS}"
110 CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
111 AC_CACHE_CHECK([rl_compentry_func_t works], [pandora_cv_rl_compentry_works],[
112 AC_COMPILE_IFELSE([
113 AC_LANG_PROGRAM([[
114#include "stdio.h"
115#include "readline/readline.h"
116 ]],[[
117rl_completion_entry_function= (rl_compentry_func_t*)NULL;
118 ]])
119 ],[
120 pandora_cv_rl_compentry_works=yes
121 ],[
122 pandora_cv_rl_compentry_works=no
123 ])
124 ])
125 AS_IF([test "$pandora_cv_rl_compentry_works" = "yes"],[
126 AC_DEFINE([HAVE_WORKING_RL_COMPENTRY], [1],
127 [Does system provide an rl_compentry_func_t that is usable])
128 ])
129 CXXFLAGS="${save_CXXFLAGS}"
130 AC_LANG_POP()
131])
132
133
134AC_DEFUN([PANDORA_CHECK_RL_COMPLETION_FUNC], [
135 AC_CACHE_CHECK([defined rl_completion_func_t], [pandora_cv_rl_completion],[
136 AC_COMPILE_IFELSE([
137 AC_LANG_PROGRAM([[
138#include "stdio.h"
139#include "readline/readline.h"
140 ]],[[
141rl_completion_func_t *func1= (rl_completion_func_t*)0;
142 ]])
143 ],[
144 pandora_cv_rl_completion=yes
145 ],[
146 pandora_cv_rl_completion=no
147 ])
148 ])
149 AS_IF([test "$pandora_cv_rl_completion" = "yes"],[
150 AC_DEFINE([HAVE_RL_COMPLETION], [1],
151 [Does system provide rl_completion_func_t])
152 ])
153])
154
155AC_DEFUN([_PANDORA_SEARCH_LIBREADLINE], [
156
157 save_LIBS="${LIBS}"
158 LIBS=""
159
160 AC_CACHE_CHECK([for a readline compatible library],
161 ac_cv_libreadline, [
162 ORIG_LIBS="$LIBS"
163 for readline_lib in readline edit editline; do
164 for termcap_lib in "" termcap curses ncurses; do
165 if test -z "$termcap_lib"; then
166 TRY_LIB="-l$readline_lib"
167 else
168 TRY_LIB="-l$readline_lib -l$termcap_lib"
169 fi
170 LIBS="$ORIG_LIBS $TRY_LIB"
171 AC_TRY_LINK_FUNC(readline, ac_cv_libreadline="$TRY_LIB")
172 if test -n "$ac_cv_libreadline"; then
173 break
174 fi
175 done
176 if test -n "$ac_cv_libreadline"; then
177 break
178 fi
179 done
180 if test -z "$ac_cv_libreadline"; then
181 ac_cv_libreadline="no"
182 LIBS="$ORIG_LIBS"
183 fi
184 ])
185
186 if test "$ac_cv_libreadline" != "no"; then
187 AC_DEFINE(HAVE_LIBREADLINE, 1,
188 [Define if you have a readline compatible library])
189 AC_CHECK_HEADERS(readline.h readline/readline.h)
190 AC_CACHE_CHECK([whether readline supports history],
191 ac_cv_libreadline_history, [
192 ac_cv_libreadline_history="no"
193 AC_TRY_LINK_FUNC(add_history, ac_cv_libreadline_history="yes")
194 ])
195 if test "$ac_cv_libreadline_history" = "yes"; then
196 AC_DEFINE(HAVE_READLINE_HISTORY, 1,
197 [Define if your readline library has \`add_history'])
198 AC_CHECK_HEADERS(history.h readline/history.h)
199 fi
200 fi
201 PANDORA_CHECK_RL_COMPENTRY
202 PANDORA_CHECK_RL_COMPLETION_FUNC
203 PANDORA_CHECK_TIOCGWINSZ
204
205
206 READLINE_LIBS="${LIBS}"
207 LIBS="${save_LIBS}"
208 AC_SUBST(READLINE_LIBS)
209
210 AM_CONDITIONAL(HAVE_LIBREADLINE, [test "x${ac_cv_libreadline}" = "xyes"])
211])
212
213AC_DEFUN([_PANDORA_HAVE_LIBREADLINE],[
214
215 AC_ARG_ENABLE([libreadline],
216 [AS_HELP_STRING([--disable-libreadline],
217 [Build with libreadline support @<:@default=on@:>@])],
218 [ac_enable_libreadline="$enableval"],
219 [ac_enable_libreadline="yes"])
220
221 _PANDORA_SEARCH_LIBREADLINE
222])
223
224
225AC_DEFUN([PANDORA_HAVE_LIBREADLINE],[
226 AC_REQUIRE([_PANDORA_HAVE_LIBREADLINE])
227])
228
229AC_DEFUN([_PANDORA_REQUIRE_LIBREADLINE],[
230 ac_enable_libreadline="yes"
231 _PANDORA_SEARCH_LIBREADLINE
232
233 AS_IF([test "x$ac_cv_libreadline" = "xno"],
234 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.]))
235
236])
237
238AC_DEFUN([PANDORA_REQUIRE_LIBREADLINE],[
239 AC_REQUIRE([_PANDORA_REQUIRE_LIBREADLINE])
240])
241
242
0243
=== added file 'm4/pandora_have_libtokyocabinet.m4'
--- m4/pandora_have_libtokyocabinet.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libtokyocabinet.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,52 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6dnl Provides support for finding libtokyocabinet.
7dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET
8
9AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[
10 AC_REQUIRE([AC_LIB_PREFIX])
11
12 dnl --------------------------------------------------------------------
13 dnl Check for libtokyocabinet
14 dnl --------------------------------------------------------------------
15
16 AC_ARG_ENABLE([libtokyocabinet],
17 [AS_HELP_STRING([--disable-libtokyocabinet],
18 [Build with libtokyocabinet support @<:@default=on@:>@])],
19 [ac_enable_libtokyocabinet="$enableval"],
20 [ac_enable_libtokyocabinet="yes"])
21
22 AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[
23 AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[
24#include <tcutil.h>
25 ],[
26const char *test= tcversion;
27 ])
28 ],[
29 ac_cv_libtokyocabinet="no"
30 ])
31
32 AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[
33
34 PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet], [
35 ac_cv_libtokyocabinet=yes
36 LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
37 LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
38 ],[])
39 ])
40
41 AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"])
42])
43
44AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[
45 AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
46])
47
48AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[
49 AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
50 AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"],
51 AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.]))
52])
053
=== added file 'm4/pandora_have_libuuid.m4'
--- m4/pandora_have_libuuid.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libuuid.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,55 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libuuid
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBUUID],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 dnl Do this by hand. Need to check for uuid/uuid.h, but uuid may or may
15 dnl not be a lib is weird.
16 AC_CHECK_HEADERS(uuid/uuid.h)
17 AC_LIB_HAVE_LINKFLAGS(uuid,,
18 [
19 #include <uuid/uuid.h>
20 ],
21 [
22 uuid_t uout;
23 uuid_generate(uout);
24 ])
25
26 AM_CONDITIONAL(HAVE_LIBUUID, [test "x${ac_cv_libuuid}" = "xyes"])
27])
28
29AC_DEFUN([_PANDORA_HAVE_LIBUUID],[
30
31 AC_ARG_ENABLE([libuuid],
32 [AS_HELP_STRING([--disable-libuuid],
33 [Build with libuuid support @<:@default=on@:>@])],
34 [ac_enable_libuuid="$enableval"],
35 [ac_enable_libuuid="yes"])
36
37 _PANDORA_SEARCH_LIBUUID
38])
39
40
41AC_DEFUN([PANDORA_HAVE_LIBUUID],[
42 AC_REQUIRE([_PANDORA_HAVE_LIBUUID])
43])
44
45AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[
46 ac_enable_libuuid="yes"
47 _PANDORA_SEARCH_LIBUUID
48 AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
49 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.])
50 ])
51])
52
53AC_DEFUN([PANDORA_REQUIRE_LIBUUID],[
54 AC_REQUIRE([_PANDORA_REQUIRE_LIBUUID])
55])
056
=== added file 'm4/pandora_have_libxml2.m4'
--- m4/pandora_have_libxml2.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libxml2.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,52 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6dnl Provides support for finding libxml2.
7dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2
8
9AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[
10 AC_REQUIRE([AC_LIB_PREFIX])
11
12 dnl --------------------------------------------------------------------
13 dnl Check for libxml2
14 dnl --------------------------------------------------------------------
15
16 AC_ARG_ENABLE([libxml2],
17 [AS_HELP_STRING([--disable-libxml2],
18 [Build with libxml2 support @<:@default=on@:>@])],
19 [ac_enable_libxml2="$enableval"],
20 [ac_enable_libxml2="yes"])
21
22 AS_IF([test "x$ac_enable_libxml2" = "xyes"],[
23 AC_LIB_HAVE_LINKFLAGS(xml2,,[
24#include <libxml/xmlversion.h>
25 ],[
26const char *test= LIBXML_DOTTED_VERSION;
27 ])
28 ],[
29 ac_cv_libxml2="no"
30 ])
31
32 AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[
33
34 PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [
35 ac_cv_libxml2=yes
36 LTLIBXML2=${LIBXML2_LIBS}
37 LIBXML2=${LIBXML2_LIBS}
38 ],[])
39 ])
40
41 AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"])
42])
43
44AC_DEFUN([PANDORA_HAVE_LIBXML2],[
45 AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
46])
47
48AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[
49 AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
50 AS_IF([test "x${ac_cv_libxml2}" = "xno"],
51 AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.]))
52])
053
=== added file 'm4/pandora_have_libz.m4'
--- m4/pandora_have_libz.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libz.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,51 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check for libz
8#--------------------------------------------------------------------
9
10
11AC_DEFUN([_PANDORA_SEARCH_LIBZ],[
12 AC_REQUIRE([AC_LIB_PREFIX])
13
14 AC_LIB_HAVE_LINKFLAGS(z,,
15 [
16 #include <zlib.h>
17 ],[
18 crc32(0, Z_NULL, 0);
19 ])
20
21 AM_CONDITIONAL(HAVE_LIBZ, [test "x${ac_cv_libz}" = "xyes"])
22])
23
24AC_DEFUN([_PANDORA_HAVE_LIBZ],[
25
26 AC_ARG_ENABLE([libz],
27 [AS_HELP_STRING([--disable-libz],
28 [Build with libz support @<:@default=on@:>@])],
29 [ac_enable_libz="$enableval"],
30 [ac_enable_libz="yes"])
31
32 _PANDORA_SEARCH_LIBZ
33])
34
35
36AC_DEFUN([PANDORA_HAVE_LIBZ],[
37 AC_REQUIRE([_PANDORA_HAVE_LIBZ])
38])
39
40AC_DEFUN([_PANDORA_REQUIRE_LIBZ],[
41 ac_enable_libz="yes"
42 _PANDORA_SEARCH_LIBZ
43
44 AS_IF([test x$ac_cv_libz = xno],[
45 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.])
46 ])
47])
48
49AC_DEFUN([PANDORA_REQUIRE_LIBZ],[
50 AC_REQUIRE([_PANDORA_REQUIRE_LIBZ])
51])
052
=== modified file 'm4/pandora_header_assert.m4'
--- m4/pandora_header_assert.m4 2009-07-08 07:18:46 +0000
+++ m4/pandora_header_assert.m4 2009-12-05 23:40:29 +0000
@@ -8,6 +8,7 @@
8dnl Check whether to enable assertions.8dnl Check whether to enable assertions.
9AC_DEFUN([PANDORA_HEADER_ASSERT],9AC_DEFUN([PANDORA_HEADER_ASSERT],
10[10[
11 AC_CHECK_HEADERS(assert.h)
11 AC_MSG_CHECKING([whether to enable assertions])12 AC_MSG_CHECKING([whether to enable assertions])
12 AC_ARG_ENABLE([assert],13 AC_ARG_ENABLE([assert],
13 [AS_HELP_STRING([--disable-assert],14 [AS_HELP_STRING([--disable-assert],
@@ -16,8 +17,7 @@
16 [ac_cv_assert="yes"])17 [ac_cv_assert="yes"])
17 AC_MSG_RESULT([$ac_cv_assert])18 AC_MSG_RESULT([$ac_cv_assert])
1819
19 AS_IF([test "$ac_cv_assert" = "yes"], 20 AS_IF([test "$ac_cv_assert" = "no"],
20 [AC_CHECK_HEADERS(assert.h)],
21 [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])21 [AC_DEFINE(NDEBUG, 1, [Define to 1 if assertions should be disabled.])])
22])22])
2323
2424
=== modified file 'm4/pandora_libtool.m4'
--- m4/pandora_libtool.m4 2009-07-08 07:18:46 +0000
+++ m4/pandora_libtool.m4 2009-12-05 23:40:29 +0000
@@ -5,6 +5,15 @@
55
6AC_DEFUN([PANDORA_LIBTOOL],[6AC_DEFUN([PANDORA_LIBTOOL],[
7 AC_REQUIRE([AC_PROG_LIBTOOL])7 AC_REQUIRE([AC_PROG_LIBTOOL])
8 m4_ifndef([LT_PREREQ],[
9 pandora_have_old_libtool=yes
10 ],[
11 pandora_have_old_libtool=no
12 ])
13 AS_IF([test "$SUNCC" = "yes" -a "${pandora_have_old_libtool}" = "yes"],[
14 AC_MSG_ERROR([Building ${PACKAGE} with Sun Studio requires at least libtool 2.2])
15 ])
16
8 dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read17 dnl By requiring AC_PROG_LIBTOOL, we should force the macro system to read
9 dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT18 dnl libtool.m4, where in 2.2 AC_PROG_LIBTOOL is an alias for LT_INIT
10 dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it.19 dnl Then, if we're on 2.2, we should have LT_LANG, so we'll call it.
1120
=== modified file 'm4/pandora_plugins.m4'
--- m4/pandora_plugins.m4 2009-09-16 21:10:51 +0000
+++ m4/pandora_plugins.m4 2009-12-05 23:40:29 +0000
@@ -9,20 +9,32 @@
99
10AC_DEFUN([PANDORA_PLUGINS],[10AC_DEFUN([PANDORA_PLUGINS],[
1111
12 m4_sinclude(config/plugin.ac)12 dnl We do this to prime the files from a fresh checkout. Normally we want
13 dnl these commands to be executed by make. Perhaps we should split them into
14 dnl a few shell script snippets in config and make Make call them... we're
15 dnl going to get there...
16 dnl ANYWAY - syscmd gets called during aclocal - so before automake. It will
17 dnl get called probably during autoconf too, so it's important to protect
18 dnl with test -f ... if the files exist, we don't have the chicken/egg
19 dnl problem and therefore don't need to do anything here
20 m4_syscmd([python config/pandora-plugin > /dev/null])
21 m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
22
23 m4_sinclude(config/pandora-plugin.ac)
24
13 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list25 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
14 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list],
15 [List of plugins that should be loaded on startup if no
16 value is given for --plugin-load])
17
18 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`26 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
19 AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL")27 AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL")
20 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])28 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
29 AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
21 m4_ifval(m4_normalize([$1]),[30 m4_ifval(m4_normalize([$1]),[
22 AC_CONFIG_FILES($*)31 AC_CONFIG_FILES($*)
23 ],[32 ],[
24 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list],33 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list],
25 [List of plugins to be built in])34 [List of plugins to be built in])
35 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],
36 [List of plugins that should be loaded on startup if no
37 value is given for --plugin-load])
26 ])38 ])
2739
2840
2941
=== modified file 'm4/pandora_pthread.m4'
--- m4/pandora_pthread.m4 2009-10-07 01:12:30 +0000
+++ m4/pandora_pthread.m4 2009-12-05 23:40:29 +0000
@@ -53,6 +53,186 @@
53 [pthread_yield function with one argument])53 [pthread_yield function with one argument])
54 ])54 ])
5555
56 AC_CHECK_FUNCS(pthread_attr_getstacksize pthread_attr_setprio \
57 pthread_attr_setschedparam \
58 pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
59 pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
60 pthread_setprio_np pthread_setschedparam pthread_sigmask \
61 pthread_attr_create rwlock_init
62)
63
64
65
66# Check definition of pthread_getspecific
67AC_CACHE_CHECK([args to pthread_getspecific], [pandora_cv_getspecific_args],
68 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
69#if !defined(_REENTRANT)
70#define _REENTRANT
71#endif
72#ifndef _POSIX_PTHREAD_SEMANTICS
73#define _POSIX_PTHREAD_SEMANTICS
74#endif
75#include <pthread.h>
76 ]], [[
77void *pthread_getspecific(pthread_key_t key);
78pthread_getspecific((pthread_key_t) NULL);
79 ]])],
80 [pandora_cv_getspecific_args=POSIX],
81 [pandora_cv_getspecific_args=other])])
82 if test "$pandora_cv_getspecific_args" = "other"
83 then
84 AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1],
85 [For some non posix threads])
86 fi
87
88 # Check definition of pthread_mutex_init
89 AC_CACHE_CHECK([args to pthread_mutex_init], [pandora_cv_mutex_init_args],
90 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
91#ifndef _REENTRANT
92#define _REENTRANT
93#endif
94#ifndef _POSIX_PTHREAD_SEMANTICS
95#define _POSIX_PTHREAD_SEMANTICS
96#endif
97#include <pthread.h> ]], [[
98 pthread_mutexattr_t attr;
99 pthread_mutex_t mp;
100 pthread_mutex_init(&mp,&attr); ]])],
101 [pandora_cv_mutex_init_args=POSIX],
102 [pandora_cv_mutex_init_args=other])])
103 if test "$pandora_cv_mutex_init_args" = "other"
104 then
105 AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1],
106 [For some non posix threads])
107 fi
108#---END:
109
110#---START: Used in for client configure
111# Check definition of readdir_r
112AC_CACHE_CHECK([args to readdir_r], [pandora_cv_readdir_r],
113 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
114#ifndef _REENTRANT
115#define _REENTRANT
116#endif
117#ifndef _POSIX_PTHREAD_SEMANTICS
118#define _POSIX_PTHREAD_SEMANTICS
119#endif
120#include <pthread.h>
121#include <dirent.h>]], [[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
122readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ]])],
123 [pandora_cv_readdir_r=POSIX],
124 [pandora_cv_readdir_r=other])])
125if test "$pandora_cv_readdir_r" = "POSIX"
126then
127 AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r])
128fi
129
130# Check definition of posix sigwait()
131AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait],
132 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
133#ifndef _REENTRANT
134#define _REENTRANT
135#endif
136#ifndef _POSIX_PTHREAD_SEMANTICS
137#define _POSIX_PTHREAD_SEMANTICS
138#endif
139#include <pthread.h>
140#include <signal.h>
141 ]], [[
142#ifndef _AIX
143sigset_t set;
144int sig;
145sigwait(&set,&sig);
146#endif
147 ]])],
148 [pandora_cv_sigwait=POSIX],
149 [pandora_cv_sigwait=other])])
150if test "$pandora_cv_sigwait" = "POSIX"
151then
152 AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait])
153fi
154
155if test "$pandora_cv_sigwait" != "POSIX"
156then
157unset pandora_cv_sigwait
158# Check definition of posix sigwait()
159AC_CACHE_CHECK([style of sigwait], [pandora_cv_sigwait],
160 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
161#ifndef _REENTRANT
162#define _REENTRANT
163#endif
164#ifndef _POSIX_PTHREAD_SEMANTICS
165#define _POSIX_PTHREAD_SEMANTICS
166#endif
167#include <pthread.h>
168#include <signal.h>
169 ]], [[
170sigset_t set;
171int sig;
172sigwait(&set);
173 ]])],
174 [pandora_cv_sigwait=NONPOSIX],
175 [pandora_cv_sigwait=other])])
176if test "$pandora_cv_sigwait" = "NONPOSIX"
177then
178 AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument])
179fi
180fi
181#---END:
182
183# Check if pthread_attr_setscope() exists
184AC_CACHE_CHECK([for pthread_attr_setscope], [pandora_cv_pthread_attr_setscope],
185 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
186#ifndef _REENTRANT
187#define _REENTRANT
188#endif
189#ifndef _POSIX_PTHREAD_SEMANTICS
190#define _POSIX_PTHREAD_SEMANTICS
191#endif
192#include <pthread.h>
193 ]], [[
194pthread_attr_t thr_attr;
195pthread_attr_setscope(&thr_attr,0);
196 ]])],
197 [pandora_cv_pthread_attr_setscope=yes],
198 [pandora_cv_pthread_attr_setscope=no])])
199if test "$pandora_cv_pthread_attr_setscope" = "yes"
200then
201 AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope])
202fi
203
204
205AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
206[AC_TRY_LINK([#define _GNU_SOURCE
207#include <pthread.h>
208#ifdef __cplusplus
209extern "C"
210#endif
211],
212[
213 pthread_yield();
214], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)])
215if test "$ac_cv_pthread_yield_zero_arg" = "yes"
216then
217 AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
218 [pthread_yield that doesn't take any arguments])
219fi
220AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg,
221[AC_TRY_LINK([#define _GNU_SOURCE
222#include <pthread.h>
223#ifdef __cplusplus
224extern "C"
225#endif
226],
227[
228 pthread_yield(0);
229], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)])
230if test "$ac_cv_pthread_yield_one_arg" = "yes"
231then
232 AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
233 [pthread_yield function with one argument])
234fi
235
56 CFLAGS="${save_CFLAGS}"236 CFLAGS="${save_CFLAGS}"
57 CXXFLAGS="${save_CXXFLAGS}"237 CXXFLAGS="${save_CXXFLAGS}"
58])238])
59239
=== added file 'm4/pandora_run_cpplint.m4'
--- m4/pandora_run_cpplint.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_run_cpplint.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,8 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([PANDORA_RUN_CPPLINT],[
7 m4_syscmd([python config/make-lint.py])
8])
09
=== added file 'm4/pandora_sasl.m4'
--- m4/pandora_sasl.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_sasl.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,133 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_SASL],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for sasl
11 dnl --------------------------------------------------------------------
12 AC_ARG_ENABLE([sasl],
13 [AS_HELP_STRING([--disable-sasl],
14 [Build with sasl support @<:@default=on@:>@])],
15 [ac_enable_sasl="$enableval"],
16 [ac_enable_sasl="yes"])
17
18 AS_IF([test "x$ac_enable_sasl" = "xyes"],
19 [
20 AC_LIB_HAVE_LINKFLAGS(sasl,,[
21 #include <stdlib.h>
22 #include <sasl/sasl.h>
23 ],[
24 sasl_server_init(NULL, NULL);
25 ])
26
27 AS_IF([test "x${ac_cv_libsasl}" != "xyes" ],
28 [
29 AC_LIB_HAVE_LINKFLAGS(sasl2,,[
30 #include <stdlib.h>
31 #include <sasl/sasl.h>
32 ],[
33 sasl_server_init(NULL, NULL);
34 ])
35 HAVE_LIBSASL="$HAVE_LIBSASL2"
36 LIBSASL="$LIBSASL2"
37 LIBSASL_PREFIX="$LIBSASL2_PREFIX"
38 LTLIBSASL="$LT_LIBSASL2"
39 ])
40 ])
41
42 AS_IF([test "x${ac_cv_libsasl}" = "xyes" -o "x${ac_cv_libsasl2}" = "xyes"],
43 [ac_cv_sasl=yes],
44 [ac_cv_sasl=no])
45
46 AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
47 AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
48 AM_CONDITIONAL(HAVE_SASL, [test "x${ac_cv_sasl}" = "xyes"])
49])
50
51AC_DEFUN([PANDORA_HAVE_SASL],[
52 AC_REQUIRE([_PANDORA_SEARCH_SASL])
53])
54
55AC_DEFUN([PANDORA_REQUIRE_SASL],[
56 AC_REQUIRE([_PANDORA_SEARCH_SASL])
57 AS_IF([test "x${ac_cv_sasl}" = "xno"],
58 AC_MSG_ERROR([SASL (libsasl or libsasl2) is required for ${PACKAGE}]))
59])
60
61AC_DEFUN([_PANDORA_SEARCH_LIBSASL],[
62 AC_REQUIRE([AC_LIB_PREFIX])
63
64 dnl --------------------------------------------------------------------
65 dnl Check for libsasl
66 dnl --------------------------------------------------------------------
67
68 AC_ARG_ENABLE([libsasl],
69 [AS_HELP_STRING([--disable-libsasl],
70 [Build with libsasl support @<:@default=on@:>@])],
71 [ac_enable_libsasl="$enableval"],
72 [ac_enable_libsasl="yes"])
73
74 AS_IF([test "x$ac_enable_libsasl" = "xyes"],[
75 AC_LIB_HAVE_LINKFLAGS(sasl,,[
76 #include <stdlib.h>
77 #include <sasl/sasl.h>
78 ],[
79 sasl_server_init(NULL, NULL);
80 ])
81 ],[
82 ac_cv_libsasl="no"
83 ])
84
85 AM_CONDITIONAL(HAVE_LIBSASL, [test "x${ac_cv_libsasl}" = "xyes"])
86])
87
88AC_DEFUN([PANDORA_HAVE_LIBSASL],[
89 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
90])
91
92AC_DEFUN([PANDORA_REQUIRE_LIBSASL],[
93 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL])
94 AS_IF([test "x${ac_cv_libsasl}" = "xno"],
95 AC_MSG_ERROR([libsasl is required for ${PACKAGE}]))
96])
97
98AC_DEFUN([_PANDORA_SEARCH_LIBSASL2],[
99 AC_REQUIRE([AC_LIB_PREFIX])
100
101 dnl --------------------------------------------------------------------
102 dnl Check for libsasl2
103 dnl --------------------------------------------------------------------
104
105 AC_ARG_ENABLE([libsasl2],
106 [AS_HELP_STRING([--disable-libsasl2],
107 [Build with libsasl2 support @<:@default=on@:>@])],
108 [ac_enable_libsasl2="$enableval"],
109 [ac_enable_libsasl2="yes"])
110
111 AS_IF([test "x$ac_enable_libsasl2" = "xyes"],[
112 AC_LIB_HAVE_LINKFLAGS(sasl2,,[
113 #include <stdlib.h>
114 #include <sasl2/sasl2.h>
115 ],[
116 sasl2_server_init(NULL, NULL);
117 ])
118 ],[
119 ac_cv_libsasl2="no"
120 ])
121
122 AM_CONDITIONAL(HAVE_LIBSASL2, [test "x${ac_cv_libsasl2}" = "xyes"])
123])
124
125AC_DEFUN([PANDORA_HAVE_LIBSASL2],[
126 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
127])
128
129AC_DEFUN([PANDORA_REQUIRE_LIBSASL2],[
130 AC_REQUIRE([_PANDORA_SEARCH_LIBSASL2])
131 AS_IF([test "x${ac_cv_libsasl2}" = "xno"],
132 AC_MSG_ERROR([libsasl2 is required for ${PACKAGE}]))
133])
0134
=== added file 'm4/pandora_stack_direction.m4'
--- m4/pandora_stack_direction.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_stack_direction.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,39 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6#--------------------------------------------------------------------
7# Check what direction the stack runs in
8#--------------------------------------------------------------------
9
10AC_DEFUN([PANDORA_STACK_DIRECTION],[
11 AC_REQUIRE([AC_FUNC_ALLOCA])
12 AC_CACHE_CHECK([stack direction], [ac_cv_c_stack_direction],[
13 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
14#include <stdlib.h>
15 int find_stack_direction ()
16 {
17 static char *addr = 0;
18 auto char dummy;
19 if (addr == 0)
20 {
21 addr = &dummy;
22 return find_stack_direction ();
23 }
24 else
25 return (&dummy > addr) ? 1 : -1;
26 }
27 ]],[[
28 exit (find_stack_direction() < 0);
29 ]])],[
30 ac_cv_c_stack_direction=1
31 ],[
32 ac_cv_c_stack_direction=-1
33 ])
34 ])
35 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
36])
37
38
39
040
=== added file 'm4/pandora_stl_hash.m4'
--- m4/pandora_stl_hash.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_stl_hash.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,107 @@
1# We check two things: where the include file is for hash_map, and
2# what namespace hash_map lives in within that include file. We
3# include AC_COMPILE_IFELSE for all the combinations we've seen in the
4# wild. We define one of HAVE_HASH_MAP or HAVE_EXT_HASH_MAP depending
5# on location, and HASH_NAMESPACE to be the namespace hash_map is
6# defined in.
7#
8# Ideally we'd use AC_CACHE_CHECK, but that only lets us store one value
9# at a time, and we need to store two (filename and namespace).
10# prints messages itself, so we have to do the message-printing ourselves
11# via AC_MSG_CHECKING + AC_MSG_RESULT. (TODO(csilvers): can we cache?)
12
13AC_DEFUN([PANDORA_CXX_STL_HASH],
14 [AC_MSG_CHECKING(the location of hash_map)
15 AC_LANG_PUSH(C++)
16 ac_cv_cxx_hash_map=""
17 for location in "" "ext/" "tr1/" ; do
18 for namespace in __gnu_cxx "" std stdext; do
19 for classprefix in unordered hash; do
20 if test -z "$ac_cv_cxx_hash_map"; then
21 AC_COMPILE_IFELSE(
22 [AC_LANG_PROGRAM([[#include <${location}${classprefix}_map>]],
23 [[${namespace}::${classprefix}_map<int, int> t]])],
24 [ac_cv_cxx_hash_map="<${location}${classprefix}_map>";
25 ac_cv_cxx_hash_set="<${location}${classprefix}_set>";
26 ac_cv_cxx_hash_namespace="$namespace";
27 ac_cv_cxx_hash_map_class="${classprefix}_map";
28 ac_cv_cxx_hash_set_class="${classprefix}_set"])
29
30 fi
31 done
32 done
33 done
34
35 if test -n "$ac_cv_cxx_hash_map"; then
36 AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
37 AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
38 AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map,
39 [the location of <hash_map>])
40 AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set,
41 [the location of <hash_set>])
42 AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace,
43 [the namespace of hash_map/hash_set])
44 AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class,
45 [the classname of hash_map])
46 AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class,
47 [the classname of hash_set])
48 AC_MSG_RESULT([$ac_cv_cxx_hash_map])
49 else
50 AC_MSG_RESULT()
51 AC_MSG_WARN([could not find an STL hash_map])
52 fi
53 AC_CACHE_CHECK(
54 [whether hash_map has rehash method],
55 [ac_cv_hash_map_has_rehash],
56 [AC_COMPILE_IFELSE(
57 [AC_LANG_PROGRAM([[
58#include HASH_MAP_H
59using namespace HASH_NAMESPACE;
60 ]],[[
61HASH_MAP_CLASS<int, int> test_hash;
62test_hash.rehash(100);
63 ]])],
64 [ac_cv_hash_map_has_rehash=yes],
65 [ac_cv_hash_map_has_rehash=no])])
66 AS_IF([test $ac_cv_hash_map_has_rehash = yes],[
67 AC_DEFINE(HASH_MAP_HAS_REHASH, 1, [if hash_map<> hash rehash method])
68 ])
69 AC_CACHE_CHECK(
70 [whether hash_map has resize method],
71 [ac_cv_hash_map_has_resize],
72 [AC_COMPILE_IFELSE(
73 [AC_LANG_PROGRAM([[
74#include HASH_MAP_H
75using namespace HASH_NAMESPACE;
76 ]],[[
77HASH_MAP_CLASS<int, int> test_hash;
78test_hash.resize(100);
79 ]])],
80 [ac_cv_hash_map_has_resize=yes],
81 [ac_cv_hash_map_has_resize=no])])
82 AS_IF([test $ac_cv_hash_map_has_resize = yes],[
83 AC_DEFINE(HASH_MAP_HAS_RESIZE, 1, [if hash_map<> hash resize method])
84 ])
85 AC_CACHE_CHECK(
86 [whether to redefine hash<string>],
87 [ac_cv_redefine_hash_string],
88 [AC_COMPILE_IFELSE(
89 [AC_LANG_PROGRAM([[
90#include HASH_SET_H
91#include <string>
92using namespace HASH_NAMESPACE;
93using namespace std;
94 ]],[[
95string teststr("test");
96HASH_SET_CLASS<string> test_hash;
97HASH_SET_CLASS<string>::iterator iter= test_hash.find(teststr);
98if (iter != test_hash.end())
99 return 1;
100 ]])],
101 [ac_cv_redefine_hash_string=no],
102 [ac_cv_redefine_hash_string=yes])])
103 AS_IF([test $ac_cv_redefine_hash_string = yes],[
104 AC_DEFINE(REDEFINE_HASH_STRING, 1, [if hash<string> needs to be defined])
105 ])
106 AC_LANG_POP()
107])
0108
=== modified file 'm4/pandora_vc_build.m4'
--- m4/pandora_vc_build.m4 2009-09-16 21:10:51 +0000
+++ m4/pandora_vc_build.m4 2009-12-05 23:40:29 +0000
@@ -52,6 +52,72 @@
52 AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display])52 AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display])
53 AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch])53 AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch])
54 AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison])54 AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison])
55 55])
56])56
5757AC_DEFUN([_PANDORA_READ_FROM_FILE],[
58 $1=`grep $1 $2 | cut -f2 -d=`
59])
60
61AC_DEFUN([PANDORA_VC_VERSION],[
62 AC_REQUIRE([PANDORA_BUILDING_FROM_VC])
63
64 PANDORA_RELEASE_DATE=`date +%Y.%m`
65 PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
66
67 dnl Set some defaults
68 PANDORA_VC_REVNO="0"
69 PANDORA_VC_REVID="unknown"
70 PANDORA_VC_BRANCH="bzr-export"
71
72 AS_IF([test -f ${srcdir}/config/bzr_revinfo],[
73 _PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/bzr_revinfo)
74 _PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/bzr_revinfo)
75 _PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
76 ${srcdir}/config/bzr_revinfo)
77 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
78 ${srcdir}/config/bzr_revinfo)
79 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
80 ${srcdir}/config/bzr_revinfo)
81 _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_COMMENT],
82 ${srcdir}/config/bzr_revinfo)
83 ])
84 AS_IF([test "${ac_cv_building_from_bzr}" = "yes"],[
85dnl echo "Grabbing changelog and version information from bzr"
86dnl bzr log --short > ChangeLog || touch ChangeLog
87 PANDORA_BZR_REVNO=`bzr revno`
88 AS_IF([test "x$PANDORA_BZR_REVNO" != "${PANDORA_VC_REVNO}"],[
89 PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
90 PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | awk '{print $[]2}' | head -1`
91 PANDORA_VC_BRANCH=`bzr nick`
92 AS_IF([test "x${PANDORA_VC_BRANCH}" != "${PACKAGE}"],[
93 PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}"
94 ],[
95 PANDORA_RELEASE_COMMENT="trunk"
96 ])
97 ])
98 ])
99 AS_IF([! test -d config],[mkdir -p config])
100 cat > "config/bzr_revinfo" <<EOF
101PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
102PANDORA_VC_REVID=${PANDORA_VC_REVID}
103PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
104PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
105PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
106PANDORA_RELEASE_COMMENT=${PANDORA_RELEASE_COMMENT}
107EOF
108
109 PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
110 PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
111
112 VERSION="${PANDORA_RELEASE_VERSION}"
113 AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"],
114 [The real version of the software])
115 AC_SUBST(PANDORA_VC_REVNO)
116 AC_SUBST(PANDORA_VC_REVID)
117 AC_SUBST(PANDORA_VC_BRANCH)
118 AC_SUBST(PANDORA_RELEASE_DATE)
119 AC_SUBST(PANDORA_RELEASE_NODOTS_DATE)
120 AC_SUBST(PANDORA_RELEASE_COMMENT)
121 AC_SUBST(PANDORA_RELEASE_VERSION)
122 AC_SUBST(PANDORA_RELEASE_ID)
123])
58124
=== added file 'm4/pandora_version.m4'
--- m4/pandora_version.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_version.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,11 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([PANDORA_VERSION],[
7
8 PANDORA_HEX_VERSION=`echo $VERSION | sed 's|[\-a-z0-9]*$||' | \
9 awk -F. '{printf "0x%0.2d%0.3d%0.3d", $[]1, $[]2, $[]3}'`
10 AC_SUBST([PANDORA_HEX_VERSION])
11])
012
=== modified file 'm4/pandora_warnings.m4'
--- m4/pandora_warnings.m4 2009-09-16 21:10:51 +0000
+++ m4/pandora_warnings.m4 2009-12-05 23:40:29 +0000
@@ -129,9 +129,9 @@
129129
130 AS_IF([test "$INTELCC" = "yes"],[130 AS_IF([test "$INTELCC" = "yes"],[
131 m4_if(PW_LESS_WARNINGS,[no],[131 m4_if(PW_LESS_WARNINGS,[no],[
132 BASE_WARNINGS="-w1 -Wall -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual"132 BASE_WARNINGS="-w1 -Werror -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual"
133 ],[133 ],[
134 BASE_WARNINGS="-w1 -Wall -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981"134 BASE_WARNINGS="-w1 -Wcheck -Wformat -Wp64 -Woverloaded-virtual -Wcast-qual -diag-disable 981"
135 ])135 ])
136 CC_WARNINGS="${BASE_WARNINGS}"136 CC_WARNINGS="${BASE_WARNINGS}"
137 CXX_WARNINGS="${BASE_WARNINGS}"137 CXX_WARNINGS="${BASE_WARNINGS}"
@@ -147,7 +147,25 @@
147 AS_IF([test "${ac_cv_assert}" = "no"],147 AS_IF([test "${ac_cv_assert}" = "no"],
148 [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"])148 [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"])
149 149
150 BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"150 AC_CACHE_CHECK([whether it is safe to use -Wextra],
151 [ac_cv_safe_to_use_Wextra_],
152 [save_CFLAGS="$CFLAGS"
153 CFLAGS="${W_FAIL} -pedantic -Wextra ${AM_CFLAGS} ${CFLAGS}"
154 AC_COMPILE_IFELSE([
155 AC_LANG_PROGRAM(
156 [[
157#include <stdio.h>
158 ]], [[]])
159 ],
160 [ac_cv_safe_to_use_Wextra_=yes],
161 [ac_cv_safe_to_use_Wextra_=no])
162 CFLAGS="$save_CFLAGS"])
163
164 BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}"
165 AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
166 [BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
167 [BASE_WARNINGS="${BASE_WARNINGS} -W"])
168
151 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"169 CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}"
152 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"170 CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}"
153171
@@ -240,13 +258,31 @@
240 [ac_cv_safe_to_use_Wattributes_=no])258 [ac_cv_safe_to_use_Wattributes_=no])
241 CXXFLAGS="${save_CXXFLAGS}"259 CXXFLAGS="${save_CXXFLAGS}"
242 AC_LANG_POP()])260 AC_LANG_POP()])
243 AS_IF([test "$ac_cv_safe_to_use_Wattributes_" = "yes"],261 AC_CACHE_CHECK([whether it is safe to use -Wno-attributes],
244 [],262 [ac_cv_safe_to_use_Wno_attributes_],
245 [CXX_WARNINGS="${CXX_WARNINGS} -Wno-attributes"])263 [save_CFLAGS="$CFLAGS"
264 CFLAGS="${W_FAIL} -pedantic -Wno_attributes_ ${AM_CFLAGS} ${CFLAGS}"
265 AC_COMPILE_IFELSE([
266 AC_LANG_PROGRAM(
267 [[
268#include <stdio.h>
269 ]], [[]])
270 ],
271 [ac_cv_safe_to_use_Wno_attributes_=yes],
272 [ac_cv_safe_to_use_Wno_attributes_=no])
273 CFLAGS="$save_CFLAGS"])
274
275 dnl GCC 3.4 doesn't have -Wno-attributes, so we can't turn them off
276 dnl by using that.
277 AS_IF([test "$ac_cv_safe_to_use_Wattributes_" != "yes"],[
278 AS_IF([test "$ac_cv_safe_to_use_Wno_attributes_" = "yes"],[
279 CC_WARNINGS="${CC_WARNINGS} -Wno-attributes"
280 NO_ATTRIBUTES="-Wno-attributes"])])
281
246 282
247 NO_REDUNDANT_DECLS="-Wno-redundant-decls"283 NO_REDUNDANT_DECLS="-Wno-redundant-decls"
248 dnl TODO: Figure out a better way to deal with this:284 dnl TODO: Figure out a better way to deal with this:
249 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces -Wno-attributes"285 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
250 NO_WERROR="-Wno-error"286 NO_WERROR="-Wno-error"
251 INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"287 INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
252 288
253289
=== added file 'm4/pandora_with_gettext.m4'
--- m4/pandora_with_gettext.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_gettext.m4 2009-12-05 23:40:29 +0000
@@ -0,0 +1,41 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; Sun Microsystems
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_WITH_GETTEXT],[
13
14 m4_syscmd([if test -d po ; then
15 echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp
16 PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]`
17 for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort`
18 do
19 if grep gettext.h "$f" | grep include >/dev/null 2>&1
20 then
21 echo "$f" >> po/POTFILES.in.stamp
22 fi
23 done
24 if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1
25 then
26 rm po/POTFILES.in.stamp
27 else
28 mv po/POTFILES.in.stamp po/POTFILES.in
29 fi
30 fi])
31
32 AM_GNU_GETTEXT(external, need-formatstring-macros)
33 AM_GNU_GETTEXT_VERSION([0.17])
34 AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
35 AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
36 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
37 MSGMERGE="${GMSGMERGE}"
38 ])
39 AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])
40
41])
042
=== modified file 'm4/pandora_with_memcached.m4'
--- m4/pandora_with_memcached.m4 2009-07-18 22:25:59 +0000
+++ m4/pandora_with_memcached.m4 2009-12-05 23:40:29 +0000
@@ -3,7 +3,7 @@
3dnl gives unlimited permission to copy and/or distribute it,3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6AC_DEFUN([PANDORA_WITH_MEMCACHED],[6AC_DEFUN([_PANDORA_SEARCH_MEMCACHED],[
77
8 AC_ARG_WITH([memcached],8 AC_ARG_WITH([memcached],
9 [AS_HELP_STRING([--with-memcached],9 [AS_HELP_STRING([--with-memcached],
@@ -13,21 +13,28 @@
1313
14 # just ignore the user if --without-memcached is passed.. it is14 # just ignore the user if --without-memcached is passed.. it is
15 # only used by make test15 # only used by make test
16 AS_IF([test "x$withval" = "xno"],[16 AS_IF([test "x$ac_cv_with_memcached" = "xno"],[
17 ac_cv_with_memcached=memcached17 ac_cv_with_memcached=memcached
18 MEMCACHED_BINARY=memcached18 MEMCACHED_BINARY=memcached
19 ],[19 ],[
20 AS_IF([test -f "$withval"],[20 AS_IF([test -f "$ac_cv_with_memcached"],[
21 ac_cv_with_memcached=$withval21 MEMCACHED_BINARY=$ac_cv_with_memcached
22 MEMCACHED_BINARY=$withval
23 ],[22 ],[
24 AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")23 AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")
25 AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[
26 AC_MSG_ERROR(["could not find memcached binary"])
27 ])
28 ])24 ])
29 ])25 ])
30 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY", 26 AC_DEFINE_UNQUOTED([MEMCACHED_BINARY], "$MEMCACHED_BINARY",
31 [Name of the memcached binary used in make test])27 [Name of the memcached binary used in make test])
3228])
33])29
30AC_DEFUN([PANDORA_HAVE_MEMCACHED],[
31 AC_REQUIRE([_PANDORA_SEARCH_MEMCACHED])
32])
33
34AC_DEFUN([PANDORA_REQUIRE_MEMCACHED],[
35 AC_REQUIRE([PANDORA_HAVE_MEMCACHED])
36 AS_IF([test "x$MEMCACHED_BINARY" = "xno"],[
37 AC_MSG_ERROR(["could not find memcached binary"])
38 ])
39])
40

Subscribers

People subscribed via source and target branches