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