Merge lp://staging/~mordred/libmemcached/pandora-build into lp://staging/~tangent-org/libmemcached/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
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.

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

Updated with latest pandora-build code.

Revision history for this message
Monty Taylor (mordred) wrote :

Updated to the latest pandora-build.

575. By Brian Aker <brian@gaz>

Updating library version number

576. By Brian Aker <brian@gaz>

Update pandora

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2009-08-06 14:29:25 +0000
+++ .bzrignore 2009-08-10 21:09:44 +0000
@@ -56,3 +56,4 @@
56libmemcached-0.30-1.x86_64.rpm56libmemcached-0.30-1.x86_64.rpm
57libmemcached-0.31-1.src.rpm57libmemcached-0.31-1.src.rpm
58libmemcached-0.31-1.x86_64.rpm58libmemcached-0.31-1.x86_64.rpm
59config/plugin.ac
5960
=== modified file 'clients/Makefile.am'
--- clients/Makefile.am 2009-09-02 11:14:46 +0000
+++ clients/Makefile.am 2009-09-16 09:03:12 +0000
@@ -14,36 +14,28 @@
1414
15memcat_SOURCES = memcat.c15memcat_SOURCES = memcat.c
16memcat_LDADD = $(LDADDS)16memcat_LDADD = $(LDADDS)
17memcat_LDFLAGS = -rpath $(pkglibdir)
1817
19memcp_SOURCES = memcp.c18memcp_SOURCES = memcp.c
20memcp_LDADD = $(LDADDS)19memcp_LDADD = $(LDADDS)
21memcp_LDFLAGS = -rpath $(pkglibdir)
2220
23memdump_SOURCES = memdump.c21memdump_SOURCES = memdump.c
24memdump_LDADD = $(LDADDS)22memdump_LDADD = $(LDADDS)
25memdump_LDFLAGS = -rpath $(pkglibdir)
2623
27memstat_SOURCES = memstat.c24memstat_SOURCES = memstat.c
28memstat_LDADD = $(LDADDS)25memstat_LDADD = $(LDADDS)
29memstat_LDFLAGS = -rpath $(pkglibdir)
3026
31memrm_SOURCES = memrm.c27memrm_SOURCES = memrm.c
32memrm_LDADD = $(LDADDS)28memrm_LDADD = $(LDADDS)
33memrm_LDFLAGS = -rpath $(pkglibdir)
3429
35memflush_SOURCES = memflush.c30memflush_SOURCES = memflush.c
36memflush_LDADD = $(LDADDS)31memflush_LDADD = $(LDADDS)
37memflush_LDFLAGS = -rpath $(pkglibdir)
3832
39memerror_SOURCES = memerror.c33memerror_SOURCES = memerror.c
40memerror_LDADD = $(LDADDS)34memerror_LDADD = $(LDADDS)
41memerror_LDFLAGS = -rpath $(pkglibdir)
4235
43memslap_SOURCES = memslap.c36memslap_SOURCES = memslap.c
44memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)37memslap_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
45memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS) 38memslap_LDADD = $(PTHREAD_LIBS) libgenexec.la $(LDADDS)
46memslap_LDFLAGS = $(AM_LDFLAGS) -rpath $(pkglibdir)
4739
48test-start-server:40test-start-server:
49 memflush --servers=localhost41 memflush --servers=localhost
5042
=== modified file 'clients/utilities.c'
--- clients/utilities.c 2009-07-08 13:38:34 +0000
+++ clients/utilities.c 2009-09-16 09:07:09 +0000
@@ -28,7 +28,7 @@
28 {28 {
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.");
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.");
31 case OPT_HELP: return("Diplay this message and then exit.");31 case OPT_HELP: return("Display this message and then exit.");
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.");
33 case OPT_DEBUG: return("Provide output only useful for debugging.");33 case OPT_DEBUG: return("Provide output only useful for debugging.");
34 case OPT_FLAG: return("Provide flag information for storage operation.");34 case OPT_FLAG: return("Provide flag information for storage operation.");
3535
=== modified file 'config/autorun.sh'
--- config/autorun.sh 2009-07-03 10:48:15 +0000
+++ config/autorun.sh 2009-09-16 09:02:26 +0000
@@ -35,6 +35,18 @@
35 return 135 return 1
36}36}
3737
38
39if test -f config/pre_hook.sh
40then
41 . config/pre_hook.sh
42fi
43
44# We need to some file here for the m4_sinclude, even if it's just empty
45if test ! -f config/plugin.ac
46then
47 touch config/plugin.ac
48fi
49
38# Try to detect the supported binaries if the user didn't50# Try to detect the supported binaries if the user didn't
39# override that by pushing the environment variable51# override that by pushing the environment variable
40if test x$LIBTOOLIZE = x; then52if test x$LIBTOOLIZE = x; then
@@ -45,14 +57,14 @@
45fi57fi
4658
47if test x$ACLOCAL = x; then59if test x$ACLOCAL = x; then
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`
49 if test x$ACLOCAL = x; then61 if test x$ACLOCAL = x; then
50 die "Did not find a supported aclocal"62 die "Did not find a supported aclocal"
51 fi63 fi
52fi64fi
5365
54if test x$AUTOMAKE = x; then66if test x$AUTOMAKE = x; then
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`
56 if test x$AUTOMAKE = x; then68 if test x$AUTOMAKE = x; then
57 die "Did not find a supported automake"69 die "Did not find a supported automake"
58 fi70 fi
@@ -78,6 +90,11 @@
78run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake"90run $AUTOMAKE $AUTOMAKE_FLAGS || die "Can't execute automake"
79run $AUTOCONF || die "Can't execute autoconf"91run $AUTOCONF || die "Can't execute autoconf"
8092
93if test -f config/post_hook.sh
94then
95 . config/post_hook.sh
96fi
97
81echo "---"98echo "---"
82echo "Configured with the following tools:"99echo "Configured with the following tools:"
83echo " * `$LIBTOOLIZE --version | head -1`"100echo " * `$LIBTOOLIZE --version | head -1`"
84101
=== modified file 'm4/pandora_64bit.m4'
--- m4/pandora_64bit.m4 2009-07-18 18:11:25 +0000
+++ m4/pandora_64bit.m4 2009-08-10 21:04:49 +0000
@@ -9,12 +9,11 @@
9AC_DEFUN([PANDORA_64BIT],[9AC_DEFUN([PANDORA_64BIT],[
10 AC_BEFORE([$0], [AC_LIB_PREFIX])10 AC_BEFORE([$0], [AC_LIB_PREFIX])
1111
1212 AC_ARG_ENABLE([64bit],
13 AC_ARG_ENABLE([64bit],[13 [AS_HELP_STRING([--disable-64bit],
14 AS_HELP_STRING([--disable-64bit],
15 [Build 64 bit binary @<:@default=on@:>@])],14 [Build 64 bit binary @<:@default=on@:>@])],
16 [ac_enable_64bit="$enableval"],15 [ac_enable_64bit="$enableval"],
17 [ac_enable_64bit="yes"])16 [ac_enable_64bit="yes"])
1817
19 AC_CHECK_PROGS(ISAINFO, [isainfo], [no])18 AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
20 AS_IF([test "x$ISAINFO" != "xno"],19 AS_IF([test "x$ISAINFO" != "xno"],
@@ -26,23 +25,29 @@
26 isainfo_k=`${ISAINFO} -k` 25 isainfo_k=`${ISAINFO} -k`
27 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}"26 DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}"
2827
29 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
30 CPPFLAGS="-I/usr/local ${CPPFLAGS}"
31 ])
32
33 AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
34 LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
35 ])
36
37 AS_IF([test "x$ac_enable_64bit" = "xyes"],[28 AS_IF([test "x$ac_enable_64bit" = "xyes"],[
29
30 AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
31 LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}"
32 ])
33
38 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[34 AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
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
40 dnl the dir suffix to match solaris 32/64-bit policy36 dnl the dir suffix to match solaris 32/64-bit policy
41 libdir="${libdir}/${isainfo_k}"37 libdir="${libdir}/${isainfo_k}"
42 ])38 ])
4339
44 CPPFLAGS="-m64 ${CPPFLAGS}"40 AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
45 LDFLAGS="-m64 ${LDFLAGS}"41 CFLAGS="${CFLAGS} -m64"
42 ac_cv_env_CFLAGS_set=set
43 ac_cv_env_CFLAGS_value='-m64'
44 ])
45 AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
46 CXXFLAGS="${CXXFLAGS} -m64"
47 ac_cv_env_CXXFLAGS_set=set
48 ac_cv_env_CXXFLAGS_value='-m64'
49 ])
50
46 AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[51 AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[
47 AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"52 AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}"
48 AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"53 AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}"
4954
=== modified file 'm4/pandora_canonical.m4'
--- m4/pandora_canonical.m4 2009-07-18 18:11:25 +0000
+++ m4/pandora_canonical.m4 2009-09-16 09:02:26 +0000
@@ -4,7 +4,7 @@
4dnl with or without modifications, as long as this notice is preserved.4dnl with or without modifications, as long as this notice is preserved.
55
6dnl Which version of the canonical setup we're using6dnl Which version of the canonical setup we're using
7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.22])7AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.57])
88
9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[9AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10 dnl Force dependency tracking on for Sun Studio builds10 dnl Force dependency tracking on for Sun Studio builds
@@ -23,6 +23,7 @@
23 m4_define([PCT_REQUIRE_CXX],[no])23 m4_define([PCT_REQUIRE_CXX],[no])
24 m4_define([PCT_IGNORE_SHARED_PTR],[no])24 m4_define([PCT_IGNORE_SHARED_PTR],[no])
25 m4_define([PCT_FORCE_GCC42],[no])25 m4_define([PCT_FORCE_GCC42],[no])
26 m4_define([PCT_SRC_IN_SRC],[no])
26 m4_foreach([pct_arg],[$*],[27 m4_foreach([pct_arg],[$*],[
27 m4_case(pct_arg,28 m4_case(pct_arg,
28 [use-gnulib], [29 [use-gnulib], [
@@ -40,6 +41,10 @@
40 [force-gcc42], [41 [force-gcc42], [
41 m4_undefine([PCT_FORCE_GCC42])42 m4_undefine([PCT_FORCE_GCC42])
42 m4_define([PCT_FORCE_GCC42],[yes])43 m4_define([PCT_FORCE_GCC42],[yes])
44 ],
45 [src-in-src], [
46 m4_undefine([PCT_SRC_IN_SRC])
47 m4_define([PCT_SRC_IN_SRC],[yes])
43 ])48 ])
44 ])49 ])
4550
@@ -54,6 +59,7 @@
54 AC_CANONICAL_TARGET59 AC_CANONICAL_TARGET
55 60
56 AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects)61 AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects)
62 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
5763
58 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])64 m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])
59 65
@@ -63,19 +69,16 @@
6369
64 dnl Once we can use a modern autoconf, we can use this70 dnl Once we can use a modern autoconf, we can use this
65 dnl AC_PROG_CC_C9971 dnl AC_PROG_CC_C99
66 AC_PROG_CXX72 AC_REQUIRE([AC_PROG_CXX])
67 AC_PROG_CPP73 PANDORA_EXTENSIONS
68 AM_PROG_CC_C_O74 AM_PROG_CC_C_O
6975
7076
71 gl_USE_SYSTEM_EXTENSIONS
72 m4_if(PCT_FORCE_GCC42, [yes], [77 m4_if(PCT_FORCE_GCC42, [yes], [
73 AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION)78 AS_IF([test "$GCC" = "yes"], PANDORA_ENSURE_GCC_VERSION)
74 ])79 ])
7580
76 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])81 PANDORA_PLATFORM
77 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
78 AS_IF([test "x$INTELCC" = "xyes"], [enable_rpath=no])
7982
80 PANDORA_LIBTOOL83 PANDORA_LIBTOOL
8184
@@ -96,7 +99,10 @@
96 ])99 ])
97 ])100 ])
98 101
99 m4_if(PCT_USE_GNULIB, [yes], [gl_INIT])102 m4_if(PCT_USE_GNULIB, [yes], [
103 gl_INIT
104 AC_CONFIG_LIBOBJ_DIR([gnulib])
105 ])
100106
101 AC_C_BIGENDIAN107 AC_C_BIGENDIAN
102 AC_C_CONST108 AC_C_CONST
@@ -139,6 +145,12 @@
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}"
140 ])146 ])
141 ])147 ])
148 AS_IF([test "PCT_SRC_IN_SRC" = "yes"],[
149 AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}"
150 ])
151
152 PANDORA_USE_PIPE
153
142154
143 AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}"155 AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}"
144 AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"156 AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
145157
=== modified file 'm4/pandora_ensure_gcc_version.m4'
--- m4/pandora_ensure_gcc_version.m4 2009-07-08 07:37:38 +0000
+++ m4/pandora_ensure_gcc_version.m4 2009-09-16 09:02:26 +0000
@@ -8,12 +8,15 @@
8AC_DEFUN([PANDORA_MAC_GCC42],8AC_DEFUN([PANDORA_MAC_GCC42],
9 [AS_IF([test "$GCC" = "yes"],[9 [AS_IF([test "$GCC" = "yes"],[
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"],[
11 AS_IF([test -f /usr/bin/gcc-4.2],11 host_os_version=`echo ${host_os} | perl -ple 's/^\D+//g;s,\..*,,'`
12 AS_IF([test "$host_os_version" -lt 10],[
13 AS_IF([test -f /usr/bin/gcc-4.2],
12 [14 [
13 CPP="/usr/bin/gcc-4.2 -E"15 CPP="/usr/bin/gcc-4.2 -E"
14 CC=/usr/bin/gcc-4.216 CC=/usr/bin/gcc-4.2
15 CXX=/usr/bin/g++-4.217 CXX=/usr/bin/g++-4.2
16 ])18 ])
19 ])
17 ])20 ])
18 ])21 ])
19])22])
2023
=== added file 'm4/pandora_extensions.m4'
--- m4/pandora_extensions.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_extensions.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,16 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([PANDORA_EXTENSIONS],[
7
8 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
9 [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
10 [AC_REQUIRE([AC_GNU_SOURCE])])
11
12])
13
14AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[
15 AC_REQUIRE([PANDORA_EXTENSIONS])
16])
017
=== modified file 'm4/pandora_have_better_malloc.m4'
--- m4/pandora_have_better_malloc.m4 2009-07-16 02:58:56 +0000
+++ m4/pandora_have_better_malloc.m4 2009-08-10 21:04:49 +0000
@@ -11,8 +11,16 @@
11 AC_ARG_ENABLE([umem],11 AC_ARG_ENABLE([umem],
12 [AS_HELP_STRING([--enable-umem],12 [AS_HELP_STRING([--enable-umem],
13 [Enable linking with libumem @<:@default=off@:>@])],13 [Enable linking with libumem @<:@default=off@:>@])],
14 [ac_enable_umem="$enableval"],14 [ac_enable_umem="$enableval"],[
15 [ac_enable_umem="no"])15 case "$target_os" in
16 *solaris*)
17 ac_enable_umem="yes"
18 ;;
19 *)
20 ac_enable_umem="no"
21 ;;
22 esac
23 ])
16 24
17 AC_ARG_ENABLE([tcmalloc],25 AC_ARG_ENABLE([tcmalloc],
18 [AS_HELP_STRING([--enable-tcmalloc],26 [AS_HELP_STRING([--enable-tcmalloc],
1927
=== modified file 'm4/pandora_have_libdrizzle.m4'
--- m4/pandora_have_libdrizzle.m4 2009-07-16 02:58:56 +0000
+++ m4/pandora_have_libdrizzle.m4 2009-08-10 21:04:49 +0000
@@ -9,16 +9,25 @@
9 dnl --------------------------------------------------------------------9 dnl --------------------------------------------------------------------
10 dnl Check for libdrizzle10 dnl Check for libdrizzle
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
12 12
13 AC_LIB_HAVE_LINKFLAGS(drizzle,,[13 AC_ARG_ENABLE([libdrizzle],
14 #include <libdrizzle/drizzle_client.h>14 [AS_HELP_STRING([--disable-libdrizzle],
15 [Build with libdrizzle support @<:@default=on@:>@])],
16 [ac_enable_libdrizzle="$enableval"],
17 [ac_enable_libdrizzle="yes"])
18
19 AS_IF([test "x$ac_enable_libdrizzle" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(drizzle,,[
21 #include <libdrizzle/drizzle_client.h>
22 ],[
23 drizzle_st drizzle;
24 drizzle_version();
25 ])
15 ],[26 ],[
16 drizzle_st drizzle;27 ac_cv_libdrizzle="no"
17 drizzle_version();
18 ])28 ])
19 29
20 AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])30 AM_CONDITIONAL(HAVE_LIBDRIZZLE, [test "x${ac_cv_libdrizzle}" = "xyes"])
21
22])31])
2332
24AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[33AC_DEFUN([PANDORA_HAVE_LIBDRIZZLE],[
@@ -27,7 +36,7 @@
2736
28AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[37AC_DEFUN([PANDORA_REQUIRE_LIBDRIZZLE],[
29 AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])38 AC_REQUIRE([PANDORA_HAVE_LIBDRIZZLE])
30 AS_IF([test x$ac_cv_libdrizzle = xno],39 AS_IF([test "x${ac_cv_libdrizzle}" = "xno"],
31 AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]))40 AC_MSG_ERROR([libdrizzle is required for ${PACKAGE}]))
32])41])
3342
3443
=== modified file 'm4/pandora_have_libgearman.m4'
--- m4/pandora_have_libgearman.m4 2009-07-16 02:58:56 +0000
+++ m4/pandora_have_libgearman.m4 2009-08-10 21:04:49 +0000
@@ -10,14 +10,24 @@
10 dnl Check for libgearman10 dnl Check for libgearman
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
1212
13 AC_LIB_HAVE_LINKFLAGS(gearman,, 13 AC_ARG_ENABLE([libgearman],
14 [#include <libgearman/gearman.h>],[ 14 [AS_HELP_STRING([--disable-libgearman],
15 gearman_client_st gearman_client; 15 [Build with libgearman support @<:@default=on@:>@])],
16 gearman_version(); 16 [ac_enable_libgearman="$enableval"],
17 ]) 17 [ac_enable_libgearman="yes"])
18
19 AS_IF([test "x$ac_enable_libgearman" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(gearman,,[
21 #include <libgearman/gearman.h>
22 ],[
23 gearman_client_st gearman_client;
24 gearman_version();
25 ])
26 ],[
27 ac_cv_libgearman="no"
28 ])
1829
19 AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"])30 AM_CONDITIONAL(HAVE_LIBGEARMAN, [test "x${ac_cv_libgearman}" = "xyes"])
20
21])31])
2232
23AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[33AC_DEFUN([PANDORA_HAVE_LIBGEARMAN],[
@@ -26,6 +36,6 @@
2636
27AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[37AC_DEFUN([PANDORA_REQUIRE_LIBGEARMAN],[
28 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])38 AC_REQUIRE([PANDORA_HAVE_LIBGEARMAN])
29 AS_IF([test x$ac_cv_libgearman = xno],39 AS_IF([test "x${ac_cv_libgearman}" = "xno"],
30 AC_MSG_ERROR([libgearman is required for ${PACKAGE}]))40 AC_MSG_ERROR([libgearman is required for ${PACKAGE}]))
31])41])
3242
=== modified file 'm4/pandora_have_libmemcached.m4'
--- m4/pandora_have_libmemcached.m4 2009-07-16 02:58:56 +0000
+++ m4/pandora_have_libmemcached.m4 2009-08-10 21:04:49 +0000
@@ -10,18 +10,27 @@
10 dnl Check for libmemcached10 dnl Check for libmemcached
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
1212
13 AC_LIB_HAVE_LINKFLAGS(memcached,,[13 AC_ARG_ENABLE([libmemcached],
14 #include <libmemcached/memcached.h>14 [AS_HELP_STRING([--disable-libmemcached],
15 ], [15 [Build with libmemcached support @<:@default=on@:>@])],
16 memcached_st memc;16 [ac_enable_libmemcached="$enableval"],
17 memcached_dump_func *df;17 [ac_enable_libmemcached="yes"])
18 memcached_version();18
19 AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(memcached,,[
21 #include <libmemcached/memcached.h>
22 ],[
23 memcached_st memc;
24 memcached_dump_func *df;
25 memcached_lib_version();
26 ])
27 ],[
28 ac_cv_libmemcached="no"
19 ])29 ])
20 30
21 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])31 AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
22 32
23 AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ])33 AS_IF([test "x${ac_cv_libmemcached}" = "xyes"], [ PANDORA_WITH_MEMCACHED ])
24
25])34])
2635
27AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[36AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
2837
=== modified file 'm4/pandora_have_libpq.m4'
--- m4/pandora_have_libpq.m4 2009-07-18 18:11:25 +0000
+++ m4/pandora_have_libpq.m4 2009-08-10 21:04:49 +0000
@@ -10,11 +10,26 @@
10 dnl Check for libpq10 dnl Check for libpq
11 dnl --------------------------------------------------------------------11 dnl --------------------------------------------------------------------
1212
13 AC_LIB_HAVE_LINKFLAGS(pq,,[13 AC_ARG_ENABLE([libpq],
14 #include <libpq-fe.h>14 [AS_HELP_STRING([--disable-libpq],
15 ], [15 [Build with libpq support @<:@default=on@:>@])],
16 PGconn *conn;16 [ac_enable_libpq="$enableval"],
17 conn = PQconnectdb(NULL);17 [ac_enable_libpq="yes"])
18
19 AS_IF([test "x$ac_enable_libpq" = "xyes"],[
20 AC_CHECK_HEADERS([libpq-fe.h])
21 AC_LIB_HAVE_LINKFLAGS(pq,,[
22 #ifdef HAVE_LIBPQ_FE_H
23 # include <libpq-fe.h>
24 #else
25 # include <postgresql/libpq-fe.h>
26 #endif
27 ], [
28 PGconn *conn;
29 conn = PQconnectdb(NULL);
30 ])
31 ],[
32 ac_cv_libpq="no"
18 ])33 ])
19 34
20 AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"])35 AM_CONDITIONAL(HAVE_LIBPQ, [test "x${ac_cv_libpq}" = "xyes"])
@@ -26,6 +41,6 @@
2641
27AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[42AC_DEFUN([PANDORA_REQUIRE_LIBPQ],[
28 AC_REQUIRE([PANDORA_HAVE_LIBPQ])43 AC_REQUIRE([PANDORA_HAVE_LIBPQ])
29 AS_IF([test x$ac_cv_libpq = xno],44 AS_IF([test "x${ac_cv_libpq}" = "xno"],
30 AC_MSG_ERROR([libpq is required for ${PACKAGE}]))45 AC_MSG_ERROR([libpq is required for ${PACKAGE}]))
31])46])
3247
=== added file 'm4/pandora_have_libsqlite3.m4'
--- m4/pandora_have_libsqlite3.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_libsqlite3.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,42 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6AC_DEFUN([_PANDORA_SEARCH_LIBSQLITE3],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8
9 dnl --------------------------------------------------------------------
10 dnl Check for libsqlite3
11 dnl --------------------------------------------------------------------
12
13 AC_ARG_ENABLE([libsqlite3],
14 [AS_HELP_STRING([--disable-libsqlite3],
15 [Build with libsqlite3 support @<:@default=on@:>@])],
16 [ac_enable_libsqlite3="$enableval"],
17 [ac_enable_libsqlite3="yes"])
18
19 AS_IF([test "x$ac_enable_libsqlite3" = "xyes"],[
20 AC_LIB_HAVE_LINKFLAGS(sqlite3,,[
21 #include <stdio.h>
22 #include <sqlite3.h>
23 ],[
24 sqlite3 *db;
25 sqlite3_open(NULL, &db);
26 ])
27 ],[
28 ac_cv_libsqlite3="no"
29 ])
30
31 AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"])
32])
33
34AC_DEFUN([PANDORA_HAVE_LIBSQLITE3],[
35 AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])
36])
37
38AC_DEFUN([PANDORA_REQUIRE_LIBSQLITE3],[
39 AC_REQUIRE([_PANDORA_SEARCH_LIBSQLITE3])
40 AS_IF([test "x${ac_cv_libsqlite3}" = "xno"],
41 AC_MSG_ERROR([libsqlite3 is required for ${PACKAGE}]))
42])
043
=== added file 'm4/pandora_have_protobuf.m4'
--- m4/pandora_have_protobuf.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_have_protobuf.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,80 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12dnl --------------------------------------------------------------------
13dnl Check for Google Proto Buffers
14dnl --------------------------------------------------------------------
15
16AC_DEFUN([_PANDORA_SEARCH_LIBPROTOBUF],[
17 AC_REQUIRE([PANDORA_HAVE_PTHREAD])
18
19 AC_LANG_PUSH([C++])
20 save_CXXFLAGS="${CXXFLAGS}"
21 CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
22 AC_LIB_HAVE_LINKFLAGS(protobuf,,
23 [#include <google/protobuf/descriptor.h>],
24 [google::protobuf::FileDescriptor* file;],
25 [system])
26 CXXFLAGS="${save_CXXFLAGS}"
27 AC_LANG_POP()
28])
29
30AC_DEFUN([PANDORA_HAVE_LIBPROTOBUF],[
31 AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
32])
33
34AC_DEFUN([PANDORA_REQUIRE_LIBPROTOBUF],[
35 AC_REQUIRE([PANDORA_HAVE_LIBPROTOBUF])
36 AS_IF([test x$ac_cv_libprotobuf = xno],
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.]))
38])
39
40AC_DEFUN([PANDORA_PROTOBUF_REQUIRE_VERSION],[
41 AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
42 p_recent_ver=$1
43 p_recent_ver_major=`echo $p_recent_ver | cut -f1 -d.`
44 p_recent_ver_minor=`echo $p_recent_ver | cut -f2 -d.`
45 p_recent_ver_patch=`echo $p_recent_ver | cut -f3 -d.`
46 p_recent_ver_hex=`printf "%d%03d%03d" $p_recent_ver_major $p_recent_ver_minor $p_recent_ver_patch`
47 AC_LANG_PUSH([C++])
48 AC_CACHE_CHECK([for protobuf >= $p_recent_ver],
49 [drizzle_cv_protobuf_recent],
50 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
51#include <google/protobuf/descriptor.h>
52#if GOOGLE_PROTOBUF_VERSION < $p_recent_ver_hex
53# error Your version of Protobuf is too old
54#endif
55 ]])],
56 [drizzle_cv_protobuf_recent=yes],
57 [drizzle_cv_protobuf_recent=no])])
58 AS_IF([test "$drizzle_cv_protobuf_recent" = "no"],[
59 AC_MSG_ERROR([Your version of Google Protocol Buffers is too old. ${PACKAGE} requires at least version $p_recent_ver])
60 ])
61 AC_LANG_POP()
62])
63
64AC_DEFUN([_PANDORA_SEARCH_PROTOC],[
65 AC_REQUIRE([_PANDORA_SEARCH_LIBPROTOBUF])
66 AC_PATH_PROG([PROTOC],[protoc],[no],[$LIBPROTOBUF_PREFIX/bin:$PATH])
67])
68
69AC_DEFUN([PANDORA_HAVE_PROTOC],[
70 AC_REQUIRE([_PANDORA_SEARCH_PROTOC])
71])
72
73AC_DEFUN([PANDORA_REQUIRE_PROTOC],[
74 AC_REQUIRE([PANDORA_HAVE_PROTOC])
75 AS_IF([test "x$PROTOC" = "xno"],[
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.])
77 ])
78])
79
80
081
=== removed file 'm4/pandora_have_sqlite.m4'
--- m4/pandora_have_sqlite.m4 2009-07-16 02:58:56 +0000
+++ m4/pandora_have_sqlite.m4 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5
6
7AC_DEFUN([_PANDORA_SEARCH_SQLITE],[
8 AC_REQUIRE([AC_LIB_PREFIX])
9
10 AC_LIB_HAVE_LINKFLAGS(sqlite3,,[
11 #include <stdio.h>
12 #include <sqlite3.h>
13 ],[
14 sqlite3 *db;
15 sqlite3_open(NULL, &db);
16 ])
17
18 AM_CONDITIONAL(HAVE_LIBSQLITE3, [test "x${ac_cv_libsqlite3}" = "xyes"])
19
20])
21
22AC_DEFUN([PANDORA_HAVE_SQLITE],[
23 AC_REQUIRE([_PANDORA_SEARCH_SQLITE])
24])
250
=== added file 'm4/pandora_platform.m4'
--- m4/pandora_platform.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_platform.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,77 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_PLATFORM],[
13
14 dnl Canonicalize the configuration name.
15
16 AC_DEFINE_UNQUOTED([HOST_VENDOR], ["$host_vendor"],[Vendor of Build System])
17 AC_DEFINE_UNQUOTED([HOST_OS], ["$host_os"], [OS of Build System])
18 AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [CPU of Build System])
19
20 AC_DEFINE_UNQUOTED([TARGET_VENDOR], ["$target_vendor"],[Vendor of Target System])
21 AC_DEFINE_UNQUOTED([TARGET_OS], ["$target_os"], [OS of Target System])
22 AC_DEFINE_UNQUOTED([TARGET_CPU], ["$target_cpu"], [CPU of Target System])
23
24
25 case "$host_os" in
26 *solaris*|*freebsd*)
27 AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[
28 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
29 ])
30
31 AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[
32 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
33 ])
34 ;;
35 esac
36
37 case "$target_os" in
38 *linux*)
39 TARGET_LINUX="true"
40 AC_SUBST(TARGET_LINUX)
41 AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
42 ;;
43 *darwin*)
44 TARGET_OSX="true"
45 AC_SUBST(TARGET_OSX)
46 AC_DEFINE([TARGET_OS_OSX], [1], [Whether we build for OSX])
47 ;;
48 *solaris*)
49 TARGET_SOLARIS="true"
50 AC_SUBST(TARGET_SOLARIS)
51 AC_DEFINE([TARGET_OS_SOLARIS], [1], [Whether we are building for Solaris])
52 ;;
53 *freebsd*)
54 TARGET_FREEBSD="true"
55 AC_SUBST(TARGET_FREEBSD)
56 AC_DEFINE([TARGET_OS_FREEBSD], [1], [Whether we are building for FreeBSD])
57 AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])
58 ;;
59 *)
60 ;;
61 esac
62
63 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
64 AC_CHECK_DECL([__ICC], [INTELCC="yes"], [INTELCC="no"])
65
66 AS_IF([test "$INTELCC" = "yes"], [enable_rpath=no])
67
68 dnl By default, Sun Studio grabs special versions of limits.h and string.h
69 dnl when you use <cstring> and <climits>. By setting this define, we can
70 dnl disable that and cause those to wrap the standard headers instead.
71 dnl http://www.stlport.com/doc/configure.html
72 AS_IF([test "$SUNCC" = "yes"],[
73 AC_DEFINE([_STLP_NO_NEW_C_HEADERS],[1],
74 [Cause Sun Studio to not be quite so strict with standards conflicts])
75 ])
76
77])
078
=== added file 'm4/pandora_plugins.m4'
--- m4/pandora_plugins.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_plugins.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,41 @@
1dnl Copyright (C) 2009 Sun Microsystems
2dnl This file is free software; Sun Microsystems
3dnl gives unlimited permission to copy and/or distribute it,
4dnl with or without modifications, as long as this notice is preserved.
5dnl--------------------------------------------------------------------
6dnl PANDORA_PLUGINS
7dnl Declare our plugin modules
8dnl--------------------------------------------------------------------
9
10AC_DEFUN([PANDORA_PLUGINS],[
11
12 m4_sinclude(config/plugin.ac)
13 dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
14 AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list],
15 [List of plugins that should be loaded on startup if no
16 value is given for --plugin-load])
17
18 pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
19 AS_IF([test "x$pandora_builtin_list" = "x"], pandora_builtin_list="NULL")
20 AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
21 m4_ifblank($1,[
22 AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],[$pandora_builtin_list],
23 [List of plugins to be built in])
24 ],[
25 AC_CONFIG_FILES($*)
26 ])
27
28
29 AC_SUBST(pandora_plugin_test_list)
30 AC_SUBST(pandora_plugin_libs)
31
32 pandora_plugin_defs=`echo $pandora_plugin_defs | sed 's/, *$//'`
33 AC_SUBST(pandora_plugin_defs)
34
35 AC_SUBST(PANDORA_PLUGIN_DEP_LIBS)
36 AC_SUBST(pkgplugindir,"\$(pkglibdir)/plugin")
37])
38
39AC_DEFUN([PANDORA_ADD_PLUGIN_DEP_LIB],[
40 PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} $*"
41])
042
=== added file 'm4/pandora_pthread.m4'
--- m4/pandora_pthread.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_pthread.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,78 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12
13dnl --------------------------------------------------------------------
14dnl Check for libpthread
15dnl --------------------------------------------------------------------
16
17AC_DEFUN([PANDORA_PTHREAD_YIELD],[
18 AC_REQUIRE([ACX_PTHREAD])
19
20 save_CFLAGS="${CFLAGS}"
21 save_CXXFLAGS="${CXXFLAGS}"
22 CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
23 CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
24 dnl Some OSes like Mac OS X have that as a replacement for pthread_yield()
25 AC_CHECK_FUNCS(pthread_yield_np)
26 AC_CACHE_CHECK([if pthread_yield takes zero arguments],
27 [pandora_cv_pthread_yield_zero_arg],
28 [AC_LINK_IFELSE([
29 AC_LANG_PROGRAM([[
30#include <pthread.h>
31 ]],[[
32 pthread_yield();
33 ]])],
34 [pandora_cv_pthread_yield_zero_arg=yes],
35 [pandora_cv_pthread_yield_zero_arg=no])])
36 AS_IF([test "$pandora_cv_pthread_yield_zero_arg" = "yes"],[
37 AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
38 [pthread_yield that doesn't take any arguments])
39 ])
40
41 AC_CACHE_CHECK([if pthread_yield takes one argument],
42 [pandora_cv_pthread_yield_one_arg],
43 [AC_LINK_IFELSE([
44 AC_LANG_PROGRAM([[
45#include <pthread.h>
46 ]],[[
47 pthread_yield(0);
48 ]])],
49 [pandora_cv_pthread_yield_one_arg=yes],
50 [pandora_cv_pthread_yield_one_arg=no])])
51 AS_IF([test "$pandora_cv_pthread_yield_one_arg" = "yes"],[
52 AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
53 [pthread_yield function with one argument])
54 ])
55
56 CFLAGS="${save_CFLAGS}"
57 CXXFLAGS="${save_CXXFLAGS}"
58])
59
60
61AC_DEFUN([_PANDORA_SEARCH_PTHREAD],[
62 AC_REQUIRE([ACX_PTHREAD])
63 LIBS="${PTHREAD_LIBS} ${LIBS}"
64 AM_CFLAGS="${PTHREAD_CFLAGS} ${AM_CFLAGS}"
65 AM_CXXFLAGS="${PTHREAD_CFLAGS} ${AM_CXXFLAGS}"
66 PANDORA_PTHREAD_YIELD
67])
68
69
70AC_DEFUN([PANDORA_HAVE_PTHREAD],[
71 AC_REQUIRE([_PANDORA_SEARCH_PTHREAD])
72])
73
74AC_DEFUN([PANDORA_REQUIRE_PTHREAD],[
75 AC_REQUIRE([PANDORA_HAVE_PTHREAD])
76 AS_IF([test "x$acx_pthread_ok" != "xyes"],[
77 AC_MSG_ERROR(could not find libpthread)])
78])
079
=== added file 'm4/pandora_python3_devel.m4'
--- m4/pandora_python3_devel.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_python3_devel.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,236 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl
6dnl Copyright (C) 2009 Sun Microsystems, Inc.
7dnl Copyright (c) 2008 Sebastian Huber <sebastian-huber@web.de>
8dnl Copyright (c) 2008 Alan W. Irwin <irwin@beluga.phys.uvic.ca>
9dnl Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
10dnl Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za>
11dnl Copyright (c) 2008 Matteo Settenvini <matteo@member.fsf.org>
12dnl Copyright (c) 2008 Horst Knorr <hk_classes@knoda.org>
13dnl
14dnl This program is free software: you can redistribute it and/or modify it
15dnl under the terms of the GNU General Public License as published by the
16dnl Free Software Foundation, either version 3 of the License, or (at your
17dnl option) any later version.
18dnl
19dnl This program is distributed in the hope that it will be useful, but
20dnl WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
22dnl Public License for more details.
23dnl
24dnl You should have received a copy of the GNU General Public License along
25dnl with this program. If not, see <http://www.gnu.org/licenses/>.
26dnl
27dnl As a special exception, the respective Autoconf Macro's copyright owner
28dnl gives unlimited permission to copy, distribute and modify the configure
29dnl scripts that are the output of Autoconf when processing the Macro. You
30dnl need not follow the terms of the GNU General Public License when using
31dnl or distributing such scripts, even though portions of the text of the
32dnl Macro appear in them. The GNU General Public License (GPL) does govern
33dnl all other use of the material that constitutes the Autoconf Macro.
34dnl
35dnl This special exception to the GPL applies to versions of the Autoconf
36dnl Macro released by the Autoconf Macro Archive. When you make and
37dnl distribute a modified version of the Autoconf Macro, you may extend this
38dnl special exception to the GPL to apply to your modified version as well.
39
40dnl SYNOPSIS
41dnl
42dnl PANDORA_PYTHON3_DEVEL([version])
43dnl
44dnl DESCRIPTION
45dnl
46dnl Note: Defines as a precious variable "PYTHON3_VERSION". Don't override it
47dnl in your configure.ac.
48dnl
49dnl This macro checks for Python and tries to get the include path to
50dnl 'Python.h'. It provides the $(PYTHON3_CPPFLAGS) and $(PYTHON3_LDFLAGS)
51dnl output variables. It also exports $(PYTHON3_EXTRA_LIBS) and
52dnl $(PYTHON3_EXTRA_LDFLAGS) for embedding Python in your code.
53dnl
54dnl You can search for some particular version of Python by passing a
55dnl parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
56dnl note that you *have* to pass also an operator along with the version to
57dnl match, and pay special attention to the single quotes surrounding the
58dnl version number. Don't use "PYTHON3_VERSION" for this: that environment
59dnl variable is declared as precious and thus reserved for the end-user.
60dnl
61dnl LAST MODIFICATION
62dnl
63dnl 2009-08-23
64
65AC_DEFUN([PANDORA_PYTHON3_DEVEL],[
66 #
67 # Allow the use of a (user set) custom python version
68 #
69 AC_ARG_VAR([PYTHON3_VERSION],[The installed Python
70 version to use, for example '3.0'. This string
71 will be appended to the Python interpreter
72 canonical name.])
73
74
75 AS_IF([test -z "$PYTHON3"],[
76 AC_PATH_PROG([PYTHON3],[python[$PYTHON3_VERSION]])
77 ])
78 AS_IF([test -z "$PYTHON3"],[
79 AC_MSG_ERROR([Cannot find python$PYTHON3_VERSION in your system path])
80 PYTHON3_VERSION=""
81 ])
82
83 #
84 # if the macro parameter ``version'' is set, honour it
85 #
86 if test -n "$1"; then
87 AC_MSG_CHECKING([for a version of Python $1])
88 ac_supports_python3_ver=`$PYTHON3 -c "import sys, string; \
89 ver = string.split(sys.version)[[0]]; \
90 print(ver $1)"`
91 if test "$ac_supports_python3_ver" = "True"; then
92 AC_MSG_RESULT([yes])
93 else
94 AC_MSG_RESULT([no])
95 AC_MSG_ERROR([this package requires Python $1.
96If you have it installed, but it isn't the default Python
97interpreter in your system path, please pass the PYTHON3_VERSION
98variable to configure. See ``configure --help'' for reference.
99])
100 PYTHON_VERSION=""
101 fi
102 fi
103
104 #
105 # Check if you have distutils, else fail
106 #
107 AC_MSG_CHECKING([for Python3 distutils package])
108 ac_python3_distutils_result=`$PYTHON3 -c "import distutils" 2>&1`
109 if test -z "$ac_python3_distutils_result"; then
110 AC_MSG_RESULT([yes])
111 else
112 AC_MSG_RESULT([no])
113 AC_MSG_ERROR([cannot import Python3 module "distutils".
114Please check your Python3 installation. The error was:
115$ac_python3_distutils_result])
116 PYTHON3_VERSION=""
117 fi
118
119 #
120 # Check for Python include path
121 #
122 AC_MSG_CHECKING([for Python3 include path])
123 if test -z "$PYTHON3_CPPFLAGS"; then
124 python3_path=`$PYTHON3 -c "import distutils.sysconfig; \
125 print(distutils.sysconfig.get_python_inc());"`
126 if test -n "${python3_path}"; then
127 python3_path="-I$python3_path"
128 fi
129 PYTHON3_CPPFLAGS=$python3_path
130 fi
131 AC_MSG_RESULT([$PYTHON3_CPPFLAGS])
132 AC_SUBST([PYTHON3_CPPFLAGS])
133
134 #
135 # Check for Python library path
136 #
137 AC_MSG_CHECKING([for Python3 library path])
138 if test -z "$PYTHON3_LDFLAGS"; then
139 # (makes two attempts to ensure we've got a version number
140 # from the interpreter)
141 py3_version=`$PYTHON3 -c "from distutils.sysconfig import *; \
142 print(' '.join(get_config_vars('VERSION')))"`
143 if test "$py3_version" == "[None]"; then
144 if test -n "$PYTHON3_VERSION"; then
145 py3_version=$PYTHON3_VERSION
146 else
147 py3_version=`$PYTHON3 -c "import sys; \
148 print(sys.version[[:3]])"`
149 fi
150 fi
151
152 PYTHON3_LDFLAGS=`$PYTHON3 -c "from distutils.sysconfig import *; \
153 print('-L' + get_python_lib(0,1), \
154 '-lpython');"`$py3_version
155 fi
156 AC_MSG_RESULT([$PYTHON3_LDFLAGS])
157 AC_SUBST([PYTHON3_LDFLAGS])
158
159 #
160 # Check for site packages
161 #
162 AC_MSG_CHECKING([for Python3 site-packages path])
163 if test -z "$PYTHON3_SITE_PKG"; then
164 PYTHON3_SITE_PKG=`$PYTHON3 -c "import distutils.sysconfig; \
165 print(distutils.sysconfig.get_python_lib(0,0));"`
166 fi
167 AC_MSG_RESULT([$PYTHON3_SITE_PKG])
168 AC_SUBST([PYTHON3_SITE_PKG])
169
170 #
171 # libraries which must be linked in when embedding
172 #
173 AC_MSG_CHECKING(for Python3 embedding libraries)
174 if test -z "$PYTHON3_EMBED_LIBS"; then
175 PYTHON3_EMBED_LIBS=`$PYTHON3 -c "import distutils.sysconfig; \
176 conf = distutils.sysconfig.get_config_var; \
177 print(conf('LOCALMODLIBS'), conf('LIBS'))"`
178 fi
179 AC_MSG_RESULT([$PYTHON3_EMBED_LIBS])
180 AC_SUBST(PYTHON3_EMBED_LIBS)
181
182 #
183 # linking flags needed when embedding
184 #
185 AC_MSG_CHECKING(for Python3 embedding linking flags)
186 if test -z "$PYTHON3_EMBED_LDFLAGS"; then
187 PYTHON3_EMBED_LDFLAGS=`$PYTHON3 -c "import distutils.sysconfig; \
188 conf = distutils.sysconfig.get_config_var; \
189 print(conf('LINKFORSHARED'))"`
190 fi
191 AC_MSG_RESULT([$PYTHON3_EMBED_LDFLAGS])
192 AC_SUBST(PYTHON3_EMBED_LDFLAGS)
193
194 #
195 # final check to see if everything compiles alright
196 #
197 AC_MSG_CHECKING([for Python3 development environment consistency])
198 AC_LANG_PUSH([C])
199 # save current global flags
200 ac_save_LIBS="$LIBS"
201 ac_save_CPPFLAGS="$CPPFLAGS"
202 LIBS="$ac_save_LIBS $PYTHON3_LDFLAGS"
203 CPPFLAGS="$ac_save_CPPFLAGS $PYTHON3_CPPFLAGS"
204 AC_TRY_LINK([
205 #include <Python.h>
206 ],[
207 Py_Initialize();
208 ],[python3exists=yes],[python3exists=no])
209
210 AC_MSG_RESULT([$python3exists])
211
212 if test ! "$python3exists" = "yes"; then
213 AC_MSG_WARN([
214 Could not link test program to Python3.
215 Maybe the main Python3 library has been installed in some non-standard
216 library path. If so, pass it to configure, via the LDFLAGS environment
217 variable.
218 Example: ./configure LDFLAGS="-L/usr/non-standard-path/python3/lib"
219 ============================================================================
220 ERROR!
221 You probably have to install the development version of the Python3 package
222 for your distribution. The exact name of this package varies among them.
223 ============================================================================
224 ])
225 PYTHON3_VERSION=""
226 fi
227 AC_LANG_POP
228 # turn back to default flags
229 CPPFLAGS="$ac_save_CPPFLAGS"
230 LIBS="$ac_save_LIBS"
231
232 #
233 # all done!
234 #
235])
236
0237
=== added file 'm4/pandora_swig.m4'
--- m4/pandora_swig.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_swig.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,39 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_SWIG],[
13
14 AC_PROG_SWIG(1.3.31)
15
16 AC_DEFINE_UNQUOTED([SWIG_TYPE_TABLE],
17 [$PACKAGE],
18 [Type Table name for SWIG symbol table])
19
20 dnl Have to hard-code /usr/local/include and /usr/include into the path.
21 dnl I hate this. Why is swig sucking me
22 SWIG="$SWIG \${DEFS} -I\${top_srcdir} -I\${top_builddir} -I/usr/local/include -I/usr/include"
23 AC_SUBST([SWIG])
24
25
26])
27
28AC_DEFUN([PANDORA_SWIG_PYTHON3],[
29 AC_REQUIRE([PANDORA_SWIG])
30 AS_IF([test "x$SWIG" != "x"],[
31 AC_CACHE_CHECK([if swig supports Python3],
32 [ac_cv_swig_has_python3_],
33 [
34 AS_IF([$SWIG -python -help 2>&1 | grep py3 > /dev/null],
35 [ac_cv_swig_has_python3_=yes],
36 [ac_cv_swig_has_python3_=no])
37 ])
38 ])
39])
040
=== added file 'm4/pandora_use_pipe.m4'
--- m4/pandora_use_pipe.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_use_pipe.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,36 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11dnl
12dnl Test if we can Use -pipe to avoid making temp files during the compile.
13dnl Should speed up compile on slower disks
14
15AC_DEFUN([PANDORA_USE_PIPE],[
16
17 AS_IF([test "$GCC" = "yes"],[
18 AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [
19 AC_RUN_IFELSE([AC_LANG_SOURCE([[
20#include <stdio.h>
21
22int main(int argc, char** argv)
23{
24 (void) argc; (void) argv;
25 return 0;
26}
27 ]])],
28 [pandora_cv_use_pipe=yes],
29 [pandora_cv_use_pipe=no])
30 ])
31 AS_IF([test "$pandora_cv_use_pipe" = "yes"],[
32 AM_CFLAGS="-pipe ${AM_CFLAGS}"
33 AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}"
34 ])
35 ])
36])
037
=== modified file 'm4/pandora_vc_build.m4'
--- m4/pandora_vc_build.m4 2009-07-08 07:37:38 +0000
+++ m4/pandora_vc_build.m4 2009-09-16 09:02:26 +0000
@@ -28,5 +28,30 @@
28 ac_cv_building_from_hg=no28 ac_cv_building_from_hg=no
29 ])29 ])
3030
31 AS_IF([test -d "${srcdir}/.git"],[
32 ac_cv_building_from_git=yes
33 ac_cv_building_from_vc=yes
34 ],[
35 ac_cv_building_from_git=no
36 ])
37
38
31])39])
32 40
41dnl Takes one argument which is the prefix to append
42AC_DEFUN([PANDORA_EXPORT_BZR_INFO],[
43 m4_ifnblank($1,[
44 m4_define([PEBI_PREFIX],m4_toupper(m4_normalize($1))[_])
45 ],[
46 m4_define([PEBI_PREFIX],[])
47 ])
48
49 AC_DEFINE(PEBI_PREFIX[BZR_REVID], ["BZR_REVID"], [bzr revision ID])
50 AC_DEFINE(PEBI_PREFIX[BZR_BRANCH], ["BZR_BRANCH"], [bzr branch name])
51 AC_DEFINE(PEBI_PREFIX[RELEASE_DATE], ["RELEASE_DATE"], [Release date based on the date of the repo checkout])
52 AC_DEFINE(PEBI_PREFIX[RELEASE_VERSION], ["RELEASE_VERSION"], [$1 version number formatted for display])
53 AC_DEFINE(PEBI_PREFIX[RELEASE_COMMENT], ["RELEASE_COMMENT"], [Set to trunk if the branch is the main $1 branch])
54 AC_DEFINE(PEBI_PREFIX[RELEASE_ID], [RELEASE_ID], [$1 version number formatted for numerical comparison])
55
56])
57
3358
=== modified file 'm4/pandora_warnings.m4'
--- m4/pandora_warnings.m4 2009-07-16 02:28:54 +0000
+++ m4/pandora_warnings.m4 2009-08-10 21:04:49 +0000
@@ -206,7 +206,10 @@
206 [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])206 [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"])
207 207
208 NO_REDUNDANT_DECLS="-Wno-redundant-decls"208 NO_REDUNDANT_DECLS="-Wno-redundant-decls"
209 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow"209 dnl TODO: Figure out a better way to deal with this:
210 PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces"
211 NO_WERROR="-Wno-error"
212 INNOBASE_SKIP_WARNINGS="-Wno-shadow -Wno-cast-align"
210 213
211 ])214 ])
212 ])215 ])
@@ -247,8 +250,9 @@
247250
248 CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}"251 CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}"
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}"
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"
251 NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"254 NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED"
255 NO_WERROR="-errwarn=%none"
252256
253 ])257 ])
254258
@@ -258,5 +262,7 @@
258 AC_SUBST(NO_SHADOW)262 AC_SUBST(NO_SHADOW)
259 AC_SUBST(NO_STRICT_ALIASING)263 AC_SUBST(NO_STRICT_ALIASING)
260 AC_SUBST(PROTOSKIP_WARNINGS)264 AC_SUBST(PROTOSKIP_WARNINGS)
265 AC_SUBST(INNOBASE_SKIP_WARNINGS)
266 AC_SUBST(NO_WERROR)
261267
262])268])
263269
=== added file 'm4/pandora_with_lua.m4'
--- m4/pandora_with_lua.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_lua.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,55 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_WITH_LUA],[
13 dnl Check for lua
14 AC_ARG_WITH([lua],
15 [AS_HELP_STRING([--with-lua],
16 [Build Lua Bindings @<:@default=yes@:>@])],
17 [with_lua=$withval],
18 [with_lua=yes])
19
20 AS_IF([test "x$with_lua" != "xno"],[
21 AS_IF([test "x$with_lua" = "xyes"],
22 [LUAPC=lua],
23 [LUAPC=$with_lua])
24
25 PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
26 AC_DEFINE([HAVE_LUA], [1], [liblua])
27 AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
28 with_lua=yes
29 ],[
30 LUAPC=lua5.1
31 PKG_CHECK_MODULES([LUA], $LUAPC >= 5.1, [
32 AC_DEFINE([HAVE_LUA], [1], [liblua])
33 AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
34 with_lua=yes
35 ],[
36 AC_DEFINE([HAVE_LUA],["x"],["x"])
37 with_lua=no
38 ])
39 ])
40
41 AC_CACHE_CHECK([for LUA installation location],[pandora_cv_lua_archdir],[
42 AS_IF([test "$prefix" = "NONE"],[
43 pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${ac_default_prefix} --variable=INSTALL_CMOD ${LUAPC}`
44 ],[
45 pandora_cv_lua_archdir=`${PKG_CONFIG} --define-variable=prefix=${prefix} --variable=INSTALL_CMOD ${LUAPC}`
46 ])
47 ])
48 LUA_ARCHDIR="${pandora_cv_lua_archdir}"
49 AC_SUBST(LUA_ARCHDIR)
50 AC_SUBST(LUA_CFLAGS)
51 AC_SUBST(LUA_LIBS)
52 ])
53 AM_CONDITIONAL(BUILD_LUA, test "$with_lua" = "yes")
54
55])
056
=== added file 'm4/pandora_with_perl.m4'
--- m4/pandora_with_perl.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_perl.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,81 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12
13AC_DEFUN([PANDORA_WITH_PERL], [
14
15 AC_ARG_WITH([perl],
16 [AS_HELP_STRING([--with-perl],
17 [Build Perl Bindings @<:@default=yes@:>@])],
18 [with_perl=$withval],
19 [with_perl=yes])
20
21 AC_ARG_WITH([perl-arch],
22 [AS_HELP_STRING([--with-perl-arch],
23 [Install Perl bindings into system location @<:@default=no@:>@])],
24 [with_perl_arch=$withval],
25 [with_perl_arch=no])
26
27 AS_IF([test "x$with_perl" != "xno"],[
28 AS_IF([test "x$with_perl" != "xyes"],
29 [ac_chk_perl=$with_perl],
30 [ac_chk_perl=perl])
31 AC_CHECK_PROGS(PERL,$ac_chk_perl)
32 ])
33 AS_IF([test "x$PERL" != "x"],[
34 AC_CACHE_CHECK([for Perl include path],[pandora_cv_perl_include],[
35 pandora_cv_perl_include=`$PERL -MConfig -e 'print $Config{archlib};'`
36 pandora_cv_perl_include="${pandora_cv_perl_include}/CORE"
37 ])
38 AC_CACHE_CHECK([for Perl CPPFLAGS],[pandora_cv_perl_cppflags],[
39 pandora_cv_perl_cppflags=`$PERL -MConfig -e 'print $Config{cppflags};'`
40 pandora_cv_perl_cppflags="${pandora_cv_perl_cppflags}"
41 ])
42 PERL_CPPFLAGS="-I${pandora_cv_perl_include} ${pandora_cv_perl_cppflags}"
43
44 AC_CACHE_CHECK([for Perl development headers],
45 [pandora_cv_perl_dev],[
46
47 save_CPPFLAGS="${CPPFLAGS}"
48 CPPFLAGS="${CPPFLAGS} ${PERL_CPPFLAGS}"
49 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
50#include <math.h>
51#include <stdlib.h>
52#include "EXTERN.h"
53#include "perl.h"
54#include "XSUB.h"
55 ]])],
56 [pandora_cv_perl_dev=yes],
57 [pandora_cv_perl_dev=no])
58 CPPFLAGS="${save_CPPFLAGS}"
59 ])
60
61 AS_IF([test "${pandora_cv_perl_dev}" = "no"],
62 [with_perl=no])
63
64 AC_CACHE_CHECK([for Perl install location],
65 [pandora_cv_perl_archdir],[
66 AS_IF([test "${with_perl_arch}" = "no"],[
67 pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{sitearch}'`
68 ],[
69 pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{archlib}'`
70 ])
71 pandora_cv_perl_archdir="${pandora_cv_perl_archdir}"
72 ])
73
74 PERL_ARCHDIR="${pandora_cv_perl_archdir}"
75 ])
76 AC_SUBST([PERL_CPPFLAGS])
77 AC_SUBST([PERL_ARCHDIR])
78
79 AM_CONDITIONAL(BUILD_PERL, [test "$with_perl" != "no"])
80
81])
082
=== added file 'm4/pandora_with_php.m4'
--- m4/pandora_with_php.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_php.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,56 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12
13AC_DEFUN([PANDORA_WITH_PHP],[
14
15 AC_ARG_WITH([php],
16 [AS_HELP_STRING([--with-php],
17 [Build NDB/PHP @<:@default=no@:>@])],
18 [with_php=$withval],
19 [with_php=no])
20
21 AS_IF([test "x$with_php" != "xno"],[
22 dnl We explicitly requested PHP build. Fail on too-young SWIG.
23 AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"],
24 [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")])
25 AS_IF([test "x$with_php" != "xyes"],
26 [ac_check_php_config=$with_php],
27 [ac_check_php_config="php-config php-config5"])
28 AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config])
29 ])
30
31 AS_IF([test "x$PHP_CONFIG" != "x"],[
32 PHP_CFLAGS=`$PHP_CONFIG --includes`
33 PHP_CPPFLAGS=`$PHP_CONFIG --includes`
34 PHP_LDFLAGS=`$PHP_CONFIG --ldflags`
35 PHP_EXTDIR=`$PHP_CONFIG --extension-dir`
36 strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'`
37 PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"`
38 ],[
39 PHP_CFLAGS=
40 PHP_CPPFLAGS=
41 PHP_LDFLAGS=
42 PHP_EXTDIR=
43 PHP_ARCH_DIR=
44 with_php=no
45 ])
46
47 AC_SUBST(PHP_CFLAGS)
48 AC_SUBST(PHP_CPPFLAGS)
49 AC_SUBST(PHP_LDFLAGS)
50 AC_SUBST(PHP_EXTDIR)
51 AC_SUBST(PHP_ARCH_DIR)
52
53 AM_CONDITIONAL(BUILD_PHP, test "$with_php" = "yes")
54
55])
56
057
=== added file 'm4/pandora_with_python.m4'
--- m4/pandora_with_python.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_python.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,28 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12
13AC_DEFUN([PANDORA_WITH_PYTHON], [
14
15 AC_ARG_WITH([python],
16 [AS_HELP_STRING([--with-python],
17 [Build Python Bindings @<:@default=yes@:>@])],
18 [with_python=$withval],
19 [with_python=yes])
20
21 AS_IF([test "x$with_python" != "xno"],[
22 AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python])
23 AM_PATH_PYTHON([2.4],,[with_python="no"])
24 AC_PYTHON_DEVEL()
25 AS_IF([test "x$pythonexists" = "xno"],[with_python="no"])
26 ])
27 AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"])
28])
029
=== added file 'm4/pandora_with_python3.m4'
--- m4/pandora_with_python3.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_python3.m4 2009-09-16 09:02:26 +0000
@@ -0,0 +1,44 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_WITH_PYTHON3], [
13
14 AC_REQUIRE([PANDORA_SWIG])
15
16 AC_ARG_WITH([python3],
17 [AS_HELP_STRING([--with-python3],
18 [Build Python3 Bindings @<:@default=yes@:>@])],[
19 with_python3=$withval
20 python3_requested=yes
21 ],[
22 with_python3=yes
23 python3_requested=no
24 ])
25
26 AS_IF([test "x$ac_cv_swig_has_python3_" != "xyes"],[
27 with_python3=no
28 ],[
29 AS_IF([test "x$with_python3" != "xno"],[
30 AS_IF([test "x$with_python3" != "xyes"],
31 [PYTHON3=$with_python3],[
32 AC_PATH_PROG([PYTHON3],[python3],[no])
33 PANDORA_PYTHON3_DEVEL()
34 AS_IF([test "x$python3exists" = "xno"],[with_python="no"])
35 ])
36 ])
37 ])
38 AS_IF([test "x$with_python3" = "xno" -a "$python3_requested" = "yes"],[
39 AC_MSG_ERROR([Python3 support was explicity requested, but Python3 support
40 was not found. Please correct your build environment and try
41 again])
42 ])
43 AM_CONDITIONAL(BUILD_PYTHON3, [test "$with_python3" = "yes"])
44])
045
=== added file 'm4/pandora_with_r.m4'
--- m4/pandora_with_r.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_r.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,33 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12AC_DEFUN([PANDORA_WITH_R],[
13 dnl Check for GNU R
14 AC_ARG_WITH([r],
15 [AS_HELP_STRING([--with-r],
16 [Build R Bindings @<:@default=yes@:>@])],
17 [with_r=$withval],
18 [with_r=yes])
19
20 AS_IF([test "x$with_r" != "xno"],[
21
22 PKG_CHECK_MODULES([R], [libR], [
23 with_r=yes
24 ],[
25 with_r=no
26 ])
27
28 AC_SUBST(R_CFLAGS)
29 AC_SUBST(R_LIBS)
30 ])
31 AM_CONDITIONAL(BUILD_R, test "$with_r" = "yes")
32
33])
034
=== added file 'm4/pandora_with_ruby.m4'
--- m4/pandora_with_ruby.m4 1970-01-01 00:00:00 +0000
+++ m4/pandora_with_ruby.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,79 @@
1dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3dnl
4dnl pandora-build: A pedantic build system
5dnl Copyright (C) 2009 Sun Microsystems, Inc.
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9dnl
10dnl From Monty Taylor
11
12
13AC_DEFUN([PANDORA_WITH_RUBY], [
14
15 AC_ARG_WITH([ruby],
16 [AS_HELP_STRING([--with-ruby],
17 [Build Ruby Bindings @<:@default=yes@:>@])],
18 [with_ruby=$withval],
19 [with_ruby=ruby])
20
21 AS_IF([test "x$with_ruby" != "xno"],[
22 AS_IF([test "x$with_ruby" != "xyes"],
23 [ac_chk_ruby=$with_ruby],
24 [ac_chk_ruby=ruby1.8 ruby])
25 AC_CHECK_PROGS(RUBY,$ac_chk_ruby)
26 ])
27
28 AS_IF([test "x$RUBY" != "x"],[
29
30 AC_MSG_CHECKING(for ruby devel)
31
32 dnl need to change quotes to allow square brackets
33 changequote(<<, >>)dnl
34 ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"`
35 strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed 's/\//./g'`
36
37 RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"`
38 LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"`
39 RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"`
40 RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"`
41 RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"`
42 RUBY_INCLUDES="-I$ruby_prefix"
43 changequote([, ])dnl
44
45 ac_save_CFLAGS="$CFLAGS"
46 ac_save_CPPFLAGS="$CPPFLAGS"
47 ac_save_LDFLAGS="$LDFLAGS"
48 CFLAGS="$ac_save_CFLAGS $RUBY_INCLUDES"
49 CPPFLAGS="$ac_save_CPPFLAGS $RUBY_INCLUDES"
50 LDFLAGS="$ac_save_LDFLAGS $LIBRUBYARG_SHARED"
51
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)])
53
54 CPPFLAGS="$ac_save_CPPFLAGS"
55 CFLAGS="$ac_save_CFLAGS"
56 LDFLAGS="$ac_save_LDFLAGS"
57 ],[
58 # This allows 'make clean' in the ruby directory to work when
59 # ruby isn't available
60 RUBY=
61 RUBY_INCLUDES=
62 LIBRUBYARG_SHARED=
63 RUBY_LIB=
64 RUBY_DIR=
65 RUBY_LIBDIR=
66 RUBY_ARCH_DIR=
67 with_ruby="no"
68 ])
69
70 AC_SUBST(RUBY_INCLUDES)
71 AC_SUBST(LIBRUBYARG_SHARED)
72 AC_SUBST(RUBY_LIB)
73 AC_SUBST(RUBY_DIR)
74 AC_SUBST(RUBY_LIBDIR)
75 AC_SUBST(RUBY_ARCH_DIR)
76
77 AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"])
78 AM_CONDITIONAL(BUILD_RUBY, test "$with_ruby" = "yes")
79])
080
=== added file 'm4/pkg.m4'
--- m4/pkg.m4 1970-01-01 00:00:00 +0000
+++ m4/pkg.m4 2009-08-10 21:04:49 +0000
@@ -0,0 +1,157 @@
1# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2#
3# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18#
19# As a special exception to the GNU General Public License, if you
20# distribute this file as part of a program that contains a
21# configuration script generated by Autoconf, you may include it under
22# the same distribution terms that you use for the rest of that program.
23
24# PKG_PROG_PKG_CONFIG([MIN-VERSION])
25# ----------------------------------
26AC_DEFUN([PKG_PROG_PKG_CONFIG],
27[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
28m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
29AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
30if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
31 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
32fi
33if test -n "$PKG_CONFIG"; then
34 _pkg_min_version=m4_default([$1], [0.9.0])
35 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
36 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
37 AC_MSG_RESULT([yes])
38 else
39 AC_MSG_RESULT([no])
40 PKG_CONFIG=""
41 fi
42
43fi[]dnl
44])# PKG_PROG_PKG_CONFIG
45
46# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
47#
48# Check to see whether a particular set of modules exists. Similar
49# to PKG_CHECK_MODULES(), but does not set variables or print errors.
50#
51#
52# Similar to PKG_CHECK_MODULES, make sure that the first instance of
53# this or PKG_CHECK_MODULES is called, or make sure to call
54# PKG_CHECK_EXISTS manually
55# --------------------------------------------------------------
56AC_DEFUN([PKG_CHECK_EXISTS],
57[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
58if test -n "$PKG_CONFIG" && \
59 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
60 m4_ifval([$2], [$2], [:])
61m4_ifvaln([$3], [else
62 $3])dnl
63fi])
64
65
66# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
67# ---------------------------------------------
68m4_define([_PKG_CONFIG],
69[if test -n "$PKG_CONFIG"; then
70 if test -n "$$1"; then
71 pkg_cv_[]$1="$$1"
72 else
73 PKG_CHECK_EXISTS([$3],
74 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
75 [pkg_failed=yes])
76 fi
77else
78 pkg_failed=untried
79fi[]dnl
80])# _PKG_CONFIG
81
82# _PKG_SHORT_ERRORS_SUPPORTED
83# -----------------------------
84AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
85[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
86if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
87 _pkg_short_errors_supported=yes
88else
89 _pkg_short_errors_supported=no
90fi[]dnl
91])# _PKG_SHORT_ERRORS_SUPPORTED
92
93
94# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
95# [ACTION-IF-NOT-FOUND])
96#
97#
98# Note that if there is a possibility the first call to
99# PKG_CHECK_MODULES might not happen, you should be sure to include an
100# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
101#
102#
103# --------------------------------------------------------------
104AC_DEFUN([PKG_CHECK_MODULES],
105[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
106AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
107AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
108
109pkg_failed=no
110AC_MSG_CHECKING([for $1])
111
112_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
113_PKG_CONFIG([$1][_LIBS], [libs], [$2])
114
115m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
116and $1[]_LIBS to avoid the need to call pkg-config.
117See the pkg-config man page for more details.])
118
119if test $pkg_failed = yes; then
120 _PKG_SHORT_ERRORS_SUPPORTED
121 if test $_pkg_short_errors_supported = yes; then
122 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
123 else
124 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
125 fi
126 # Put the nasty error message in config.log where it belongs
127 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
128
129 ifelse([$4], , [AC_MSG_ERROR(dnl
130[Package requirements ($2) were not met:
131
132$$1_PKG_ERRORS
133
134Consider adjusting the PKG_CONFIG_PATH environment variable if you
135installed software in a non-standard prefix.
136
137_PKG_TEXT
138])],
139 [AC_MSG_RESULT([no])
140 $4])
141elif test $pkg_failed = untried; then
142 ifelse([$4], , [AC_MSG_FAILURE(dnl
143[The pkg-config script could not be found or is too old. Make sure it
144is in your PATH or set the PKG_CONFIG environment variable to the full
145path to pkg-config.
146
147_PKG_TEXT
148
149To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
150 [$4])
151else
152 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
153 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
154 AC_MSG_RESULT([yes])
155 ifelse([$3], , :, [$3])
156fi[]dnl
157])# PKG_CHECK_MODULES

Subscribers

People subscribed via source and target branches

to all changes: