Merge lp://staging/~mordred/libmemcached/pandora-build into lp://staging/~tangent-org/libmemcached/trunk
- pandora-build
- Merge into trunk
Proposed by
Monty Taylor
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~mordred/libmemcached/pandora-build |
Merge into: | lp://staging/~tangent-org/libmemcached/trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~mordred/libmemcached/pandora-build |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Pending | ||
Libmemcached-developers | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2009-08-10.
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message

Monty Taylor (mordred) wrote : Posted in a previous version of this proposal | # |
Revision history for this message

Monty Taylor (mordred) wrote : | # |
Updated to the latest pandora-build.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2009-08-06 14:29:25 +0000 | |||
3 | +++ .bzrignore 2009-08-10 21:09:44 +0000 | |||
4 | @@ -56,3 +56,4 @@ | |||
5 | 56 | libmemcached-0.30-1.x86_64.rpm | 56 | libmemcached-0.30-1.x86_64.rpm |
6 | 57 | libmemcached-0.31-1.src.rpm | 57 | libmemcached-0.31-1.src.rpm |
7 | 58 | libmemcached-0.31-1.x86_64.rpm | 58 | libmemcached-0.31-1.x86_64.rpm |
8 | 59 | config/plugin.ac | ||
9 | 59 | 60 | ||
10 | === modified file 'clients/Makefile.am' | |||
11 | --- clients/Makefile.am 2009-09-02 11:14:46 +0000 | |||
12 | +++ clients/Makefile.am 2009-09-16 09:03:12 +0000 | |||
13 | @@ -14,36 +14,28 @@ | |||
14 | 14 | 14 | ||
15 | 15 | memcat_SOURCES = memcat.c | 15 | memcat_SOURCES = memcat.c |
16 | 16 | memcat_LDADD = $(LDADDS) | 16 | memcat_LDADD = $(LDADDS) |
17 | 17 | memcat_LDFLAGS = -rpath $(pkglibdir) | ||
18 | 18 | 17 | ||
19 | 19 | memcp_SOURCES = memcp.c | 18 | memcp_SOURCES = memcp.c |
20 | 20 | memcp_LDADD = $(LDADDS) | 19 | memcp_LDADD = $(LDADDS) |
21 | 21 | memcp_LDFLAGS = -rpath $(pkglibdir) | ||
22 | 22 | 20 | ||
23 | 23 | memdump_SOURCES = memdump.c | 21 | memdump_SOURCES = memdump.c |
24 | 24 | memdump_LDADD = $(LDADDS) | 22 | memdump_LDADD = $(LDADDS) |
25 | 25 | memdump_LDFLAGS = -rpath $(pkglibdir) | ||
26 | 26 | 23 | ||
27 | 27 | memstat_SOURCES = memstat.c | 24 | memstat_SOURCES = memstat.c |
28 | 28 | memstat_LDADD = $(LDADDS) | 25 | memstat_LDADD = $(LDADDS) |
29 | 29 | memstat_LDFLAGS = -rpath $(pkglibdir) | ||
30 | 30 | 26 | ||
31 | 31 | memrm_SOURCES = memrm.c | 27 | memrm_SOURCES = memrm.c |
32 | 32 | memrm_LDADD = $(LDADDS) | 28 | memrm_LDADD = $(LDADDS) |
33 | 33 | memrm_LDFLAGS = -rpath $(pkglibdir) | ||
34 | 34 | 29 | ||
35 | 35 | memflush_SOURCES = memflush.c | 30 | memflush_SOURCES = memflush.c |
36 | 36 | memflush_LDADD = $(LDADDS) | 31 | memflush_LDADD = $(LDADDS) |
37 | 37 | memflush_LDFLAGS = -rpath $(pkglibdir) | ||
38 | 38 | 32 | ||
39 | 39 | memerror_SOURCES = memerror.c | 33 | memerror_SOURCES = memerror.c |
40 | 40 | memerror_LDADD = $(LDADDS) | 34 | memerror_LDADD = $(LDADDS) |
41 | 41 | memerror_LDFLAGS = -rpath $(pkglibdir) | ||
42 | 42 | 35 | ||
43 | 43 | memslap_SOURCES = memslap.c | 36 | memslap_SOURCES = memslap.c |
44 | 44 | memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) | 37 | memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) |
45 | 45 | memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS) | 38 | memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS) |
46 | 46 | memslap_LDFLAGS = $(AM_LDFLAGS) -rpath $(pkglibdir) | ||
47 | 47 | 39 | ||
48 | 48 | test-start-server: | 40 | test-start-server: |
49 | 49 | memflush --servers=localhost | 41 | memflush --servers=localhost |
50 | 50 | 42 | ||
51 | === modified file 'clients/utilities.c' | |||
52 | --- clients/utilities.c 2009-07-08 13:38:34 +0000 | |||
53 | +++ clients/utilities.c 2009-09-16 09:07:09 +0000 | |||
54 | @@ -28,7 +28,7 @@ | |||
55 | 28 | { | 28 | { |
56 | 29 | case OPT_SERVERS: return("List which servers you wish to connect to."); | 29 | case OPT_SERVERS: return("List which servers you wish to connect to."); |
57 | 30 | case OPT_VERSION: return("Display the version of the application and then exit."); | 30 | case OPT_VERSION: return("Display the version of the application and then exit."); |
59 | 31 | case OPT_HELP: return("Diplay this message and then exit."); | 31 | case OPT_HELP: return("Display this message and then exit."); |
60 | 32 | case OPT_VERBOSE: return("Give more details on the progression of the application."); | 32 | case OPT_VERBOSE: return("Give more details on the progression of the application."); |
61 | 33 | case OPT_DEBUG: return("Provide output only useful for debugging."); | 33 | case OPT_DEBUG: return("Provide output only useful for debugging."); |
62 | 34 | case OPT_FLAG: return("Provide flag information for storage operation."); | 34 | case OPT_FLAG: return("Provide flag information for storage operation."); |
63 | 35 | 35 | ||
64 | === modified file 'config/autorun.sh' | |||
65 | --- config/autorun.sh 2009-07-03 10:48:15 +0000 | |||
66 | +++ config/autorun.sh 2009-09-16 09:02:26 +0000 | |||
67 | @@ -35,6 +35,18 @@ | |||
68 | 35 | return 1 | 35 | return 1 |
69 | 36 | } | 36 | } |
70 | 37 | 37 | ||
71 | 38 | |||
72 | 39 | if test -f config/pre_hook.sh | ||
73 | 40 | then | ||
74 | 41 | . config/pre_hook.sh | ||
75 | 42 | fi | ||
76 | 43 | |||
77 | 44 | # We need to some file here for the m4_sinclude, even if it's just empty | ||
78 | 45 | if test ! -f config/plugin.ac | ||
79 | 46 | then | ||
80 | 47 | touch config/plugin.ac | ||
81 | 48 | fi | ||
82 | 49 | |||
83 | 38 | # Try to detect the supported binaries if the user didn't | 50 | # Try to detect the supported binaries if the user didn't |
84 | 39 | # override that by pushing the environment variable | 51 | # override that by pushing the environment variable |
85 | 40 | if test x$LIBTOOLIZE = x; then | 52 | if test x$LIBTOOLIZE = x; then |
86 | @@ -45,14 +57,14 @@ | |||
87 | 45 | fi | 57 | fi |
88 | 46 | 58 | ||
89 | 47 | if test x$ACLOCAL = x; then | 59 | if test x$ACLOCAL = x; then |
91 | 48 | ACLOCAL=`locate_binary aclocal-1.10 aclocal-1.9 aclocal19 aclocal` | 60 | ACLOCAL=`locate_binary aclocal-1.11 aclocal-1.10 aclocal-1.9 aclocal19 aclocal` |
92 | 49 | if test x$ACLOCAL = x; then | 61 | if test x$ACLOCAL = x; then |
93 | 50 | die "Did not find a supported aclocal" | 62 | die "Did not find a supported aclocal" |
94 | 51 | fi | 63 | fi |
95 | 52 | fi | 64 | fi |
96 | 53 | 65 | ||
97 | 54 | if test x$AUTOMAKE = x; then | 66 | if test x$AUTOMAKE = x; then |
99 | 55 | AUTOMAKE=`locate_binary automake-1.10 automake-1.9 automake19 automake` | 67 | AUTOMAKE=`locate_binary automake-1.11 automake-1.10 automake-1.9 automake19 automake` |
100 | 56 | if test x$AUTOMAKE = x; then | 68 | if test x$AUTOMAKE = x; then |
101 | 57 | die "Did not find a supported automake" | 69 | die "Did not find a supported automake" |
102 | 58 | fi | 70 | fi |
103 | @@ -78,6 +90,11 @@ | |||
104 | 78 | run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake" | 90 | run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake" |
105 | 79 | run $AUTOCONF || die "Can't execute autoconf" | 91 | run $AUTOCONF || die "Can't execute autoconf" |
106 | 80 | 92 | ||
107 | 93 | if test -f config/post_hook.sh | ||
108 | 94 | then | ||
109 | 95 | . config/post_hook.sh | ||
110 | 96 | fi | ||
111 | 97 | |||
112 | 81 | echo "---" | 98 | echo "---" |
113 | 82 | echo "Configured with the following tools:" | 99 | echo "Configured with the following tools:" |
114 | 83 | echo " * `$LIBTOOLIZE --version | head -1`" | 100 | echo " * `$LIBTOOLIZE --version | head -1`" |
115 | 84 | 101 | ||
116 | === modified file 'm4/pandora_64bit.m4' | |||
117 | --- m4/pandora_64bit.m4 2009-07-18 18:11:25 +0000 | |||
118 | +++ m4/pandora_64bit.m4 2009-08-10 21:04:49 +0000 | |||
119 | @@ -9,12 +9,11 @@ | |||
120 | 9 | AC_DEFUN([PANDORA_64BIT],[ | 9 | AC_DEFUN([PANDORA_64BIT],[ |
121 | 10 | AC_BEFORE([$0], [AC_LIB_PREFIX]) | 10 | AC_BEFORE([$0], [AC_LIB_PREFIX]) |
122 | 11 | 11 | ||
126 | 12 | 12 | AC_ARG_ENABLE([64bit], | |
127 | 13 | AC_ARG_ENABLE([64bit],[ | 13 | [AS_HELP_STRING([--disable-64bit], |
125 | 14 | AS_HELP_STRING([--disable-64bit], | ||
128 | 15 | [Build 64 bit binary @<:@default=on@:>@])], | 14 | [Build 64 bit binary @<:@default=on@:>@])], |
131 | 16 | [ac_enable_64bit="$enableval"], | 15 | [ac_enable_64bit="$enableval"], |
132 | 17 | [ac_enable_64bit="yes"]) | 16 | [ac_enable_64bit="yes"]) |
133 | 18 | 17 | ||
134 | 19 | AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) | 18 | AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) |
135 | 20 | AS_IF([test "x$ISAINFO" != "xno"], | 19 | AS_IF([test "x$ISAINFO" != "xno"], |
136 | @@ -26,23 +25,29 @@ | |||
137 | 26 | isainfo_k=`${ISAINFO} -k` | 25 | isainfo_k=`${ISAINFO} -k` |
138 | 27 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}" | 26 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}" |
139 | 28 | 27 | ||
140 | 29 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ | ||
141 | 30 | CPPFLAGS="-I/usr/local ${CPPFLAGS}" | ||
142 | 31 | ]) | ||
143 | 32 | |||
144 | 33 | AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ | ||
145 | 34 | LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}" | ||
146 | 35 | ]) | ||
147 | 36 | |||
148 | 37 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ | 28 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ |
149 | 29 | |||
150 | 30 | AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ | ||
151 | 31 | LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}" | ||
152 | 32 | ]) | ||
153 | 33 | |||
154 | 38 | AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ | 34 | AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ |
155 | 39 | dnl The user hasn't overridden the default libdir, so we'll | 35 | dnl The user hasn't overridden the default libdir, so we'll |
156 | 40 | dnl the dir suffix to match solaris 32/64-bit policy | 36 | dnl the dir suffix to match solaris 32/64-bit policy |
157 | 41 | libdir="${libdir}/${isainfo_k}" | 37 | libdir="${libdir}/${isainfo_k}" |
158 | 42 | ]) | 38 | ]) |
159 | 43 | 39 | ||
162 | 44 | CPPFLAGS="-m64 ${CPPFLAGS}" | 40 | AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[ |
163 | 45 | LDFLAGS="-m64 ${LDFLAGS}" | 41 | CFLAGS="${CFLAGS} -m64" |
164 | 42 | ac_cv_env_CFLAGS_set=set | ||
165 | 43 | ac_cv_env_CFLAGS_value='-m64' | ||
166 | 44 | ]) | ||
167 | 45 | AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ | ||
168 | 46 | CXXFLAGS="${CXXFLAGS} -m64" | ||
169 | 47 | ac_cv_env_CXXFLAGS_set=set | ||
170 | 48 | ac_cv_env_CXXFLAGS_value='-m64' | ||
171 | 49 | ]) | ||
172 | 50 | |||
173 | 46 | AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[ | 51 | AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[ |
174 | 47 | AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}" | 52 | AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}" |
175 | 48 | AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}" | 53 | AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}" |
176 | 49 | 54 | ||
177 | === modified file 'm4/pandora_canonical.m4' | |||
178 | --- m4/pandora_canonical.m4 2009-07-18 18:11:25 +0000 | |||
179 | +++ m4/pandora_canonical.m4 2009-09-16 09:02:26 +0000 | |||
180 | @@ -4,7 +4,7 @@ | |||
181 | 4 | dnl with or without modifications, as long as this notice is preserved. | 4 | dnl with or without modifications, as long as this notice is preserved. |
182 | 5 | 5 | ||
183 | 6 | dnl Which version of the canonical setup we're using | 6 | dnl Which version of the canonical setup we're using |
185 | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.22]) | 7 | AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.57]) |
186 | 8 | 8 | ||
187 | 9 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ | 9 | AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[ |
188 | 10 | dnl Force dependency tracking on for Sun Studio builds | 10 | dnl Force dependency tracking on for Sun Studio builds |
189 | @@ -23,6 +23,7 @@ | |||
190 | 23 | m4_define([PCT_REQUIRE_CXX],[no]) | 23 | m4_define([PCT_REQUIRE_CXX],[no]) |
191 | 24 | m4_define([PCT_IGNORE_SHARED_PTR],[no]) | 24 | m4_define([PCT_IGNORE_SHARED_PTR],[no]) |
192 | 25 | m4_define([PCT_FORCE_GCC42],[no]) | 25 | m4_define([PCT_FORCE_GCC42],[no]) |
193 | 26 | m4_define([PCT_SRC_IN_SRC],[no]) | ||
194 | 26 | m4_foreach([pct_arg],[$*],[ | 27 | m4_foreach([pct_arg],[$*],[ |
195 | 27 | m4_case(pct_arg, | 28 | m4_case(pct_arg, |
196 | 28 | [use-gnulib], [ | 29 | [use-gnulib], [ |
197 | @@ -40,6 +41,10 @@ | |||
198 | 40 | [force-gcc42], [ | 41 | [force-gcc42], [ |
199 | 41 | m4_undefine([PCT_FORCE_GCC42]) | 42 | m4_undefine([PCT_FORCE_GCC42]) |
200 | 42 | m4_define([PCT_FORCE_GCC42],[yes]) | 43 | m4_define([PCT_FORCE_GCC42],[yes]) |
201 | 44 | ], | ||
202 | 45 | [src-in-src], [ | ||
203 | 46 | m4_undefine([PCT_SRC_IN_SRC]) | ||
204 | 47 | m4_define([PCT_SRC_IN_SRC],[yes]) | ||
205 | 43 | ]) | 48 | ]) |
206 | 44 | ]) | 49 | ]) |
207 | 45 | 50 | ||
208 | @@ -54,6 +59,7 @@ | |||
209 | 54 | AC_CANONICAL_TARGET | 59 | AC_CANONICAL_TARGET |
210 | 55 | 60 | ||
211 | 56 | AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects) | 61 | AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects) |
212 | 62 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ||
213 | 57 | 63 | ||
214 | 58 | m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ]) | 64 | m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ]) |
215 | 59 | 65 | ||
216 | @@ -63,19 +69,16 @@ | |||
217 | 63 | 69 | ||
218 | 64 | dnl Once we can use a modern autoconf, we can use this | 70 | dnl Once we can use a modern autoconf, we can use this |
219 | 65 | dnl AC_PROG_CC_C99 | 71 | dnl AC_PROG_CC_C99 |
222 | 66 | AC_PROG_CXX | 72 | AC_REQUIRE([AC_PROG_CXX]) |
223 | 67 | AC_PROG_CPP | 73 | PANDORA_EXTENSIONS |
224 | 68 | AM_PROG_CC_C_O | 74 | AM_PROG_CC_C_O |
225 | 69 | 75 | ||
226 | 70 | 76 | ||
227 | 71 | gl_USE_SYSTEM_EXTENSIONS | ||
228 | 72 | m4_if(PCT_FORCE_GCC42, [yes], [ | 77 | m4_if(PCT_FORCE_GCC42, [yes], [ |
229 | 73 | AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION) | 78 | AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION) |
230 | 74 | ]) | 79 | ]) |
231 | 75 | 80 | ||
235 | 76 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) | 81 | PANDORA_PLATFORM |
233 | 77 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) | ||
234 | 78 | AS_IF([test "x$INTELCC" = "xyes"], [enable_rpath=no]) | ||
236 | 79 | 82 | ||
237 | 80 | PANDORA_LIBTOOL | 83 | PANDORA_LIBTOOL |
238 | 81 | 84 | ||
239 | @@ -96,7 +99,10 @@ | |||
240 | 96 | ]) | 99 | ]) |
241 | 97 | ]) | 100 | ]) |
242 | 98 | 101 | ||
244 | 99 | m4_if(PCT_USE_GNULIB, [yes], [gl_INIT]) | 102 | m4_if(PCT_USE_GNULIB, [yes], [ |
245 | 103 | gl_INIT | ||
246 | 104 | AC_CONFIG_LIBOBJ_DIR([gnulib]) | ||
247 | 105 | ]) | ||
248 | 100 | 106 | ||
249 | 101 | AC_C_BIGENDIAN | 107 | AC_C_BIGENDIAN |
250 | 102 | AC_C_CONST | 108 | AC_C_CONST |
251 | @@ -139,6 +145,12 @@ | |||
252 | 139 | AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}" | 145 | AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}" |
253 | 140 | ]) | 146 | ]) |
254 | 141 | ]) | 147 | ]) |
255 | 148 | AS_IF([test "PCT_SRC_IN_SRC" = "yes"],[ | ||
256 | 149 | AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}" | ||
257 | 150 | ]) | ||
258 | 151 | |||
259 | 152 | PANDORA_USE_PIPE | ||
260 | 153 | |||
261 | 142 | 154 | ||
262 | 143 | AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}" | 155 | AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}" |
263 | 144 | AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" | 156 | AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" |
264 | 145 | 157 | ||
265 | === modified file 'm4/pandora_ensure_gcc_version.m4' | |||
266 | --- m4/pandora_ensure_gcc_version.m4 2009-07-08 07:37:38 +0000 | |||
267 | +++ m4/pandora_ensure_gcc_version.m4 2009-09-16 09:02:26 +0000 | |||
268 | @@ -8,12 +8,15 @@ | |||
269 | 8 | AC_DEFUN([PANDORA_MAC_GCC42], | 8 | AC_DEFUN([PANDORA_MAC_GCC42], |
270 | 9 | [AS_IF([test "$GCC" = "yes"],[ | 9 | [AS_IF([test "$GCC" = "yes"],[ |
271 | 10 | AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ | 10 | AS_IF([test "$host_vendor" = "apple" -a "x${ac_cv_env_CC_set}" = "x"],[ |
273 | 11 | AS_IF([test -f /usr/bin/gcc-4.2], | 11 | host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'` |
274 | 12 | AS_IF([test "$host_os_version" -lt 10],[ | ||
275 | 13 | AS_IF([test -f /usr/bin/gcc-4.2], | ||
276 | 12 | [ | 14 | [ |
277 | 13 | CPP="/usr/bin/gcc-4.2 -E" | 15 | CPP="/usr/bin/gcc-4.2 -E" |
278 | 14 | CC=/usr/bin/gcc-4.2 | 16 | CC=/usr/bin/gcc-4.2 |
279 | 15 | CXX=/usr/bin/g++-4.2 | 17 | CXX=/usr/bin/g++-4.2 |
280 | 16 | ]) | 18 | ]) |
281 | 19 | ]) | ||
282 | 17 | ]) | 20 | ]) |
283 | 18 | ]) | 21 | ]) |
284 | 19 | ]) | 22 | ]) |
285 | 20 | 23 | ||
286 | === added file 'm4/pandora_extensions.m4' | |||
287 | --- m4/pandora_extensions.m4 1970-01-01 00:00:00 +0000 | |||
288 | +++ m4/pandora_extensions.m4 2009-09-16 09:02:26 +0000 | |||
289 | @@ -0,0 +1,16 @@ | |||
290 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
291 | 2 | dnl This file is free software; Sun Microsystems | ||
292 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
293 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
294 | 5 | |||
295 | 6 | AC_DEFUN([PANDORA_EXTENSIONS],[ | ||
296 | 7 | |||
297 | 8 | m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], | ||
298 | 9 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], | ||
299 | 10 | [AC_REQUIRE([AC_GNU_SOURCE])]) | ||
300 | 11 | |||
301 | 12 | ]) | ||
302 | 13 | |||
303 | 14 | AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[ | ||
304 | 15 | AC_REQUIRE([PANDORA_EXTENSIONS]) | ||
305 | 16 | ]) | ||
306 | 0 | 17 | ||
307 | === modified file 'm4/pandora_have_better_malloc.m4' | |||
308 | --- m4/pandora_have_better_malloc.m4 2009-07-16 02:58:56 +0000 | |||
309 | +++ m4/pandora_have_better_malloc.m4 2009-08-10 21:04:49 +0000 | |||
310 | @@ -11,8 +11,16 @@ | |||
311 | 11 | AC_ARG_ENABLE([umem], | 11 | AC_ARG_ENABLE([umem], |
312 | 12 | [AS_HELP_STRING([--enable-umem], | 12 | [AS_HELP_STRING([--enable-umem], |
313 | 13 | [Enable linking with libumem @<:@default=off@:>@])], | 13 | [Enable linking with libumem @<:@default=off@:>@])], |
316 | 14 | [ac_enable_umem="$enableval"], | 14 | [ac_enable_umem="$enableval"],[ |
317 | 15 | [ac_enable_umem="no"]) | 15 | case "$target_os" in |
318 | 16 | *solaris*) | ||
319 | 17 | ac_enable_umem="yes" | ||
320 | 18 | ;; | ||
321 | 19 | *) | ||
322 | 20 | ac_enable_umem="no" | ||
323 | 21 | ;; | ||
324 | 22 | esac | ||
325 | 23 | ]) | ||
326 | 16 | 24 | ||
327 | 17 | AC_ARG_ENABLE([tcmalloc], | 25 | AC_ARG_ENABLE([tcmalloc], |
328 | 18 | [AS_HELP_STRING([--enable-tcmalloc], | 26 | [AS_HELP_STRING([--enable-tcmalloc], |
329 | 19 | 27 | ||
330 | === modified file 'm4/pandora_have_libdrizzle.m4' | |||
331 | --- m4/pandora_have_libdrizzle.m4 2009-07-16 02:58:56 +0000 | |||
332 | +++ m4/pandora_have_libdrizzle.m4 2009-08-10 21:04:49 +0000 | |||
333 | @@ -9,16 +9,25 @@ | |||
334 | 9 | dnl -------------------------------------------------------------------- | 9 | dnl -------------------------------------------------------------------- |
335 | 10 | dnl Check for libdrizzle | 10 | dnl Check for libdrizzle |
336 | 11 | dnl -------------------------------------------------------------------- | 11 | dnl -------------------------------------------------------------------- |
340 | 12 | 12 | ||
341 | 13 | AC_LIB_HAVE_LINKFLAGS(drizzle,,[ | 13 | AC_ARG_ENABLE([libdrizzle], |
342 | 14 | #include <libdrizzle/drizzle_client.h> | 14 | [AS_HELP_STRING([--disable-libdrizzle], |
343 | 15 | [Build with libdrizzle support @<:@default=on@:>@])], | ||
344 | 16 | [ac_enable_libdrizzle="$enableval"], | ||
345 | 17 | [ac_enable_libdrizzle="yes"]) | ||
346 | 18 | |||
347 | 19 | AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[ | ||
348 | 20 | AC_LIB_HAVE_LINKFLAGS(drizzle,,[ | ||
349 | 21 | #include <libdrizzle/drizzle_client.h> | ||
350 | 22 | ],[ | ||
351 | 23 | drizzle_st drizzle; | ||
352 | 24 | drizzle_version(); | ||
353 | 25 | ]) | ||
354 | 15 | ],[ | 26 | ],[ |
357 | 16 | drizzle_st drizzle; | 27 | ac_cv_libdrizzle="no" |
356 | 17 | drizzle_version(); | ||
358 | 18 | ]) | 28 | ]) |
359 | 19 | 29 | ||
360 | 20 | AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) | 30 | AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"]) |
361 | 21 | |||
362 | 22 | ]) | 31 | ]) |
363 | 23 | 32 | ||
364 | 24 | AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ | 33 | AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[ |
365 | @@ -27,7 +36,7 @@ | |||
366 | 27 | 36 | ||
367 | 28 | AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[ |
368 | 29 | AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) | 38 | AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE]) |
370 | 30 | AS_IF([test x$ac_cv_libdrizzle = xno], | 39 | AS_IF([test "x${ac_cv_libdrizzle}" = "xno"], |
371 | 31 | AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])) | 40 | AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}])) |
372 | 32 | ]) | 41 | ]) |
373 | 33 | 42 | ||
374 | 34 | 43 | ||
375 | === modified file 'm4/pandora_have_libgearman.m4' | |||
376 | --- m4/pandora_have_libgearman.m4 2009-07-16 02:58:56 +0000 | |||
377 | +++ m4/pandora_have_libgearman.m4 2009-08-10 21:04:49 +0000 | |||
378 | @@ -10,14 +10,24 @@ | |||
379 | 10 | dnl Check for libgearman | 10 | dnl Check for libgearman |
380 | 11 | dnl -------------------------------------------------------------------- | 11 | dnl -------------------------------------------------------------------- |
381 | 12 | 12 | ||
387 | 13 | AC_LIB_HAVE_LINKFLAGS(gearman,, | 13 | AC_ARG_ENABLE([libgearman], |
388 | 14 | [#include <libgearman/gearman.h>],[ | 14 | [AS_HELP_STRING([--disable-libgearman], |
389 | 15 | gearman_client_st gearman_client; | 15 | [Build with libgearman support @<:@default=on@:>@])], |
390 | 16 | gearman_version(); | 16 | [ac_enable_libgearman="$enableval"], |
391 | 17 | ]) | 17 | [ac_enable_libgearman="yes"]) |
392 | 18 | |||
393 | 19 | AS_IF([test "x$ac_enable_libgearman" = "xyes"],[ | ||
394 | 20 | AC_LIB_HAVE_LINKFLAGS(gearman,,[ | ||
395 | 21 | #include <libgearman/gearman.h> | ||
396 | 22 | ],[ | ||
397 | 23 | gearman_client_st gearman_client; | ||
398 | 24 | gearman_version(); | ||
399 | 25 | ]) | ||
400 | 26 | ],[ | ||
401 | 27 | ac_cv_libgearman="no" | ||
402 | 28 | ]) | ||
403 | 18 | 29 | ||
404 | 19 | AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"]) | 30 | AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"]) |
405 | 20 | |||
406 | 21 | ]) | 31 | ]) |
407 | 22 | 32 | ||
408 | 23 | AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[ | 33 | AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[ |
409 | @@ -26,6 +36,6 @@ | |||
410 | 26 | 36 | ||
411 | 27 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ | 37 | AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[ |
412 | 28 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) | 38 | AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN]) |
414 | 29 | AS_IF([test x$ac_cv_libgearman = xno], | 39 | AS_IF([test "x${ac_cv_libgearman}" = "xno"], |
415 | 30 | AC_MSG_ERROR([libgearman is required for ${PACKAGE}])) | 40 | AC_MSG_ERROR([libgearman is required for ${PACKAGE}])) |
416 | 31 | ]) | 41 | ]) |
417 | 32 | 42 | ||
418 | === modified file 'm4/pandora_have_libmemcached.m4' | |||
419 | --- m4/pandora_have_libmemcached.m4 2009-07-16 02:58:56 +0000 | |||
420 | +++ m4/pandora_have_libmemcached.m4 2009-08-10 21:04:49 +0000 | |||
421 | @@ -10,18 +10,27 @@ | |||
422 | 10 | dnl Check for libmemcached | 10 | dnl Check for libmemcached |
423 | 11 | dnl -------------------------------------------------------------------- | 11 | dnl -------------------------------------------------------------------- |
424 | 12 | 12 | ||
431 | 13 | AC_LIB_HAVE_LINKFLAGS(memcached,,[ | 13 | AC_ARG_ENABLE([libmemcached], |
432 | 14 | #include <libmemcached/memcached.h> | 14 | [AS_HELP_STRING([--disable-libmemcached], |
433 | 15 | ], [ | 15 | [Build with libmemcached support @<:@default=on@:>@])], |
434 | 16 | memcached_st memc; | 16 | [ac_enable_libmemcached="$enableval"], |
435 | 17 | memcached_dump_func *df; | 17 | [ac_enable_libmemcached="yes"]) |
436 | 18 | memcached_version(); | 18 | |
437 | 19 | AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[ | ||
438 | 20 | AC_LIB_HAVE_LINKFLAGS(memcached,,[ | ||
439 | 21 | #include <libmemcached/memcached.h> | ||
440 | 22 | ],[ | ||
441 | 23 | memcached_st memc; | ||
442 | 24 | memcached_dump_func *df; | ||
443 | 25 | memcached_lib_version(); | ||
444 | 26 | ]) | ||
445 | 27 | ],[ | ||
446 | 28 | ac_cv_libmemcached="no" | ||
447 | 19 | ]) | 29 | ]) |
448 | 20 | 30 | ||
449 | 21 | AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) | 31 | AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"]) |
450 | 22 | 32 | ||
451 | 23 | AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ]) | 33 | AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ]) |
452 | 24 | |||
453 | 25 | ]) | 34 | ]) |
454 | 26 | 35 | ||
455 | 27 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ | 36 | AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[ |
456 | 28 | 37 | ||
457 | === modified file 'm4/pandora_have_libpq.m4' | |||
458 | --- m4/pandora_have_libpq.m4 2009-07-18 18:11:25 +0000 | |||
459 | +++ m4/pandora_have_libpq.m4 2009-08-10 21:04:49 +0000 | |||
460 | @@ -10,11 +10,26 @@ | |||
461 | 10 | dnl Check for libpq | 10 | dnl Check for libpq |
462 | 11 | dnl -------------------------------------------------------------------- | 11 | dnl -------------------------------------------------------------------- |
463 | 12 | 12 | ||
469 | 13 | AC_LIB_HAVE_LINKFLAGS(pq,,[ | 13 | AC_ARG_ENABLE([libpq], |
470 | 14 | #include <libpq-fe.h> | 14 | [AS_HELP_STRING([--disable-libpq], |
471 | 15 | ], [ | 15 | [Build with libpq support @<:@default=on@:>@])], |
472 | 16 | PGconn *conn; | 16 | [ac_enable_libpq="$enableval"], |
473 | 17 | conn = PQconnectdb(NULL); | 17 | [ac_enable_libpq="yes"]) |
474 | 18 | |||
475 | 19 | AS_IF([test "x$ac_enable_libpq" = "xyes"],[ | ||
476 | 20 | AC_CHECK_HEADERS([libpq-fe.h]) | ||
477 | 21 | AC_LIB_HAVE_LINKFLAGS(pq,,[ | ||
478 | 22 | #ifdef HAVE_LIBPQ_FE_H | ||
479 | 23 | # include <libpq-fe.h> | ||
480 | 24 | #else | ||
481 | 25 | # include <postgresql/libpq-fe.h> | ||
482 | 26 | #endif | ||
483 | 27 | ], [ | ||
484 | 28 | PGconn *conn; | ||
485 | 29 | conn = PQconnectdb(NULL); | ||
486 | 30 | ]) | ||
487 | 31 | ],[ | ||
488 | 32 | ac_cv_libpq="no" | ||
489 | 18 | ]) | 33 | ]) |
490 | 19 | 34 | ||
491 | 20 | AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"]) | 35 | AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"]) |
492 | @@ -26,6 +41,6 @@ | |||
493 | 26 | 41 | ||
494 | 27 | AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ | 42 | AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[ |
495 | 28 | AC_REQUIRE([PANDORA_HAVE_LIBPQ]) | 43 | AC_REQUIRE([PANDORA_HAVE_LIBPQ]) |
498 | 29 | AS_IF([test x$ac_cv_libpq = xno], | 44 | AS_IF([test "x${ac_cv_libpq}" = "xno"], |
499 | 30 | AC_MSG_ERROR([libpq is required for ${PACKAGE}])) | 45 | AC_MSG_ERROR([libpq is required for ${PACKAGE}])) |
500 | 31 | ]) | 46 | ]) |
501 | 32 | 47 | ||
502 | === added file 'm4/pandora_have_libsqlite3.m4' | |||
503 | --- m4/pandora_have_libsqlite3.m4 1970-01-01 00:00:00 +0000 | |||
504 | +++ m4/pandora_have_libsqlite3.m4 2009-08-10 21:04:49 +0000 | |||
505 | @@ -0,0 +1,42 @@ | |||
506 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
507 | 2 | dnl This file is free software; Sun Microsystems | ||
508 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
509 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
510 | 5 | |||
511 | 6 | AC_DEFUN([_PANDORA_SEARCH_LIBSQLITE3],[ | ||
512 | 7 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
513 | 8 | |||
514 | 9 | dnl -------------------------------------------------------------------- | ||
515 | 10 | dnl Check for libsqlite3 | ||
516 | 11 | dnl -------------------------------------------------------------------- | ||
517 | 12 | |||
518 | 13 | AC_ARG_ENABLE([libsqlite3], | ||
519 | 14 | [AS_HELP_STRING([--disable-libsqlite3], | ||
520 | 15 | [Build with libsqlite3 support @<:@default=on@:>@])], | ||
521 | 16 | [ac_enable_libsqlite3="$enableval"], | ||
522 | 17 | [ac_enable_libsqlite3="yes"]) | ||
523 | 18 | |||
524 | 19 | AS_IF([test "x$ac_enable_libsqlite3" = "xyes"],[ | ||
525 | 20 | AC_LIB_HAVE_LINKFLAGS(sqlite3,,[ | ||
526 | 21 | #include <stdio.h> | ||
527 | 22 | #include <sqlite3.h> | ||
528 | 23 | ],[ | ||
529 | 24 | sqlite3 *db; | ||
530 | 25 | sqlite3_open(NULL, &db); | ||
531 | 26 | ]) | ||
532 | 27 | ],[ | ||
533 | 28 | ac_cv_libsqlite3="no" | ||
534 | 29 | ]) | ||
535 | 30 | |||
536 | 31 | AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"]) | ||
537 | 32 | ]) | ||
538 | 33 | |||
539 | 34 | AC_DEFUN([PANDORA_HAVE_LIBSQLITE3],[ | ||
540 | 35 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) | ||
541 | 36 | ]) | ||
542 | 37 | |||
543 | 38 | AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[ | ||
544 | 39 | AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3]) | ||
545 | 40 | AS_IF([test "x${ac_cv_libsqlite3}" = "xno"], | ||
546 | 41 | AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}])) | ||
547 | 42 | ]) | ||
548 | 0 | 43 | ||
549 | === added file 'm4/pandora_have_protobuf.m4' | |||
550 | --- m4/pandora_have_protobuf.m4 1970-01-01 00:00:00 +0000 | |||
551 | +++ m4/pandora_have_protobuf.m4 2009-08-10 21:04:49 +0000 | |||
552 | @@ -0,0 +1,80 @@ | |||
553 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
554 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
555 | 3 | dnl | ||
556 | 4 | dnl pandora-build: A pedantic build system | ||
557 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
558 | 6 | dnl This file is free software; the Free Software Foundation | ||
559 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
560 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
561 | 9 | dnl | ||
562 | 10 | dnl From Monty Taylor | ||
563 | 11 | |||
564 | 12 | dnl -------------------------------------------------------------------- | ||
565 | 13 | dnl Check for Google Proto Buffers | ||
566 | 14 | dnl -------------------------------------------------------------------- | ||
567 | 15 | |||
568 | 16 | AC_DEFUN([_PANDORA_SEARCH_LIBPROTOBUF],[ | ||
569 | 17 | AC_REQUIRE([PANDORA_HAVE_PTHREAD]) | ||
570 | 18 | |||
571 | 19 | AC_LANG_PUSH([C++]) | ||
572 | 20 | save_CXXFLAGS="${CXXFLAGS}" | ||
573 | 21 | CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}" | ||
574 | 22 | AC_LIB_HAVE_LINKFLAGS(protobuf,, | ||
575 | 23 | [#include <google/protobuf/descriptor.h>], | ||
576 | 24 | [google::protobuf::FileDescriptor* file;], | ||
577 | 25 | [system]) | ||
578 | 26 | CXXFLAGS="${save_CXXFLAGS}" | ||
579 | 27 | AC_LANG_POP() | ||
580 | 28 | ]) | ||
581 | 29 | |||
582 | 30 | AC_DEFUN([PANDORA_HAVE_LIBPROTOBUF],[ | ||
583 | 31 | AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF]) | ||
584 | 32 | ]) | ||
585 | 33 | |||
586 | 34 | AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[ | ||
587 | 35 | AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF]) | ||
588 | 36 | AS_IF([test x$ac_cv_libprotobuf = xno], | ||
589 | 37 | AC_MSG_ERROR([libprotobuf is required for ${PACKAGE}. On Debian this can be found in libprotobuf-dev. On RedHat this can be found in protobuf-devel.])) | ||
590 | 38 | ]) | ||
591 | 39 | |||
592 | 40 | AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[ | ||
593 | 41 | AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF]) | ||
594 | 42 | p_recent_ver=$1 | ||
595 | 43 | p_recent_ver_major=`echo $p_recent_ver | cut -f1 -d.` | ||
596 | 44 | p_recent_ver_minor=`echo $p_recent_ver | cut -f2 -d.` | ||
597 | 45 | p_recent_ver_patch=`echo $p_recent_ver | cut -f3 -d.` | ||
598 | 46 | p_recent_ver_hex=`printf "%d%03d%03d" $p_recent_ver_major $p_recent_ver_minor $p_recent_ver_patch` | ||
599 | 47 | AC_LANG_PUSH([C++]) | ||
600 | 48 | AC_CACHE_CHECK([for protobuf >= $p_recent_ver], | ||
601 | 49 | [drizzle_cv_protobuf_recent], | ||
602 | 50 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
603 | 51 | #include <google/protobuf/descriptor.h> | ||
604 | 52 | #if GOOGLE_PROTOBUF_VERSION < $p_recent_ver_hex | ||
605 | 53 | # error Your version of Protobuf is too old | ||
606 | 54 | #endif | ||
607 | 55 | ]])], | ||
608 | 56 | [drizzle_cv_protobuf_recent=yes], | ||
609 | 57 | [drizzle_cv_protobuf_recent=no])]) | ||
610 | 58 | AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[ | ||
611 | 59 | AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver]) | ||
612 | 60 | ]) | ||
613 | 61 | AC_LANG_POP() | ||
614 | 62 | ]) | ||
615 | 63 | |||
616 | 64 | AC_DEFUN([_PANDORA_SEARCH_PROTOC],[ | ||
617 | 65 | AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF]) | ||
618 | 66 | AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH]) | ||
619 | 67 | ]) | ||
620 | 68 | |||
621 | 69 | AC_DEFUN([PANDORA_HAVE_PROTOC],[ | ||
622 | 70 | AC_REQUIRE([_PANDORA_SEARCH_PROTOC]) | ||
623 | 71 | ]) | ||
624 | 72 | |||
625 | 73 | AC_DEFUN([PANDORA_REQUIRE_PROTOC],[ | ||
626 | 74 | AC_REQUIRE([PANDORA_HAVE_PROTOC]) | ||
627 | 75 | AS_IF([test "x$PROTOC" = "xno"],[ | ||
628 | 76 | AC_MSG_ERROR([Couldn't find the protoc compiler. On Debian this can be found in protobuf-compiler. On RedHat this can be found in protobuf-compiler.]) | ||
629 | 77 | ]) | ||
630 | 78 | ]) | ||
631 | 79 | |||
632 | 80 | |||
633 | 0 | 81 | ||
634 | === removed file 'm4/pandora_have_sqlite.m4' | |||
635 | --- m4/pandora_have_sqlite.m4 2009-07-16 02:58:56 +0000 | |||
636 | +++ m4/pandora_have_sqlite.m4 1970-01-01 00:00:00 +0000 | |||
637 | @@ -1,24 +0,0 @@ | |||
638 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
639 | 2 | dnl This file is free software; Sun Microsystems | ||
640 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
641 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
642 | 5 | |||
643 | 6 | |||
644 | 7 | AC_DEFUN([_PANDORA_SEARCH_SQLITE],[ | ||
645 | 8 | AC_REQUIRE([AC_LIB_PREFIX]) | ||
646 | 9 | |||
647 | 10 | AC_LIB_HAVE_LINKFLAGS(sqlite3,,[ | ||
648 | 11 | #include <stdio.h> | ||
649 | 12 | #include <sqlite3.h> | ||
650 | 13 | ],[ | ||
651 | 14 | sqlite3 *db; | ||
652 | 15 | sqlite3_open(NULL, &db); | ||
653 | 16 | ]) | ||
654 | 17 | |||
655 | 18 | AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"]) | ||
656 | 19 | |||
657 | 20 | ]) | ||
658 | 21 | |||
659 | 22 | AC_DEFUN([PANDORA_HAVE_SQLITE],[ | ||
660 | 23 | AC_REQUIRE([_PANDORA_SEARCH_SQLITE]) | ||
661 | 24 | ]) | ||
662 | 25 | 0 | ||
663 | === added file 'm4/pandora_platform.m4' | |||
664 | --- m4/pandora_platform.m4 1970-01-01 00:00:00 +0000 | |||
665 | +++ m4/pandora_platform.m4 2009-09-16 09:02:26 +0000 | |||
666 | @@ -0,0 +1,77 @@ | |||
667 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
668 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
669 | 3 | dnl | ||
670 | 4 | dnl pandora-build: A pedantic build system | ||
671 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
672 | 6 | dnl This file is free software; the Free Software Foundation | ||
673 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
674 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
675 | 9 | dnl | ||
676 | 10 | dnl From Monty Taylor | ||
677 | 11 | |||
678 | 12 | AC_DEFUN([PANDORA_PLATFORM],[ | ||
679 | 13 | |||
680 | 14 | dnl Canonicalize the configuration name. | ||
681 | 15 | |||
682 | 16 | AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System]) | ||
683 | 17 | AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System]) | ||
684 | 18 | AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System]) | ||
685 | 19 | |||
686 | 20 | AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System]) | ||
687 | 21 | AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System]) | ||
688 | 22 | AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System]) | ||
689 | 23 | |||
690 | 24 | |||
691 | 25 | case "$host_os" in | ||
692 | 26 | *solaris*|*freebsd*) | ||
693 | 27 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ | ||
694 | 28 | CPPFLAGS="${CPPFLAGS} -I/usr/local/include" | ||
695 | 29 | ]) | ||
696 | 30 | |||
697 | 31 | AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ | ||
698 | 32 | LDFLAGS="${LDFLAGS} -L/usr/local/lib" | ||
699 | 33 | ]) | ||
700 | 34 | ;; | ||
701 | 35 | esac | ||
702 | 36 | |||
703 | 37 | case "$target_os" in | ||
704 | 38 | *linux*) | ||
705 | 39 | TARGET_LINUX="true" | ||
706 | 40 | AC_SUBST(TARGET_LINUX) | ||
707 | 41 | AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) | ||
708 | 42 | ;; | ||
709 | 43 | *darwin*) | ||
710 | 44 | TARGET_OSX="true" | ||
711 | 45 | AC_SUBST(TARGET_OSX) | ||
712 | 46 | AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX]) | ||
713 | 47 | ;; | ||
714 | 48 | *solaris*) | ||
715 | 49 | TARGET_SOLARIS="true" | ||
716 | 50 | AC_SUBST(TARGET_SOLARIS) | ||
717 | 51 | AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris]) | ||
718 | 52 | ;; | ||
719 | 53 | *freebsd*) | ||
720 | 54 | TARGET_FREEBSD="true" | ||
721 | 55 | AC_SUBST(TARGET_FREEBSD) | ||
722 | 56 | AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD]) | ||
723 | 57 | AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers]) | ||
724 | 58 | ;; | ||
725 | 59 | *) | ||
726 | 60 | ;; | ||
727 | 61 | esac | ||
728 | 62 | |||
729 | 63 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) | ||
730 | 64 | AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"]) | ||
731 | 65 | |||
732 | 66 | AS_IF([test "$INTELCC" = "yes"], [enable_rpath=no]) | ||
733 | 67 | |||
734 | 68 | dnl By default, Sun Studio grabs special versions of limits.h and string.h | ||
735 | 69 | dnl when you use <cstring> and <climits>. By setting this define, we can | ||
736 | 70 | dnl disable that and cause those to wrap the standard headers instead. | ||
737 | 71 | dnl http://www.stlport.com/doc/configure.html | ||
738 | 72 | AS_IF([test "$SUNCC" = "yes"],[ | ||
739 | 73 | AC_DEFINE([_STLP_NO_NEW_C_HEADERS],[1], | ||
740 | 74 | [Cause Sun Studio to not be quite so strict with standards conflicts]) | ||
741 | 75 | ]) | ||
742 | 76 | |||
743 | 77 | ]) | ||
744 | 0 | 78 | ||
745 | === added file 'm4/pandora_plugins.m4' | |||
746 | --- m4/pandora_plugins.m4 1970-01-01 00:00:00 +0000 | |||
747 | +++ m4/pandora_plugins.m4 2009-09-16 09:02:26 +0000 | |||
748 | @@ -0,0 +1,41 @@ | |||
749 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
750 | 2 | dnl This file is free software; Sun Microsystems | ||
751 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
752 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
753 | 5 | dnl-------------------------------------------------------------------- | ||
754 | 6 | dnl PANDORA_PLUGINS | ||
755 | 7 | dnl Declare our plugin modules | ||
756 | 8 | dnl-------------------------------------------------------------------- | ||
757 | 9 | |||
758 | 10 | AC_DEFUN([PANDORA_PLUGINS],[ | ||
759 | 11 | |||
760 | 12 | m4_sinclude(config/plugin.ac) | ||
761 | 13 | dnl Add code here to read set plugin lists and set drizzled_default_plugin_list | ||
762 | 14 | AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list], | ||
763 | 15 | [List of plugins that should be loaded on startup if no | ||
764 | 16 | value is given for --plugin-load]) | ||
765 | 17 | |||
766 | 18 | pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'` | ||
767 | 19 | AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL") | ||
768 | 20 | AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list]) | ||
769 | 21 | m4_ifblank($1,[ | ||
770 | 22 | AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list], | ||
771 | 23 | [List of plugins to be built in]) | ||
772 | 24 | ],[ | ||
773 | 25 | AC_CONFIG_FILES($*) | ||
774 | 26 | ]) | ||
775 | 27 | |||
776 | 28 | |||
777 | 29 | AC_SUBST(pandora_plugin_test_list) | ||
778 | 30 | AC_SUBST(pandora_plugin_libs) | ||
779 | 31 | |||
780 | 32 | pandora_plugin_defs=`echo $pandora_plugin_defs | sed 's/, *$//'` | ||
781 | 33 | AC_SUBST(pandora_plugin_defs) | ||
782 | 34 | |||
783 | 35 | AC_SUBST(PANDORA_PLUGIN_DEP_LIBS) | ||
784 | 36 | AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin") | ||
785 | 37 | ]) | ||
786 | 38 | |||
787 | 39 | AC_DEFUN([PANDORA_ADD_PLUGIN_DEP_LIB],[ | ||
788 | 40 | PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} $*" | ||
789 | 41 | ]) | ||
790 | 0 | 42 | ||
791 | === added file 'm4/pandora_pthread.m4' | |||
792 | --- m4/pandora_pthread.m4 1970-01-01 00:00:00 +0000 | |||
793 | +++ m4/pandora_pthread.m4 2009-09-16 09:02:26 +0000 | |||
794 | @@ -0,0 +1,78 @@ | |||
795 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
796 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
797 | 3 | dnl | ||
798 | 4 | dnl pandora-build: A pedantic build system | ||
799 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
800 | 6 | dnl This file is free software; the Free Software Foundation | ||
801 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
802 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
803 | 9 | dnl | ||
804 | 10 | dnl From Monty Taylor | ||
805 | 11 | |||
806 | 12 | |||
807 | 13 | dnl -------------------------------------------------------------------- | ||
808 | 14 | dnl Check for libpthread | ||
809 | 15 | dnl -------------------------------------------------------------------- | ||
810 | 16 | |||
811 | 17 | AC_DEFUN([PANDORA_PTHREAD_YIELD],[ | ||
812 | 18 | AC_REQUIRE([ACX_PTHREAD]) | ||
813 | 19 | |||
814 | 20 | save_CFLAGS="${CFLAGS}" | ||
815 | 21 | save_CXXFLAGS="${CXXFLAGS}" | ||
816 | 22 | CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}" | ||
817 | 23 | CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}" | ||
818 | 24 | dnl Some OSes like Mac OS X have that as a replacement for pthread_yield() | ||
819 | 25 | AC_CHECK_FUNCS(pthread_yield_np) | ||
820 | 26 | AC_CACHE_CHECK([if pthread_yield takes zero arguments], | ||
821 | 27 | [pandora_cv_pthread_yield_zero_arg], | ||
822 | 28 | [AC_LINK_IFELSE([ | ||
823 | 29 | AC_LANG_PROGRAM([[ | ||
824 | 30 | #include <pthread.h> | ||
825 | 31 | ]],[[ | ||
826 | 32 | pthread_yield(); | ||
827 | 33 | ]])], | ||
828 | 34 | [pandora_cv_pthread_yield_zero_arg=yes], | ||
829 | 35 | [pandora_cv_pthread_yield_zero_arg=no])]) | ||
830 | 36 | AS_IF([test "$pandora_cv_pthread_yield_zero_arg" = "yes"],[ | ||
831 | 37 | AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1], | ||
832 | 38 | [pthread_yield that doesn't take any arguments]) | ||
833 | 39 | ]) | ||
834 | 40 | |||
835 | 41 | AC_CACHE_CHECK([if pthread_yield takes one argument], | ||
836 | 42 | [pandora_cv_pthread_yield_one_arg], | ||
837 | 43 | [AC_LINK_IFELSE([ | ||
838 | 44 | AC_LANG_PROGRAM([[ | ||
839 | 45 | #include <pthread.h> | ||
840 | 46 | ]],[[ | ||
841 | 47 | pthread_yield(0); | ||
842 | 48 | ]])], | ||
843 | 49 | [pandora_cv_pthread_yield_one_arg=yes], | ||
844 | 50 | [pandora_cv_pthread_yield_one_arg=no])]) | ||
845 | 51 | AS_IF([test "$pandora_cv_pthread_yield_one_arg" = "yes"],[ | ||
846 | 52 | AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1], | ||
847 | 53 | [pthread_yield function with one argument]) | ||
848 | 54 | ]) | ||
849 | 55 | |||
850 | 56 | CFLAGS="${save_CFLAGS}" | ||
851 | 57 | CXXFLAGS="${save_CXXFLAGS}" | ||
852 | 58 | ]) | ||
853 | 59 | |||
854 | 60 | |||
855 | 61 | AC_DEFUN([_PANDORA_SEARCH_PTHREAD],[ | ||
856 | 62 | AC_REQUIRE([ACX_PTHREAD]) | ||
857 | 63 | LIBS="${PTHREAD_LIBS} ${LIBS}" | ||
858 | 64 | AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}" | ||
859 | 65 | AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}" | ||
860 | 66 | PANDORA_PTHREAD_YIELD | ||
861 | 67 | ]) | ||
862 | 68 | |||
863 | 69 | |||
864 | 70 | AC_DEFUN([PANDORA_HAVE_PTHREAD],[ | ||
865 | 71 | AC_REQUIRE([_PANDORA_SEARCH_PTHREAD]) | ||
866 | 72 | ]) | ||
867 | 73 | |||
868 | 74 | AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[ | ||
869 | 75 | AC_REQUIRE([PANDORA_HAVE_PTHREAD]) | ||
870 | 76 | AS_IF([test "x$acx_pthread_ok" != "xyes"],[ | ||
871 | 77 | AC_MSG_ERROR(could not find libpthread)]) | ||
872 | 78 | ]) | ||
873 | 0 | 79 | ||
874 | === added file 'm4/pandora_python3_devel.m4' | |||
875 | --- m4/pandora_python3_devel.m4 1970-01-01 00:00:00 +0000 | |||
876 | +++ m4/pandora_python3_devel.m4 2009-09-16 09:02:26 +0000 | |||
877 | @@ -0,0 +1,236 @@ | |||
878 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
879 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
880 | 3 | dnl | ||
881 | 4 | dnl pandora-build: A pedantic build system | ||
882 | 5 | dnl | ||
883 | 6 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
884 | 7 | dnl Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de> | ||
885 | 8 | dnl Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca> | ||
886 | 9 | dnl Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net> | ||
887 | 10 | dnl Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za> | ||
888 | 11 | dnl Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org> | ||
889 | 12 | dnl Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org> | ||
890 | 13 | dnl | ||
891 | 14 | dnl This program is free software: you can redistribute it and/or modify it | ||
892 | 15 | dnl under the terms of the GNU General Public License as published by the | ||
893 | 16 | dnl Free Software Foundation, either version 3 of the License, or (at your | ||
894 | 17 | dnl option) any later version. | ||
895 | 18 | dnl | ||
896 | 19 | dnl This program is distributed in the hope that it will be useful, but | ||
897 | 20 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of | ||
898 | 21 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
899 | 22 | dnl Public License for more details. | ||
900 | 23 | dnl | ||
901 | 24 | dnl You should have received a copy of the GNU General Public License along | ||
902 | 25 | dnl with this program. If not, see <http://www.gnu.org/licenses/>. | ||
903 | 26 | dnl | ||
904 | 27 | dnl As a special exception, the respective Autoconf Macro's copyright owner | ||
905 | 28 | dnl gives unlimited permission to copy, distribute and modify the configure | ||
906 | 29 | dnl scripts that are the output of Autoconf when processing the Macro. You | ||
907 | 30 | dnl need not follow the terms of the GNU General Public License when using | ||
908 | 31 | dnl or distributing such scripts, even though portions of the text of the | ||
909 | 32 | dnl Macro appear in them. The GNU General Public License (GPL) does govern | ||
910 | 33 | dnl all other use of the material that constitutes the Autoconf Macro. | ||
911 | 34 | dnl | ||
912 | 35 | dnl This special exception to the GPL applies to versions of the Autoconf | ||
913 | 36 | dnl Macro released by the Autoconf Macro Archive. When you make and | ||
914 | 37 | dnl distribute a modified version of the Autoconf Macro, you may extend this | ||
915 | 38 | dnl special exception to the GPL to apply to your modified version as well. | ||
916 | 39 | |||
917 | 40 | dnl SYNOPSIS | ||
918 | 41 | dnl | ||
919 | 42 | dnl PANDORA_PYTHON3_DEVEL([version]) | ||
920 | 43 | dnl | ||
921 | 44 | dnl DESCRIPTION | ||
922 | 45 | dnl | ||
923 | 46 | dnl Note: Defines as a precious variable "PYTHON3_VERSION". Don't override it | ||
924 | 47 | dnl in your configure.ac. | ||
925 | 48 | dnl | ||
926 | 49 | dnl This macro checks for Python and tries to get the include path to | ||
927 | 50 | dnl 'Python.h'. It provides the $(PYTHON3_CPPFLAGS) and $(PYTHON3_LDFLAGS) | ||
928 | 51 | dnl output variables. It also exports $(PYTHON3_EXTRA_LIBS) and | ||
929 | 52 | dnl $(PYTHON3_EXTRA_LDFLAGS) for embedding Python in your code. | ||
930 | 53 | dnl | ||
931 | 54 | dnl You can search for some particular version of Python by passing a | ||
932 | 55 | dnl parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please | ||
933 | 56 | dnl note that you *have* to pass also an operator along with the version to | ||
934 | 57 | dnl match, and pay special attention to the single quotes surrounding the | ||
935 | 58 | dnl version number. Don't use "PYTHON3_VERSION" for this: that environment | ||
936 | 59 | dnl variable is declared as precious and thus reserved for the end-user. | ||
937 | 60 | dnl | ||
938 | 61 | dnl LAST MODIFICATION | ||
939 | 62 | dnl | ||
940 | 63 | dnl 2009-08-23 | ||
941 | 64 | |||
942 | 65 | AC_DEFUN([PANDORA_PYTHON3_DEVEL],[ | ||
943 | 66 | # | ||
944 | 67 | # Allow the use of a (user set) custom python version | ||
945 | 68 | # | ||
946 | 69 | AC_ARG_VAR([PYTHON3_VERSION],[The installed Python | ||
947 | 70 | version to use, for example '3.0'. This string | ||
948 | 71 | will be appended to the Python interpreter | ||
949 | 72 | canonical name.]) | ||
950 | 73 | |||
951 | 74 | |||
952 | 75 | AS_IF([test -z "$PYTHON3"],[ | ||
953 | 76 | AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]]) | ||
954 | 77 | ]) | ||
955 | 78 | AS_IF([test -z "$PYTHON3"],[ | ||
956 | 79 | AC_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path]) | ||
957 | 80 | PYTHON3_VERSION="" | ||
958 | 81 | ]) | ||
959 | 82 | |||
960 | 83 | # | ||
961 | 84 | # if the macro parameter ``version'' is set, honour it | ||
962 | 85 | # | ||
963 | 86 | if test -n "$1"; then | ||
964 | 87 | AC_MSG_CHECKING([for a version of Python $1]) | ||
965 | 88 | ac_supports_python3_ver=`$PYTHON3 -c "import sys, string; \ | ||
966 | 89 | ver = string.split(sys.version)[[0]]; \ | ||
967 | 90 | print(ver $1)"` | ||
968 | 91 | if test "$ac_supports_python3_ver" = "True"; then | ||
969 | 92 | AC_MSG_RESULT([yes]) | ||
970 | 93 | else | ||
971 | 94 | AC_MSG_RESULT([no]) | ||
972 | 95 | AC_MSG_ERROR([this package requires Python $1. | ||
973 | 96 | If you have it installed, but it isn't the default Python | ||
974 | 97 | interpreter in your system path, please pass the PYTHON3_VERSION | ||
975 | 98 | variable to configure. See ``configure --help'' for reference. | ||
976 | 99 | ]) | ||
977 | 100 | PYTHON_VERSION="" | ||
978 | 101 | fi | ||
979 | 102 | fi | ||
980 | 103 | |||
981 | 104 | # | ||
982 | 105 | # Check if you have distutils, else fail | ||
983 | 106 | # | ||
984 | 107 | AC_MSG_CHECKING([for Python3 distutils package]) | ||
985 | 108 | ac_python3_distutils_result=`$PYTHON3 -c "import distutils" 2>&1` | ||
986 | 109 | if test -z "$ac_python3_distutils_result"; then | ||
987 | 110 | AC_MSG_RESULT([yes]) | ||
988 | 111 | else | ||
989 | 112 | AC_MSG_RESULT([no]) | ||
990 | 113 | AC_MSG_ERROR([cannot import Python3 module "distutils". | ||
991 | 114 | Please check your Python3 installation. The error was: | ||
992 | 115 | $ac_python3_distutils_result]) | ||
993 | 116 | PYTHON3_VERSION="" | ||
994 | 117 | fi | ||
995 | 118 | |||
996 | 119 | # | ||
997 | 120 | # Check for Python include path | ||
998 | 121 | # | ||
999 | 122 | AC_MSG_CHECKING([for Python3 include path]) | ||
1000 | 123 | if test -z "$PYTHON3_CPPFLAGS"; then | ||
1001 | 124 | python3_path=`$PYTHON3 -c "import distutils.sysconfig; \ | ||
1002 | 125 | print(distutils.sysconfig.get_python_inc());"` | ||
1003 | 126 | if test -n "${python3_path}"; then | ||
1004 | 127 | python3_path="-I$python3_path" | ||
1005 | 128 | fi | ||
1006 | 129 | PYTHON3_CPPFLAGS=$python3_path | ||
1007 | 130 | fi | ||
1008 | 131 | AC_MSG_RESULT([$PYTHON3_CPPFLAGS]) | ||
1009 | 132 | AC_SUBST([PYTHON3_CPPFLAGS]) | ||
1010 | 133 | |||
1011 | 134 | # | ||
1012 | 135 | # Check for Python library path | ||
1013 | 136 | # | ||
1014 | 137 | AC_MSG_CHECKING([for Python3 library path]) | ||
1015 | 138 | if test -z "$PYTHON3_LDFLAGS"; then | ||
1016 | 139 | # (makes two attempts to ensure we've got a version number | ||
1017 | 140 | # from the interpreter) | ||
1018 | 141 | py3_version=`$PYTHON3 -c "from distutils.sysconfig import *; \ | ||
1019 | 142 | print(' '.join(get_config_vars('VERSION')))"` | ||
1020 | 143 | if test "$py3_version" == "[None]"; then | ||
1021 | 144 | if test -n "$PYTHON3_VERSION"; then | ||
1022 | 145 | py3_version=$PYTHON3_VERSION | ||
1023 | 146 | else | ||
1024 | 147 | py3_version=`$PYTHON3 -c "import sys; \ | ||
1025 | 148 | print(sys.version[[:3]])"` | ||
1026 | 149 | fi | ||
1027 | 150 | fi | ||
1028 | 151 | |||
1029 | 152 | PYTHON3_LDFLAGS=`$PYTHON3 -c "from distutils.sysconfig import *; \ | ||
1030 | 153 | print('-L' + get_python_lib(0,1), \ | ||
1031 | 154 | '-lpython');"`$py3_version | ||
1032 | 155 | fi | ||
1033 | 156 | AC_MSG_RESULT([$PYTHON3_LDFLAGS]) | ||
1034 | 157 | AC_SUBST([PYTHON3_LDFLAGS]) | ||
1035 | 158 | |||
1036 | 159 | # | ||
1037 | 160 | # Check for site packages | ||
1038 | 161 | # | ||
1039 | 162 | AC_MSG_CHECKING([for Python3 site-packages path]) | ||
1040 | 163 | if test -z "$PYTHON3_SITE_PKG"; then | ||
1041 | 164 | PYTHON3_SITE_PKG=`$PYTHON3 -c "import distutils.sysconfig; \ | ||
1042 | 165 | print(distutils.sysconfig.get_python_lib(0,0));"` | ||
1043 | 166 | fi | ||
1044 | 167 | AC_MSG_RESULT([$PYTHON3_SITE_PKG]) | ||
1045 | 168 | AC_SUBST([PYTHON3_SITE_PKG]) | ||
1046 | 169 | |||
1047 | 170 | # | ||
1048 | 171 | # libraries which must be linked in when embedding | ||
1049 | 172 | # | ||
1050 | 173 | AC_MSG_CHECKING(for Python3 embedding libraries) | ||
1051 | 174 | if test -z "$PYTHON3_EMBED_LIBS"; then | ||
1052 | 175 | PYTHON3_EMBED_LIBS=`$PYTHON3 -c "import distutils.sysconfig; \ | ||
1053 | 176 | conf = distutils.sysconfig.get_config_var; \ | ||
1054 | 177 | print(conf('LOCALMODLIBS'), conf('LIBS'))"` | ||
1055 | 178 | fi | ||
1056 | 179 | AC_MSG_RESULT([$PYTHON3_EMBED_LIBS]) | ||
1057 | 180 | AC_SUBST(PYTHON3_EMBED_LIBS) | ||
1058 | 181 | |||
1059 | 182 | # | ||
1060 | 183 | # linking flags needed when embedding | ||
1061 | 184 | # | ||
1062 | 185 | AC_MSG_CHECKING(for Python3 embedding linking flags) | ||
1063 | 186 | if test -z "$PYTHON3_EMBED_LDFLAGS"; then | ||
1064 | 187 | PYTHON3_EMBED_LDFLAGS=`$PYTHON3 -c "import distutils.sysconfig; \ | ||
1065 | 188 | conf = distutils.sysconfig.get_config_var; \ | ||
1066 | 189 | print(conf('LINKFORSHARED'))"` | ||
1067 | 190 | fi | ||
1068 | 191 | AC_MSG_RESULT([$PYTHON3_EMBED_LDFLAGS]) | ||
1069 | 192 | AC_SUBST(PYTHON3_EMBED_LDFLAGS) | ||
1070 | 193 | |||
1071 | 194 | # | ||
1072 | 195 | # final check to see if everything compiles alright | ||
1073 | 196 | # | ||
1074 | 197 | AC_MSG_CHECKING([for Python3 development environment consistency]) | ||
1075 | 198 | AC_LANG_PUSH([C]) | ||
1076 | 199 | # save current global flags | ||
1077 | 200 | ac_save_LIBS="$LIBS" | ||
1078 | 201 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
1079 | 202 | LIBS="$ac_save_LIBS $PYTHON3_LDFLAGS" | ||
1080 | 203 | CPPFLAGS="$ac_save_CPPFLAGS $PYTHON3_CPPFLAGS" | ||
1081 | 204 | AC_TRY_LINK([ | ||
1082 | 205 | #include <Python.h> | ||
1083 | 206 | ],[ | ||
1084 | 207 | Py_Initialize(); | ||
1085 | 208 | ],[python3exists=yes],[python3exists=no]) | ||
1086 | 209 | |||
1087 | 210 | AC_MSG_RESULT([$python3exists]) | ||
1088 | 211 | |||
1089 | 212 | if test ! "$python3exists" = "yes"; then | ||
1090 | 213 | AC_MSG_WARN([ | ||
1091 | 214 | Could not link test program to Python3. | ||
1092 | 215 | Maybe the main Python3 library has been installed in some non-standard | ||
1093 | 216 | library path. If so, pass it to configure, via the LDFLAGS environment | ||
1094 | 217 | variable. | ||
1095 | 218 | Example: ./configure LDFLAGS="-L/usr/non-standard-path/python3/lib" | ||
1096 | 219 | ============================================================================ | ||
1097 | 220 | ERROR! | ||
1098 | 221 | You probably have to install the development version of the Python3 package | ||
1099 | 222 | for your distribution. The exact name of this package varies among them. | ||
1100 | 223 | ============================================================================ | ||
1101 | 224 | ]) | ||
1102 | 225 | PYTHON3_VERSION="" | ||
1103 | 226 | fi | ||
1104 | 227 | AC_LANG_POP | ||
1105 | 228 | # turn back to default flags | ||
1106 | 229 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
1107 | 230 | LIBS="$ac_save_LIBS" | ||
1108 | 231 | |||
1109 | 232 | # | ||
1110 | 233 | # all done! | ||
1111 | 234 | # | ||
1112 | 235 | ]) | ||
1113 | 236 | |||
1114 | 0 | 237 | ||
1115 | === added file 'm4/pandora_swig.m4' | |||
1116 | --- m4/pandora_swig.m4 1970-01-01 00:00:00 +0000 | |||
1117 | +++ m4/pandora_swig.m4 2009-09-16 09:02:26 +0000 | |||
1118 | @@ -0,0 +1,39 @@ | |||
1119 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1120 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1121 | 3 | dnl | ||
1122 | 4 | dnl pandora-build: A pedantic build system | ||
1123 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1124 | 6 | dnl This file is free software; the Free Software Foundation | ||
1125 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1126 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1127 | 9 | dnl | ||
1128 | 10 | dnl From Monty Taylor | ||
1129 | 11 | |||
1130 | 12 | AC_DEFUN([PANDORA_SWIG],[ | ||
1131 | 13 | |||
1132 | 14 | AC_PROG_SWIG(1.3.31) | ||
1133 | 15 | |||
1134 | 16 | AC_DEFINE_UNQUOTED([SWIG_TYPE_TABLE], | ||
1135 | 17 | [$PACKAGE], | ||
1136 | 18 | [Type Table name for SWIG symbol table]) | ||
1137 | 19 | |||
1138 | 20 | dnl Have to hard-code /usr/local/include and /usr/include into the path. | ||
1139 | 21 | dnl I hate this. Why is swig sucking me | ||
1140 | 22 | SWIG="$SWIG \${DEFS} -I\${top_srcdir} -I\${top_builddir} -I/usr/local/include -I/usr/include" | ||
1141 | 23 | AC_SUBST([SWIG]) | ||
1142 | 24 | |||
1143 | 25 | |||
1144 | 26 | ]) | ||
1145 | 27 | |||
1146 | 28 | AC_DEFUN([PANDORA_SWIG_PYTHON3],[ | ||
1147 | 29 | AC_REQUIRE([PANDORA_SWIG]) | ||
1148 | 30 | AS_IF([test "x$SWIG" != "x"],[ | ||
1149 | 31 | AC_CACHE_CHECK([if swig supports Python3], | ||
1150 | 32 | [ac_cv_swig_has_python3_], | ||
1151 | 33 | [ | ||
1152 | 34 | AS_IF([$SWIG -python -help 2>&1 | grep py3 > /dev/null], | ||
1153 | 35 | [ac_cv_swig_has_python3_=yes], | ||
1154 | 36 | [ac_cv_swig_has_python3_=no]) | ||
1155 | 37 | ]) | ||
1156 | 38 | ]) | ||
1157 | 39 | ]) | ||
1158 | 0 | 40 | ||
1159 | === added file 'm4/pandora_use_pipe.m4' | |||
1160 | --- m4/pandora_use_pipe.m4 1970-01-01 00:00:00 +0000 | |||
1161 | +++ m4/pandora_use_pipe.m4 2009-08-10 21:04:49 +0000 | |||
1162 | @@ -0,0 +1,36 @@ | |||
1163 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1164 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1165 | 3 | dnl | ||
1166 | 4 | dnl pandora-build: A pedantic build system | ||
1167 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1168 | 6 | dnl This file is free software; the Free Software Foundation | ||
1169 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1170 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1171 | 9 | dnl | ||
1172 | 10 | dnl From Monty Taylor | ||
1173 | 11 | dnl | ||
1174 | 12 | dnl Test if we can Use -pipe to avoid making temp files during the compile. | ||
1175 | 13 | dnl Should speed up compile on slower disks | ||
1176 | 14 | |||
1177 | 15 | AC_DEFUN([PANDORA_USE_PIPE],[ | ||
1178 | 16 | |||
1179 | 17 | AS_IF([test "$GCC" = "yes"],[ | ||
1180 | 18 | AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [ | ||
1181 | 19 | AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
1182 | 20 | #include <stdio.h> | ||
1183 | 21 | |||
1184 | 22 | int main(int argc, char** argv) | ||
1185 | 23 | { | ||
1186 | 24 | (void) argc; (void) argv; | ||
1187 | 25 | return 0; | ||
1188 | 26 | } | ||
1189 | 27 | ]])], | ||
1190 | 28 | [pandora_cv_use_pipe=yes], | ||
1191 | 29 | [pandora_cv_use_pipe=no]) | ||
1192 | 30 | ]) | ||
1193 | 31 | AS_IF([test "$pandora_cv_use_pipe" = "yes"],[ | ||
1194 | 32 | AM_CFLAGS="-pipe ${AM_CFLAGS}" | ||
1195 | 33 | AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}" | ||
1196 | 34 | ]) | ||
1197 | 35 | ]) | ||
1198 | 36 | ]) | ||
1199 | 0 | 37 | ||
1200 | === modified file 'm4/pandora_vc_build.m4' | |||
1201 | --- m4/pandora_vc_build.m4 2009-07-08 07:37:38 +0000 | |||
1202 | +++ m4/pandora_vc_build.m4 2009-09-16 09:02:26 +0000 | |||
1203 | @@ -28,5 +28,30 @@ | |||
1204 | 28 | ac_cv_building_from_hg=no | 28 | ac_cv_building_from_hg=no |
1205 | 29 | ]) | 29 | ]) |
1206 | 30 | 30 | ||
1207 | 31 | AS_IF([test -d "${srcdir}/.git"],[ | ||
1208 | 32 | ac_cv_building_from_git=yes | ||
1209 | 33 | ac_cv_building_from_vc=yes | ||
1210 | 34 | ],[ | ||
1211 | 35 | ac_cv_building_from_git=no | ||
1212 | 36 | ]) | ||
1213 | 37 | |||
1214 | 38 | |||
1215 | 31 | ]) | 39 | ]) |
1216 | 32 | 40 | ||
1217 | 41 | dnl Takes one argument which is the prefix to append | ||
1218 | 42 | AC_DEFUN([PANDORA_EXPORT_BZR_INFO],[ | ||
1219 | 43 | m4_ifnblank($1,[ | ||
1220 | 44 | m4_define([PEBI_PREFIX],m4_toupper(m4_normalize($1))[_]) | ||
1221 | 45 | ],[ | ||
1222 | 46 | m4_define([PEBI_PREFIX],[]) | ||
1223 | 47 | ]) | ||
1224 | 48 | |||
1225 | 49 | AC_DEFINE(PEBI_PREFIX[BZR_REVID], ["BZR_REVID"], [bzr revision ID]) | ||
1226 | 50 | AC_DEFINE(PEBI_PREFIX[BZR_BRANCH], ["BZR_BRANCH"], [bzr branch name]) | ||
1227 | 51 | AC_DEFINE(PEBI_PREFIX[RELEASE_DATE], ["RELEASE_DATE"], [Release date based on the date of the repo checkout]) | ||
1228 | 52 | AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display]) | ||
1229 | 53 | AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch]) | ||
1230 | 54 | AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison]) | ||
1231 | 55 | |||
1232 | 56 | ]) | ||
1233 | 57 | |||
1234 | 33 | 58 | ||
1235 | === modified file 'm4/pandora_warnings.m4' | |||
1236 | --- m4/pandora_warnings.m4 2009-07-16 02:28:54 +0000 | |||
1237 | +++ m4/pandora_warnings.m4 2009-08-10 21:04:49 +0000 | |||
1238 | @@ -206,7 +206,10 @@ | |||
1239 | 206 | [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) | 206 | [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) |
1240 | 207 | 207 | ||
1241 | 208 | NO_REDUNDANT_DECLS="-Wno-redundant-decls" | 208 | NO_REDUNDANT_DECLS="-Wno-redundant-decls" |
1243 | 209 | PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow" | 209 | dnl TODO: Figure out a better way to deal with this: |
1244 | 210 | PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces" | ||
1245 | 211 | NO_WERROR="-Wno-error" | ||
1246 | 212 | INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align" | ||
1247 | 210 | 213 | ||
1248 | 211 | ]) | 214 | ]) |
1249 | 212 | ]) | 215 | ]) |
1250 | @@ -247,8 +250,9 @@ | |||
1251 | 247 | 250 | ||
1252 | 248 | CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}" | 251 | CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}" |
1253 | 249 | CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}" | 252 | CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}" |
1255 | 250 | PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn" | 253 | PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn,partinit,notused,badargtype2w,wbadinit" |
1256 | 251 | NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED" | 254 | NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED" |
1257 | 255 | NO_WERROR="-errwarn=%none" | ||
1258 | 252 | 256 | ||
1259 | 253 | ]) | 257 | ]) |
1260 | 254 | 258 | ||
1261 | @@ -258,5 +262,7 @@ | |||
1262 | 258 | AC_SUBST(NO_SHADOW) | 262 | AC_SUBST(NO_SHADOW) |
1263 | 259 | AC_SUBST(NO_STRICT_ALIASING) | 263 | AC_SUBST(NO_STRICT_ALIASING) |
1264 | 260 | AC_SUBST(PROTOSKIP_WARNINGS) | 264 | AC_SUBST(PROTOSKIP_WARNINGS) |
1265 | 265 | AC_SUBST(INNOBASE_SKIP_WARNINGS) | ||
1266 | 266 | AC_SUBST(NO_WERROR) | ||
1267 | 261 | 267 | ||
1268 | 262 | ]) | 268 | ]) |
1269 | 263 | 269 | ||
1270 | === added file 'm4/pandora_with_lua.m4' | |||
1271 | --- m4/pandora_with_lua.m4 1970-01-01 00:00:00 +0000 | |||
1272 | +++ m4/pandora_with_lua.m4 2009-09-16 09:02:26 +0000 | |||
1273 | @@ -0,0 +1,55 @@ | |||
1274 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1275 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1276 | 3 | dnl | ||
1277 | 4 | dnl pandora-build: A pedantic build system | ||
1278 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1279 | 6 | dnl This file is free software; the Free Software Foundation | ||
1280 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1281 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1282 | 9 | dnl | ||
1283 | 10 | dnl From Monty Taylor | ||
1284 | 11 | |||
1285 | 12 | AC_DEFUN([PANDORA_WITH_LUA],[ | ||
1286 | 13 | dnl Check for lua | ||
1287 | 14 | AC_ARG_WITH([lua], | ||
1288 | 15 | [AS_HELP_STRING([--with-lua], | ||
1289 | 16 | [Build Lua Bindings @<:@default=yes@:>@])], | ||
1290 | 17 | [with_lua=$withval], | ||
1291 | 18 | [with_lua=yes]) | ||
1292 | 19 | |||
1293 | 20 | AS_IF([test "x$with_lua" != "xno"],[ | ||
1294 | 21 | AS_IF([test "x$with_lua" = "xyes"], | ||
1295 | 22 | [LUAPC=lua], | ||
1296 | 23 | [LUAPC=$with_lua]) | ||
1297 | 24 | |||
1298 | 25 | PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [ | ||
1299 | 26 | AC_DEFINE([HAVE_LUA], [1], [liblua]) | ||
1300 | 27 | AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) | ||
1301 | 28 | with_lua=yes | ||
1302 | 29 | ],[ | ||
1303 | 30 | LUAPC=lua5.1 | ||
1304 | 31 | PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [ | ||
1305 | 32 | AC_DEFINE([HAVE_LUA], [1], [liblua]) | ||
1306 | 33 | AC_DEFINE([HAVE_LUA_H], [1], [lua.h]) | ||
1307 | 34 | with_lua=yes | ||
1308 | 35 | ],[ | ||
1309 | 36 | AC_DEFINE([HAVE_LUA],["x"],["x"]) | ||
1310 | 37 | with_lua=no | ||
1311 | 38 | ]) | ||
1312 | 39 | ]) | ||
1313 | 40 | |||
1314 | 41 | AC_CACHE_CHECK([for LUA installation location],[pandora_cv_lua_archdir],[ | ||
1315 | 42 | AS_IF([test "$prefix" = "NONE"],[ | ||
1316 | 43 | pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${ac_default_prefix} --variable=INSTALL_CMOD ${LUAPC}` | ||
1317 | 44 | ],[ | ||
1318 | 45 | pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${LUAPC}` | ||
1319 | 46 | ]) | ||
1320 | 47 | ]) | ||
1321 | 48 | LUA_ARCHDIR="${pandora_cv_lua_archdir}" | ||
1322 | 49 | AC_SUBST(LUA_ARCHDIR) | ||
1323 | 50 | AC_SUBST(LUA_CFLAGS) | ||
1324 | 51 | AC_SUBST(LUA_LIBS) | ||
1325 | 52 | ]) | ||
1326 | 53 | AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes") | ||
1327 | 54 | |||
1328 | 55 | ]) | ||
1329 | 0 | 56 | ||
1330 | === added file 'm4/pandora_with_perl.m4' | |||
1331 | --- m4/pandora_with_perl.m4 1970-01-01 00:00:00 +0000 | |||
1332 | +++ m4/pandora_with_perl.m4 2009-09-16 09:02:26 +0000 | |||
1333 | @@ -0,0 +1,81 @@ | |||
1334 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1335 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1336 | 3 | dnl | ||
1337 | 4 | dnl pandora-build: A pedantic build system | ||
1338 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1339 | 6 | dnl This file is free software; the Free Software Foundation | ||
1340 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1341 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1342 | 9 | dnl | ||
1343 | 10 | dnl From Monty Taylor | ||
1344 | 11 | |||
1345 | 12 | |||
1346 | 13 | AC_DEFUN([PANDORA_WITH_PERL], [ | ||
1347 | 14 | |||
1348 | 15 | AC_ARG_WITH([perl], | ||
1349 | 16 | [AS_HELP_STRING([--with-perl], | ||
1350 | 17 | [Build Perl Bindings @<:@default=yes@:>@])], | ||
1351 | 18 | [with_perl=$withval], | ||
1352 | 19 | [with_perl=yes]) | ||
1353 | 20 | |||
1354 | 21 | AC_ARG_WITH([perl-arch], | ||
1355 | 22 | [AS_HELP_STRING([--with-perl-arch], | ||
1356 | 23 | [Install Perl bindings into system location @<:@default=no@:>@])], | ||
1357 | 24 | [with_perl_arch=$withval], | ||
1358 | 25 | [with_perl_arch=no]) | ||
1359 | 26 | |||
1360 | 27 | AS_IF([test "x$with_perl" != "xno"],[ | ||
1361 | 28 | AS_IF([test "x$with_perl" != "xyes"], | ||
1362 | 29 | [ac_chk_perl=$with_perl], | ||
1363 | 30 | [ac_chk_perl=perl]) | ||
1364 | 31 | AC_CHECK_PROGS(PERL,$ac_chk_perl) | ||
1365 | 32 | ]) | ||
1366 | 33 | AS_IF([test "x$PERL" != "x"],[ | ||
1367 | 34 | AC_CACHE_CHECK([for Perl include path],[pandora_cv_perl_include],[ | ||
1368 | 35 | pandora_cv_perl_include=`$PERL -MConfig -e 'print $Config{archlib};'` | ||
1369 | 36 | pandora_cv_perl_include="${pandora_cv_perl_include}/CORE" | ||
1370 | 37 | ]) | ||
1371 | 38 | AC_CACHE_CHECK([for Perl CPPFLAGS],[pandora_cv_perl_cppflags],[ | ||
1372 | 39 | pandora_cv_perl_cppflags=`$PERL -MConfig -e 'print $Config{cppflags};'` | ||
1373 | 40 | pandora_cv_perl_cppflags="${pandora_cv_perl_cppflags}" | ||
1374 | 41 | ]) | ||
1375 | 42 | PERL_CPPFLAGS="-I${pandora_cv_perl_include} ${pandora_cv_perl_cppflags}" | ||
1376 | 43 | |||
1377 | 44 | AC_CACHE_CHECK([for Perl development headers], | ||
1378 | 45 | [pandora_cv_perl_dev],[ | ||
1379 | 46 | |||
1380 | 47 | save_CPPFLAGS="${CPPFLAGS}" | ||
1381 | 48 | CPPFLAGS="${CPPFLAGS} ${PERL_CPPFLAGS}" | ||
1382 | 49 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
1383 | 50 | #include <math.h> | ||
1384 | 51 | #include <stdlib.h> | ||
1385 | 52 | #include "EXTERN.h" | ||
1386 | 53 | #include "perl.h" | ||
1387 | 54 | #include "XSUB.h" | ||
1388 | 55 | ]])], | ||
1389 | 56 | [pandora_cv_perl_dev=yes], | ||
1390 | 57 | [pandora_cv_perl_dev=no]) | ||
1391 | 58 | CPPFLAGS="${save_CPPFLAGS}" | ||
1392 | 59 | ]) | ||
1393 | 60 | |||
1394 | 61 | AS_IF([test "${pandora_cv_perl_dev}" = "no"], | ||
1395 | 62 | [with_perl=no]) | ||
1396 | 63 | |||
1397 | 64 | AC_CACHE_CHECK([for Perl install location], | ||
1398 | 65 | [pandora_cv_perl_archdir],[ | ||
1399 | 66 | AS_IF([test "${with_perl_arch}" = "no"],[ | ||
1400 | 67 | pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{sitearch}'` | ||
1401 | 68 | ],[ | ||
1402 | 69 | pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{archlib}'` | ||
1403 | 70 | ]) | ||
1404 | 71 | pandora_cv_perl_archdir="${pandora_cv_perl_archdir}" | ||
1405 | 72 | ]) | ||
1406 | 73 | |||
1407 | 74 | PERL_ARCHDIR="${pandora_cv_perl_archdir}" | ||
1408 | 75 | ]) | ||
1409 | 76 | AC_SUBST([PERL_CPPFLAGS]) | ||
1410 | 77 | AC_SUBST([PERL_ARCHDIR]) | ||
1411 | 78 | |||
1412 | 79 | AM_CONDITIONAL(BUILD_PERL, [test "$with_perl" != "no"]) | ||
1413 | 80 | |||
1414 | 81 | ]) | ||
1415 | 0 | 82 | ||
1416 | === added file 'm4/pandora_with_php.m4' | |||
1417 | --- m4/pandora_with_php.m4 1970-01-01 00:00:00 +0000 | |||
1418 | +++ m4/pandora_with_php.m4 2009-08-10 21:04:49 +0000 | |||
1419 | @@ -0,0 +1,56 @@ | |||
1420 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1421 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1422 | 3 | dnl | ||
1423 | 4 | dnl pandora-build: A pedantic build system | ||
1424 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1425 | 6 | dnl This file is free software; the Free Software Foundation | ||
1426 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1427 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1428 | 9 | dnl | ||
1429 | 10 | dnl From Monty Taylor | ||
1430 | 11 | |||
1431 | 12 | |||
1432 | 13 | AC_DEFUN([PANDORA_WITH_PHP],[ | ||
1433 | 14 | |||
1434 | 15 | AC_ARG_WITH([php], | ||
1435 | 16 | [AS_HELP_STRING([--with-php], | ||
1436 | 17 | [Build NDB/PHP @<:@default=no@:>@])], | ||
1437 | 18 | [with_php=$withval], | ||
1438 | 19 | [with_php=no]) | ||
1439 | 20 | |||
1440 | 21 | AS_IF([test "x$with_php" != "xno"],[ | ||
1441 | 22 | dnl We explicitly requested PHP build. Fail on too-young SWIG. | ||
1442 | 23 | AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"], | ||
1443 | 24 | [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")]) | ||
1444 | 25 | AS_IF([test "x$with_php" != "xyes"], | ||
1445 | 26 | [ac_check_php_config=$with_php], | ||
1446 | 27 | [ac_check_php_config="php-config php-config5"]) | ||
1447 | 28 | AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config]) | ||
1448 | 29 | ]) | ||
1449 | 30 | |||
1450 | 31 | AS_IF([test "x$PHP_CONFIG" != "x"],[ | ||
1451 | 32 | PHP_CFLAGS=`$PHP_CONFIG --includes` | ||
1452 | 33 | PHP_CPPFLAGS=`$PHP_CONFIG --includes` | ||
1453 | 34 | PHP_LDFLAGS=`$PHP_CONFIG --ldflags` | ||
1454 | 35 | PHP_EXTDIR=`$PHP_CONFIG --extension-dir` | ||
1455 | 36 | strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'` | ||
1456 | 37 | PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"` | ||
1457 | 38 | ],[ | ||
1458 | 39 | PHP_CFLAGS= | ||
1459 | 40 | PHP_CPPFLAGS= | ||
1460 | 41 | PHP_LDFLAGS= | ||
1461 | 42 | PHP_EXTDIR= | ||
1462 | 43 | PHP_ARCH_DIR= | ||
1463 | 44 | with_php=no | ||
1464 | 45 | ]) | ||
1465 | 46 | |||
1466 | 47 | AC_SUBST(PHP_CFLAGS) | ||
1467 | 48 | AC_SUBST(PHP_CPPFLAGS) | ||
1468 | 49 | AC_SUBST(PHP_LDFLAGS) | ||
1469 | 50 | AC_SUBST(PHP_EXTDIR) | ||
1470 | 51 | AC_SUBST(PHP_ARCH_DIR) | ||
1471 | 52 | |||
1472 | 53 | AM_CONDITIONAL(BUILD_PHP, test "$with_php" = "yes") | ||
1473 | 54 | |||
1474 | 55 | ]) | ||
1475 | 56 | |||
1476 | 0 | 57 | ||
1477 | === added file 'm4/pandora_with_python.m4' | |||
1478 | --- m4/pandora_with_python.m4 1970-01-01 00:00:00 +0000 | |||
1479 | +++ m4/pandora_with_python.m4 2009-08-10 21:04:49 +0000 | |||
1480 | @@ -0,0 +1,28 @@ | |||
1481 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1482 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1483 | 3 | dnl | ||
1484 | 4 | dnl pandora-build: A pedantic build system | ||
1485 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1486 | 6 | dnl This file is free software; the Free Software Foundation | ||
1487 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1488 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1489 | 9 | dnl | ||
1490 | 10 | dnl From Monty Taylor | ||
1491 | 11 | |||
1492 | 12 | |||
1493 | 13 | AC_DEFUN([PANDORA_WITH_PYTHON], [ | ||
1494 | 14 | |||
1495 | 15 | AC_ARG_WITH([python], | ||
1496 | 16 | [AS_HELP_STRING([--with-python], | ||
1497 | 17 | [Build Python Bindings @<:@default=yes@:>@])], | ||
1498 | 18 | [with_python=$withval], | ||
1499 | 19 | [with_python=yes]) | ||
1500 | 20 | |||
1501 | 21 | AS_IF([test "x$with_python" != "xno"],[ | ||
1502 | 22 | AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python]) | ||
1503 | 23 | AM_PATH_PYTHON([2.4],,[with_python="no"]) | ||
1504 | 24 | AC_PYTHON_DEVEL() | ||
1505 | 25 | AS_IF([test "x$pythonexists" = "xno"],[with_python="no"]) | ||
1506 | 26 | ]) | ||
1507 | 27 | AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"]) | ||
1508 | 28 | ]) | ||
1509 | 0 | 29 | ||
1510 | === added file 'm4/pandora_with_python3.m4' | |||
1511 | --- m4/pandora_with_python3.m4 1970-01-01 00:00:00 +0000 | |||
1512 | +++ m4/pandora_with_python3.m4 2009-09-16 09:02:26 +0000 | |||
1513 | @@ -0,0 +1,44 @@ | |||
1514 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1515 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1516 | 3 | dnl | ||
1517 | 4 | dnl pandora-build: A pedantic build system | ||
1518 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1519 | 6 | dnl This file is free software; the Free Software Foundation | ||
1520 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1521 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1522 | 9 | dnl | ||
1523 | 10 | dnl From Monty Taylor | ||
1524 | 11 | |||
1525 | 12 | AC_DEFUN([PANDORA_WITH_PYTHON3], [ | ||
1526 | 13 | |||
1527 | 14 | AC_REQUIRE([PANDORA_SWIG]) | ||
1528 | 15 | |||
1529 | 16 | AC_ARG_WITH([python3], | ||
1530 | 17 | [AS_HELP_STRING([--with-python3], | ||
1531 | 18 | [Build Python3 Bindings @<:@default=yes@:>@])],[ | ||
1532 | 19 | with_python3=$withval | ||
1533 | 20 | python3_requested=yes | ||
1534 | 21 | ],[ | ||
1535 | 22 | with_python3=yes | ||
1536 | 23 | python3_requested=no | ||
1537 | 24 | ]) | ||
1538 | 25 | |||
1539 | 26 | AS_IF([test "x$ac_cv_swig_has_python3_" != "xyes"],[ | ||
1540 | 27 | with_python3=no | ||
1541 | 28 | ],[ | ||
1542 | 29 | AS_IF([test "x$with_python3" != "xno"],[ | ||
1543 | 30 | AS_IF([test "x$with_python3" != "xyes"], | ||
1544 | 31 | [PYTHON3=$with_python3],[ | ||
1545 | 32 | AC_PATH_PROG([PYTHON3],[python3],[no]) | ||
1546 | 33 | PANDORA_PYTHON3_DEVEL() | ||
1547 | 34 | AS_IF([test "x$python3exists" = "xno"],[with_python="no"]) | ||
1548 | 35 | ]) | ||
1549 | 36 | ]) | ||
1550 | 37 | ]) | ||
1551 | 38 | AS_IF([test "x$with_python3" = "xno" -a "$python3_requested" = "yes"],[ | ||
1552 | 39 | AC_MSG_ERROR([Python3 support was explicity requested, but Python3 support | ||
1553 | 40 | was not found. Please correct your build environment and try | ||
1554 | 41 | again]) | ||
1555 | 42 | ]) | ||
1556 | 43 | AM_CONDITIONAL(BUILD_PYTHON3, [test "$with_python3" = "yes"]) | ||
1557 | 44 | ]) | ||
1558 | 0 | 45 | ||
1559 | === added file 'm4/pandora_with_r.m4' | |||
1560 | --- m4/pandora_with_r.m4 1970-01-01 00:00:00 +0000 | |||
1561 | +++ m4/pandora_with_r.m4 2009-08-10 21:04:49 +0000 | |||
1562 | @@ -0,0 +1,33 @@ | |||
1563 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1564 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1565 | 3 | dnl | ||
1566 | 4 | dnl pandora-build: A pedantic build system | ||
1567 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1568 | 6 | dnl This file is free software; the Free Software Foundation | ||
1569 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1570 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1571 | 9 | dnl | ||
1572 | 10 | dnl From Monty Taylor | ||
1573 | 11 | |||
1574 | 12 | AC_DEFUN([PANDORA_WITH_R],[ | ||
1575 | 13 | dnl Check for GNU R | ||
1576 | 14 | AC_ARG_WITH([r], | ||
1577 | 15 | [AS_HELP_STRING([--with-r], | ||
1578 | 16 | [Build R Bindings @<:@default=yes@:>@])], | ||
1579 | 17 | [with_r=$withval], | ||
1580 | 18 | [with_r=yes]) | ||
1581 | 19 | |||
1582 | 20 | AS_IF([test "x$with_r" != "xno"],[ | ||
1583 | 21 | |||
1584 | 22 | PKG_CHECK_MODULES([R], [libR], [ | ||
1585 | 23 | with_r=yes | ||
1586 | 24 | ],[ | ||
1587 | 25 | with_r=no | ||
1588 | 26 | ]) | ||
1589 | 27 | |||
1590 | 28 | AC_SUBST(R_CFLAGS) | ||
1591 | 29 | AC_SUBST(R_LIBS) | ||
1592 | 30 | ]) | ||
1593 | 31 | AM_CONDITIONAL(BUILD_R, test "$with_r" = "yes") | ||
1594 | 32 | |||
1595 | 33 | ]) | ||
1596 | 0 | 34 | ||
1597 | === added file 'm4/pandora_with_ruby.m4' | |||
1598 | --- m4/pandora_with_ruby.m4 1970-01-01 00:00:00 +0000 | |||
1599 | +++ m4/pandora_with_ruby.m4 2009-08-10 21:04:49 +0000 | |||
1600 | @@ -0,0 +1,79 @@ | |||
1601 | 1 | dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
1602 | 2 | dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
1603 | 3 | dnl | ||
1604 | 4 | dnl pandora-build: A pedantic build system | ||
1605 | 5 | dnl Copyright (C) 2009 Sun Microsystems, Inc. | ||
1606 | 6 | dnl This file is free software; the Free Software Foundation | ||
1607 | 7 | dnl gives unlimited permission to copy and/or distribute it, | ||
1608 | 8 | dnl with or without modifications, as long as this notice is preserved. | ||
1609 | 9 | dnl | ||
1610 | 10 | dnl From Monty Taylor | ||
1611 | 11 | |||
1612 | 12 | |||
1613 | 13 | AC_DEFUN([PANDORA_WITH_RUBY], [ | ||
1614 | 14 | |||
1615 | 15 | AC_ARG_WITH([ruby], | ||
1616 | 16 | [AS_HELP_STRING([--with-ruby], | ||
1617 | 17 | [Build Ruby Bindings @<:@default=yes@:>@])], | ||
1618 | 18 | [with_ruby=$withval], | ||
1619 | 19 | [with_ruby=ruby]) | ||
1620 | 20 | |||
1621 | 21 | AS_IF([test "x$with_ruby" != "xno"],[ | ||
1622 | 22 | AS_IF([test "x$with_ruby" != "xyes"], | ||
1623 | 23 | [ac_chk_ruby=$with_ruby], | ||
1624 | 24 | [ac_chk_ruby=ruby1.8 ruby]) | ||
1625 | 25 | AC_CHECK_PROGS(RUBY,$ac_chk_ruby) | ||
1626 | 26 | ]) | ||
1627 | 27 | |||
1628 | 28 | AS_IF([test "x$RUBY" != "x"],[ | ||
1629 | 29 | |||
1630 | 30 | AC_MSG_CHECKING(for ruby devel) | ||
1631 | 31 | |||
1632 | 32 | dnl need to change quotes to allow square brackets | ||
1633 | 33 | changequote(<<, >>)dnl | ||
1634 | 34 | ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"` | ||
1635 | 35 | strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed 's/\//./g'` | ||
1636 | 36 | |||
1637 | 37 | RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"` | ||
1638 | 38 | LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"` | ||
1639 | 39 | RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"` | ||
1640 | 40 | RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"` | ||
1641 | 41 | RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"` | ||
1642 | 42 | RUBY_INCLUDES="-I$ruby_prefix" | ||
1643 | 43 | changequote([, ])dnl | ||
1644 | 44 | |||
1645 | 45 | ac_save_CFLAGS="$CFLAGS" | ||
1646 | 46 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
1647 | 47 | ac_save_LDFLAGS="$LDFLAGS" | ||
1648 | 48 | CFLAGS="$ac_save_CFLAGS $RUBY_INCLUDES" | ||
1649 | 49 | CPPFLAGS="$ac_save_CPPFLAGS $RUBY_INCLUDES" | ||
1650 | 50 | LDFLAGS="$ac_save_LDFLAGS $LIBRUBYARG_SHARED" | ||
1651 | 51 | |||
1652 | 52 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[VALUE rb_ac_test = rb_define_module("actest");]])],[with_ruby="yes";AC_MSG_RESULT(found)],[with_ruby="no";AC_MSG_RESULT(missing)]) | ||
1653 | 53 | |||
1654 | 54 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
1655 | 55 | CFLAGS="$ac_save_CFLAGS" | ||
1656 | 56 | LDFLAGS="$ac_save_LDFLAGS" | ||
1657 | 57 | ],[ | ||
1658 | 58 | # This allows 'make clean' in the ruby directory to work when | ||
1659 | 59 | # ruby isn't available | ||
1660 | 60 | RUBY= | ||
1661 | 61 | RUBY_INCLUDES= | ||
1662 | 62 | LIBRUBYARG_SHARED= | ||
1663 | 63 | RUBY_LIB= | ||
1664 | 64 | RUBY_DIR= | ||
1665 | 65 | RUBY_LIBDIR= | ||
1666 | 66 | RUBY_ARCH_DIR= | ||
1667 | 67 | with_ruby="no" | ||
1668 | 68 | ]) | ||
1669 | 69 | |||
1670 | 70 | AC_SUBST(RUBY_INCLUDES) | ||
1671 | 71 | AC_SUBST(LIBRUBYARG_SHARED) | ||
1672 | 72 | AC_SUBST(RUBY_LIB) | ||
1673 | 73 | AC_SUBST(RUBY_DIR) | ||
1674 | 74 | AC_SUBST(RUBY_LIBDIR) | ||
1675 | 75 | AC_SUBST(RUBY_ARCH_DIR) | ||
1676 | 76 | |||
1677 | 77 | AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"]) | ||
1678 | 78 | AM_CONDITIONAL(BUILD_RUBY, test "$with_ruby" = "yes") | ||
1679 | 79 | ]) | ||
1680 | 0 | 80 | ||
1681 | === added file 'm4/pkg.m4' | |||
1682 | --- m4/pkg.m4 1970-01-01 00:00:00 +0000 | |||
1683 | +++ m4/pkg.m4 2009-08-10 21:04:49 +0000 | |||
1684 | @@ -0,0 +1,157 @@ | |||
1685 | 1 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | ||
1686 | 2 | # | ||
1687 | 3 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | ||
1688 | 4 | # | ||
1689 | 5 | # This program is free software; you can redistribute it and/or modify | ||
1690 | 6 | # it under the terms of the GNU General Public License as published by | ||
1691 | 7 | # the Free Software Foundation; either version 2 of the License, or | ||
1692 | 8 | # (at your option) any later version. | ||
1693 | 9 | # | ||
1694 | 10 | # This program is distributed in the hope that it will be useful, but | ||
1695 | 11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1696 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
1697 | 13 | # General Public License for more details. | ||
1698 | 14 | # | ||
1699 | 15 | # You should have received a copy of the GNU General Public License | ||
1700 | 16 | # along with this program; if not, write to the Free Software | ||
1701 | 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
1702 | 18 | # | ||
1703 | 19 | # As a special exception to the GNU General Public License, if you | ||
1704 | 20 | # distribute this file as part of a program that contains a | ||
1705 | 21 | # configuration script generated by Autoconf, you may include it under | ||
1706 | 22 | # the same distribution terms that you use for the rest of that program. | ||
1707 | 23 | |||
1708 | 24 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
1709 | 25 | # ---------------------------------- | ||
1710 | 26 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | ||
1711 | 27 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | ||
1712 | 28 | m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) | ||
1713 | 29 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl | ||
1714 | 30 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | ||
1715 | 31 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) | ||
1716 | 32 | fi | ||
1717 | 33 | if test -n "$PKG_CONFIG"; then | ||
1718 | 34 | _pkg_min_version=m4_default([$1], [0.9.0]) | ||
1719 | 35 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) | ||
1720 | 36 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | ||
1721 | 37 | AC_MSG_RESULT([yes]) | ||
1722 | 38 | else | ||
1723 | 39 | AC_MSG_RESULT([no]) | ||
1724 | 40 | PKG_CONFIG="" | ||
1725 | 41 | fi | ||
1726 | 42 | |||
1727 | 43 | fi[]dnl | ||
1728 | 44 | ])# PKG_PROG_PKG_CONFIG | ||
1729 | 45 | |||
1730 | 46 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | ||
1731 | 47 | # | ||
1732 | 48 | # Check to see whether a particular set of modules exists. Similar | ||
1733 | 49 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | ||
1734 | 50 | # | ||
1735 | 51 | # | ||
1736 | 52 | # Similar to PKG_CHECK_MODULES, make sure that the first instance of | ||
1737 | 53 | # this or PKG_CHECK_MODULES is called, or make sure to call | ||
1738 | 54 | # PKG_CHECK_EXISTS manually | ||
1739 | 55 | # -------------------------------------------------------------- | ||
1740 | 56 | AC_DEFUN([PKG_CHECK_EXISTS], | ||
1741 | 57 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
1742 | 58 | if test -n "$PKG_CONFIG" && \ | ||
1743 | 59 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then | ||
1744 | 60 | m4_ifval([$2], [$2], [:]) | ||
1745 | 61 | m4_ifvaln([$3], [else | ||
1746 | 62 | $3])dnl | ||
1747 | 63 | fi]) | ||
1748 | 64 | |||
1749 | 65 | |||
1750 | 66 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | ||
1751 | 67 | # --------------------------------------------- | ||
1752 | 68 | m4_define([_PKG_CONFIG], | ||
1753 | 69 | [if test -n "$PKG_CONFIG"; then | ||
1754 | 70 | if test -n "$$1"; then | ||
1755 | 71 | pkg_cv_[]$1="$$1" | ||
1756 | 72 | else | ||
1757 | 73 | PKG_CHECK_EXISTS([$3], | ||
1758 | 74 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | ||
1759 | 75 | [pkg_failed=yes]) | ||
1760 | 76 | fi | ||
1761 | 77 | else | ||
1762 | 78 | pkg_failed=untried | ||
1763 | 79 | fi[]dnl | ||
1764 | 80 | ])# _PKG_CONFIG | ||
1765 | 81 | |||
1766 | 82 | # _PKG_SHORT_ERRORS_SUPPORTED | ||
1767 | 83 | # ----------------------------- | ||
1768 | 84 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | ||
1769 | 85 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
1770 | 86 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | ||
1771 | 87 | _pkg_short_errors_supported=yes | ||
1772 | 88 | else | ||
1773 | 89 | _pkg_short_errors_supported=no | ||
1774 | 90 | fi[]dnl | ||
1775 | 91 | ])# _PKG_SHORT_ERRORS_SUPPORTED | ||
1776 | 92 | |||
1777 | 93 | |||
1778 | 94 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
1779 | 95 | # [ACTION-IF-NOT-FOUND]) | ||
1780 | 96 | # | ||
1781 | 97 | # | ||
1782 | 98 | # Note that if there is a possibility the first call to | ||
1783 | 99 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | ||
1784 | 100 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | ||
1785 | 101 | # | ||
1786 | 102 | # | ||
1787 | 103 | # -------------------------------------------------------------- | ||
1788 | 104 | AC_DEFUN([PKG_CHECK_MODULES], | ||
1789 | 105 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
1790 | 106 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
1791 | 107 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | ||
1792 | 108 | |||
1793 | 109 | pkg_failed=no | ||
1794 | 110 | AC_MSG_CHECKING([for $1]) | ||
1795 | 111 | |||
1796 | 112 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | ||
1797 | 113 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | ||
1798 | 114 | |||
1799 | 115 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS | ||
1800 | 116 | and $1[]_LIBS to avoid the need to call pkg-config. | ||
1801 | 117 | See the pkg-config man page for more details.]) | ||
1802 | 118 | |||
1803 | 119 | if test $pkg_failed = yes; then | ||
1804 | 120 | _PKG_SHORT_ERRORS_SUPPORTED | ||
1805 | 121 | if test $_pkg_short_errors_supported = yes; then | ||
1806 | 122 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` | ||
1807 | 123 | else | ||
1808 | 124 | $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | ||
1809 | 125 | fi | ||
1810 | 126 | # Put the nasty error message in config.log where it belongs | ||
1811 | 127 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD | ||
1812 | 128 | |||
1813 | 129 | ifelse([$4], , [AC_MSG_ERROR(dnl | ||
1814 | 130 | [Package requirements ($2) were not met: | ||
1815 | 131 | |||
1816 | 132 | $$1_PKG_ERRORS | ||
1817 | 133 | |||
1818 | 134 | Consider adjusting the PKG_CONFIG_PATH environment variable if you | ||
1819 | 135 | installed software in a non-standard prefix. | ||
1820 | 136 | |||
1821 | 137 | _PKG_TEXT | ||
1822 | 138 | ])], | ||
1823 | 139 | [AC_MSG_RESULT([no]) | ||
1824 | 140 | $4]) | ||
1825 | 141 | elif test $pkg_failed = untried; then | ||
1826 | 142 | ifelse([$4], , [AC_MSG_FAILURE(dnl | ||
1827 | 143 | [The pkg-config script could not be found or is too old. Make sure it | ||
1828 | 144 | is in your PATH or set the PKG_CONFIG environment variable to the full | ||
1829 | 145 | path to pkg-config. | ||
1830 | 146 | |||
1831 | 147 | _PKG_TEXT | ||
1832 | 148 | |||
1833 | 149 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], | ||
1834 | 150 | [$4]) | ||
1835 | 151 | else | ||
1836 | 152 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS | ||
1837 | 153 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS | ||
1838 | 154 | AC_MSG_RESULT([yes]) | ||
1839 | 155 | ifelse([$3], , :, [$3]) | ||
1840 | 156 | fi[]dnl | ||
1841 | 157 | ])# PKG_CHECK_MODULES |
Updated with latest pandora-build code.