AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+AC_C_RESTRICT
+
dnl The sasl functions should only be visible if we build with sasl support
AS_IF([test "x$ac_cv_sasl" = "xyes"],
[
dnl Which version of the canonical setup we're using
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.175])
-AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
- AC_ARG_ENABLE([fat-binaries],
- [AS_HELP_STRING([--enable-fat-binaries],
- [Enable fat binary support on OSX @<:@default=off@:>@])],
- [ac_enable_fat_binaries="$enableval"],
- [ac_enable_fat_binaries="no"])
-
- dnl Force dependency tracking on for Sun Studio builds
- AS_IF([test "x${enable_dependency_tracking}" = "x"],[
- enable_dependency_tracking=yes
- ])
- dnl If we're building OSX Fat Binaries, we have to turn off -M options
- AS_IF([test "x${ac_enable_fat_binaries}" = "xyes"],[
- enable_dependency_tracking=no
- ])
-])
-
AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[
AS_IF([test "x${prefix}" = "x"],[
AC_MSG_ERROR([--prefix requires an argument])
dnl The standard setup for how we build Pandora projects
AC_DEFUN([PANDORA_CANONICAL_TARGET],[
- AC_REQUIRE([PANDORA_FORCE_DEPEND_TRACKING])
ifdef([m4_define],,[define([m4_define], defn([define]))])
ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))])
m4_define([PCT_ALL_ARGS],[$*])
PANDORA_CHECK_C_VERSION
PANDORA_CHECK_CXX_VERSION
- AC_C_BIGENDIAN
- AC_C_CONST
- AC_C_INLINE
- AC_C_VOLATILE
- AC_C_RESTRICT
-
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_SIZE_T
PANDORA_OPTIMIZE
- AC_LANG_PUSH(C++)
- # Test whether madvise() is declared in C++ code -- it is not on some
- # systems, such as Solaris
- AC_CHECK_DECLS([madvise], [], [], [AC_INCLUDES_DEFAULT[
- #if HAVE_SYS_MMAN_H
- #include <sys/types.h>
- #include <sys/mman.h>
- #endif
- ]])
- AC_LANG_POP()
-
PANDORA_HAVE_GCC_ATOMICS
PANDORA_HEADER_ASSERT
AC_LIB_PREFIX
PANDORA_HAVE_BETTER_MALLOC
- PANDORA_WITH_VALGRIND
- AC_CHECK_PROGS([DOXYGEN], [doxygen])
AC_CHECK_PROGS([PERL], [perl])
AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for boost
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([boost],
- [AS_HELP_STRING([--disable-boost],
- [Build with boost support @<:@default=on@:>@])],
- [ac_enable_boost="$enableval"],
- [ac_enable_boost="yes"])
-
- AS_IF([test "x$ac_enable_boost" = "xyes"],[
- dnl link against libc because we're just looking for headers here
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(c,,
- [#include <boost/pool/pool.hpp>],
- [boost::pool<> test_pool(1);],
- [system])
- AC_LANG_POP()
- ],[
- ac_cv_boost="no"
- ])
-
-
- AS_IF([test "x$1" != "x"],[
- AC_CACHE_CHECK([if boost is recent enough],
- [pandora_cv_recent_boost],[
- pandora_need_boost_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d00", $[]1, $[]2 ;'`
- AS_IF([test "x${pandora_need_boost_version}" = "x000000"],[
- pandora_cv_recent_boost=yes
- ],[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <boost/version.hpp>
-
-#if BOOST_VERSION < ${pandora_need_boost_version}
-# error boost too old!
-#endif
- ]],[[]])
- ],[
- pandora_cv_recent_boost=yes
- ],[
- pandora_cv_recent_boost=no
- ])
- ])
- ])
- AS_IF([test "x${pandora_cv_recent_boost}" = "xno"],[
- ac_cv_boost=no
- ])
- ])
-
- AS_IF([test "x${ac_gcc_profile_mode}" = "xyes"],[
- AC_CACHE_CHECK([if boost is recent enough for GCC Profile Mode],
- [pandora_cv_boost_profile],[
- pandora_need_boost_version=104300
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <boost/version.hpp>
-
-#if BOOST_VERSION < ${pandora_need_boost_version}
-# error boost too old!
-#endif
- ]],[[]])
- ],[
- pandora_cv_boost_profile=yes
- ],[
- pandora_cv_boost_profile=no
- ])
- ])
- AS_IF([test "x${pandora_cv_boost_profile}" = "xyes"],[
- AC_DEFINE([BOOST_DETAIL_NO_CONTAINER_FWD],[1],[Disable forward decl of stl in boost])
- ])
- ])
-
- AM_CONDITIONAL(HAVE_BOOST, [test "x${ac_cv_boost}" = "xyes"])
-
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST],[
- _PANDORA_SEARCH_BOOST($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST],[
- PANDORA_HAVE_BOOST($1)
- AS_IF([test x$ac_cv_boost = xno],
- AC_MSG_ERROR([boost is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBCURL],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libcurl
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libcurl],
- [AS_HELP_STRING([--disable-libcurl],
- [Build with libcurl support @<:@default=on@:>@])],
- [ac_enable_libcurl="$enableval"],
- [ac_enable_libcurl="yes"])
-
- AS_IF([test "x$ac_enable_libcurl" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(curl,,
- [#include <curl/curl.h>],
- [
- CURL *handle;
- handle=curl_easy_init();
- ])
- ],[
- ac_cv_libcurl="no"
- ])
-
- AC_CACHE_CHECK([if libcurl has CURLOPT_USERNAME],
- [pandora_cv_curl_have_username],[
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM(
- [[
- CURL *handle;
- handle=curl_easy_init();
- rv= curl_easy_setopt(curl_handle, CURLOPT_USERNAME, "foo");
- ]])],
- [pandora_cv_curl_have_username=yes],
- [pandora_cv_curl_have_username=no])
- ])
-
- AM_CONDITIONAL(HAVE_LIBCURL,[test "x${ac_cv_libcurl}" = "xyes"])
- AS_IF([test "x$pandora_cv_curl_have_username" = "xyes"],
- AC_DEFINE([HAVE_CURLOPT_USERNAME],[1],
- [Does libcurl provide the CURLOPT_USERNAME constant]))
-
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBCURL],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBCURL])
- AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
- AC_MSG_WARN([libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel.])
- ])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBCURL],[
- PANDORA_HAVE_LIBCURL($1)
- AS_IF([test "x${ac_cv_libcurl}" = "xno"],[
- AC_MSG_ERROR([libcurl is required for ${PACKAGE}])
- ])
-])
+++ /dev/null
-dnl Copyright (C) 2010 NorthScale
-dnl This file is free software; NorthScale
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBHASHKIT],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libhashkit
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libhashkit],
- [AS_HELP_STRING([--disable-libhashkit],
- [Build with libhashkit support @<:@default=on@:>@])],
- [ac_enable_libhashkit="$enableval"],
- [ac_enable_libhashkit="yes"])
-
- AS_IF([test "x$ac_enable_libhashkit" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(hashkit,,[
- #include <libhashkit/hashkit.h>
- ],[
- hashkit_st foo;
- hashkit_st *kit = hashkit_create(&foo);
- hashkit_free(kit);
- ])
- ],[
- ac_cv_libhashkit="no"
- ])
-
- AM_CONDITIONAL(HAVE_LIBHASHKIT, [test "x${ac_cv_libhashkit}" = "xyes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBHASHKIT],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBHASHKIT])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBHASHKIT],[
- AC_REQUIRE([PANDORA_HAVE_LIBHASHKIT])
- AS_IF([test x$ac_cv_libhashkit = xno],
- AC_MSG_ERROR([libhashkit is required for ${PACKAGE}]))
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_LIBMEMCACHED],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libmemcached
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libmemcached],
- [AS_HELP_STRING([--disable-libmemcached],
- [Build with libmemcached support @<:@default=on@:>@])],
- [ac_enable_libmemcached="$enableval"],
- [ac_enable_libmemcached="yes"])
-
- AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(memcached,,[
- #include <libmemcached/memcached.h>
- ],[
- memcached_st memc;
- memcached_dump_func *df;
- memcached_lib_version();
- ])
- ],[
- ac_cv_libmemcached="no"
- ])
-
- AS_IF([test "x$ac_enable_libmemcached" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(memcachedprotocol,,[
- #include <libmemcached/protocol_handler.h>
- ],[
- struct memcached_protocol_st *protocol_handle;
- protocol_handle= memcached_protocol_create_instance();
- ])
- ],[
- ac_cv_libmemcachedprotocol="no"
- ])
-
- AC_CACHE_CHECK([if libmemcached has memcached_server_fn],
- [pandora_cv_libmemcached_server_fn],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <libmemcached/memcached.h>
-memcached_server_fn callbacks[1];
- ]])],
- [pandora_cv_libmemcached_server_fn=yes],
- [pandora_cv_libmemcached_server_fn=no])])
-
- AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
- AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
- ])
-])
-
-AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
-
- AC_CACHE_CHECK([if libmemcached is recent enough],
- [pandora_cv_recent_libmemcached],[
- AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
- pandora_cv_recent_libmemcached=no
- ],[
- AS_IF([test "x$1" != "x"],[
- pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
- AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
- pandora_cv_recent_libmemcached=yes
- ],[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <libmemcached/configure.h>
-
-#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
-# error libmemcached too old!
-#endif
- ]],[[]])
- ],[
- pandora_cv_recent_libmemcached=yes
- ],[
- pandora_cv_recent_libmemcached=no
- ])
- ])
- ],[
- pandora_cv_recent_libmemcached=yes
- ])
- ])
- ])
-
- AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
-
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
- _PANDORA_RECENT_LIBMEMCACHED($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
- PANDORA_HAVE_LIBMEMCACHED($1)
- AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
- AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
- PANDORA_HAVE_LIBMEMCACHED($1)
- AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
- AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Provides support for finding libtokyocabinet.
-dnl LIBTOKYOCABINET_CFLAGS will be set, in addition to LIBTOKYOCABINET and LTLIBTOKYOCABINET
-
-AC_DEFUN([_PANDORA_SEARCH_LIBTOKYOCABINET],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libtokyocabinet
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libtokyocabinet],
- [AS_HELP_STRING([--disable-libtokyocabinet],
- [Build with libtokyocabinet support @<:@default=on@:>@])],
- [ac_enable_libtokyocabinet="$enableval"],
- [ac_enable_libtokyocabinet="yes"])
-
- AS_IF([test "x$ac_enable_libtokyocabinet" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(tokyocabinet,,[
-#include <tcutil.h>
-#include <tcadb.h>
- ],[
-const char *test= tcversion;
-bool ret= tcadboptimize(NULL, "params");
- ])
- ],[
- ac_cv_libtokyocabinet="no"
- ])
-
- AS_IF([test "${ac_cv_libtokyocabinet}" = "no" -a "${ac_enable_libtokyocabinet}" = "yes"],[
-
- PKG_CHECK_MODULES([LIBTOKYOCABINET], [libtokyocabinet >= 1.4.15], [
- ac_cv_libtokyocabinet=yes
- LTLIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
- LIBTOKYOCABINET=${LIBTOKYOCABINET_LIBS}
- ],[test x = y])
- ])
-
- AM_CONDITIONAL(HAVE_LIBTOKYOCABINET, [test "${ac_cv_libtokyocabinet}" = "yes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBTOKYOCABINET],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBTOKYOCABINET],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBTOKYOCABINET])
- AS_IF([test "x${ac_cv_libtokyocabinet}" = "xno"],
- AC_MSG_ERROR([libtokyocabinet is required for ${PACKAGE}. On Debian systems this is found in libtokyocabinet-dev. On RedHat, in tokyocabinet-devel.]))
-])
+++ /dev/null
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems, Inc.
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Provides support for finding libxml2.
-dnl LIBXML2_CFLAGS will be set, in addition to LIBXML2 and LTLIBXML2
-
-AC_DEFUN([_PANDORA_SEARCH_LIBXML2],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for libxml2
- dnl --------------------------------------------------------------------
-
- AC_ARG_ENABLE([libxml2],
- [AS_HELP_STRING([--disable-libxml2],
- [Build with libxml2 support @<:@default=on@:>@])],
- [ac_enable_libxml2="$enableval"],
- [ac_enable_libxml2="yes"])
-
- AS_IF([test "x$ac_enable_libxml2" = "xyes"],[
- AC_LIB_HAVE_LINKFLAGS(xml2,,[
-#include <libxml/xmlversion.h>
- ],[
-const char *test= LIBXML_DOTTED_VERSION;
- ])
- ],[
- ac_cv_libxml2="no"
- ])
-
- AS_IF([test "${ac_cv_libxml2}" = "no" -a "${ac_enable_libxml2}" = "yes"],[
-
- PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], [
- ac_cv_libxml2=yes
- LTLIBXML2=${LIBXML2_LIBS}
- LIBXML2=${LIBXML2_LIBS}
- ],[])
- ])
-
- AM_CONDITIONAL(HAVE_LIBXML2, [test "${ac_cv_libxml2}" = "yes"])
-])
-
-AC_DEFUN([PANDORA_HAVE_LIBXML2],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
-])
-
-AC_DEFUN([PANDORA_REQUIRE_LIBXML2],[
- AC_REQUIRE([_PANDORA_SEARCH_LIBXML2])
- AS_IF([test "x${ac_cv_libxml2}" = "xno"],
- AC_MSG_ERROR([libxml2 is required for ${PACKAGE}. On Debian systems this is found in libxml2-dev. On RedHat, libxml2-devel.]))
-])
+++ /dev/null
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_PERL], [
-
- AC_ARG_WITH([perl],
- [AS_HELP_STRING([--with-perl],
- [Build Perl Bindings @<:@default=yes@:>@])],
- [with_perl=$withval],
- [with_perl=yes])
-
- AC_ARG_WITH([perl-arch],
- [AS_HELP_STRING([--with-perl-arch],
- [Install Perl bindings into system location @<:@default=no@:>@])],
- [with_perl_arch=$withval],
- [with_perl_arch=no])
-
- AS_IF([test "x$with_perl" != "xno"],[
- AS_IF([test "x$with_perl" != "xyes"],
- [ac_chk_perl=$with_perl],
- [ac_chk_perl=perl])
- AC_CHECK_PROGS(PERL,$ac_chk_perl)
- ])
- AS_IF([test "x$PERL" != "x"],[
- AC_CACHE_CHECK([for Perl include path],[pandora_cv_perl_include],[
- pandora_cv_perl_include=`$PERL -MConfig -e 'print $Config{archlib};'`
- pandora_cv_perl_include="${pandora_cv_perl_include}/CORE"
- ])
- AC_CACHE_CHECK([for Perl CPPFLAGS],[pandora_cv_perl_cppflags],[
- pandora_cv_perl_cppflags=`$PERL -MConfig -e 'print $Config{cppflags};'`
- pandora_cv_perl_cppflags="${pandora_cv_perl_cppflags}"
- ])
- PERL_CPPFLAGS="-I${pandora_cv_perl_include} ${pandora_cv_perl_cppflags}"
-
- AC_CACHE_CHECK([for Perl development headers],
- [pandora_cv_perl_dev],[
-
- save_CPPFLAGS="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} ${PERL_CPPFLAGS}"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <math.h>
-#include <stdlib.h>
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
- ]])],
- [pandora_cv_perl_dev=yes],
- [pandora_cv_perl_dev=no])
- CPPFLAGS="${save_CPPFLAGS}"
- ])
-
- AS_IF([test "${pandora_cv_perl_dev}" = "no"],
- [with_perl=no])
-
- AC_CACHE_CHECK([for Perl install location],
- [pandora_cv_perl_archdir],[
- AS_IF([test "${with_perl_arch}" = "no"],[
- pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{sitearch}'`
- ],[
- pandora_cv_perl_archdir=`$PERL -MConfig -e 'print $Config{archlib}'`
- ])
- pandora_cv_perl_archdir="${pandora_cv_perl_archdir}"
- ])
-
- PERL_ARCHDIR="${pandora_cv_perl_archdir}"
- ])
- AC_SUBST([PERL_CPPFLAGS])
- AC_SUBST([PERL_ARCHDIR])
-
- AM_CONDITIONAL(BUILD_PERL, [test "$with_perl" != "no"])
-
-])
+++ /dev/null
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_PHP],[
-
- AC_ARG_WITH([php],
- [AS_HELP_STRING([--with-php],
- [Build NDB/PHP @<:@default=no@:>@])],
- [with_php=$withval],
- [with_php=no])
-
- AS_IF([test "x$with_php" != "xno"],[
- dnl We explicitly requested PHP build. Fail on too-young SWIG.
- AS_IF([test "x$SWIG_CAN_BUILD_PHP" != "xyes"],
- [AC_MSG_ERROR("Your version of SWIG is too young to build NDB/PHP. >=1.3.33 is required!")])
- AS_IF([test "x$with_php" != "xyes"],
- [ac_check_php_config=$with_php],
- [ac_check_php_config="php-config php-config5"])
- AC_CHECK_PROGS(PHP_CONFIG, [$ac_check_php_config])
- ])
-
- AS_IF([test "x$PHP_CONFIG" != "x"],[
- PHP_CFLAGS=`$PHP_CONFIG --includes`
- PHP_CPPFLAGS=`$PHP_CONFIG --includes`
- PHP_LDFLAGS=`$PHP_CONFIG --ldflags`
- PHP_EXTDIR=`$PHP_CONFIG --extension-dir`
- strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'`
- PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"`
- ],[
- PHP_CFLAGS=
- PHP_CPPFLAGS=
- PHP_LDFLAGS=
- PHP_EXTDIR=
- PHP_ARCH_DIR=
- with_php=no
- ])
-
- AC_SUBST(PHP_CFLAGS)
- AC_SUBST(PHP_CPPFLAGS)
- AC_SUBST(PHP_LDFLAGS)
- AC_SUBST(PHP_EXTDIR)
- AC_SUBST(PHP_ARCH_DIR)
-
- AM_CONDITIONAL(BUILD_PHP, test "$with_php" = "yes")
-
-])
-
+++ /dev/null
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-AC_DEFUN([PANDORA_WITH_PYTHON3], [
-
- AC_REQUIRE([PANDORA_SWIG])
-
- AC_ARG_WITH([python3],
- [AS_HELP_STRING([--with-python3],
- [Build Python3 Bindings @<:@default=yes@:>@])],[
- with_python3=$withval
- python3_requested=$withval
- ],[
- with_python3=yes
- python3_requested=no
- ])
-
- AS_IF([test "x$ac_cv_swig_has_python3_" != "xyes"],[
- with_python3=no
- ],[
- AS_IF([test "x$with_python3" != "xno"],[
- AS_IF([test "x$with_python3" != "xyes"],
- [PYTHON3=$with_python3],[
- AC_PATH_PROG([PYTHON3],[python3],[no])
- PANDORA_PYTHON3_DEVEL()
- AS_IF([test "x$python3exists" = "xno"],[with_python="no"])
- ])
- ])
- ])
- AS_IF([test "x$with_python3" = "xno" -a "$python3_requested" = "yes"],[
- AC_MSG_ERROR([Python3 support was explicity requested, but Python3 support
- was not found. Please correct your build environment and try
- again])
- ])
- AM_CONDITIONAL(BUILD_PYTHON3, [test "$with_python3" = "yes"])
-])
+++ /dev/null
-dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
-dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
-dnl
-dnl pandora-build: A pedantic build system
-dnl Copyright (C) 2009 Sun Microsystems, Inc.
-dnl This file is free software; Sun Microsystems
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl From Monty Taylor
-
-
-AC_DEFUN([PANDORA_WITH_RUBY], [
-
- AC_ARG_WITH([ruby],
- [AS_HELP_STRING([--with-ruby],
- [Build Ruby Bindings @<:@default=yes@:>@])],
- [with_ruby=$withval],
- [with_ruby=ruby])
-
- AS_IF([test "x$with_ruby" != "xno"],[
- AS_IF([test "x$with_ruby" != "xyes"],
- [ac_chk_ruby=$with_ruby],
- [ac_chk_ruby=ruby1.8 ruby])
- AC_CHECK_PROGS(RUBY,$ac_chk_ruby)
- ])
-
- AS_IF([test "x$RUBY" != "x"],[
-
- AC_MSG_CHECKING(for ruby devel)
-
- dnl need to change quotes to allow square brackets
- changequote(<<, >>)dnl
- ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"`
- strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed 's/\//./g'`
-
- RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"`
- LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"`
- RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"`
- RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"`
- RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"`
- RUBY_INCLUDES="-I$ruby_prefix"
- changequote([, ])dnl
-
- ac_save_CFLAGS="$CFLAGS"
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LDFLAGS="$LDFLAGS"
- CFLAGS="$ac_save_CFLAGS $RUBY_INCLUDES"
- CPPFLAGS="$ac_save_CPPFLAGS $RUBY_INCLUDES"
- LDFLAGS="$ac_save_LDFLAGS $LIBRUBYARG_SHARED"
-
- 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)])
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- CFLAGS="$ac_save_CFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
- ],[
- # This allows 'make clean' in the ruby directory to work when
- # ruby isn't available
- RUBY=
- RUBY_INCLUDES=
- LIBRUBYARG_SHARED=
- RUBY_LIB=
- RUBY_DIR=
- RUBY_LIBDIR=
- RUBY_ARCH_DIR=
- with_ruby="no"
- ])
-
- AC_SUBST(RUBY_INCLUDES)
- AC_SUBST(LIBRUBYARG_SHARED)
- AC_SUBST(RUBY_LIB)
- AC_SUBST(RUBY_DIR)
- AC_SUBST(RUBY_LIBDIR)
- AC_SUBST(RUBY_ARCH_DIR)
-
- AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"])
- AM_CONDITIONAL(BUILD_RUBY, test "$with_ruby" = "yes")
-])
+++ /dev/null
-dnl Copyright (C) 2010 Brian Aker
-dnl This file is free software; Brian Aker
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([PANDORA_WITH_VALGRIND],[
-
- AC_ARG_WITH([valgrind],
- [AS_HELP_STRING([--with-valgrind],
- [Add additional valgrind code for testing with valgrind.])],
- [with_valgrind=yes],
- [with_valgrind=no])
- AM_CONDITIONAL(HAVE_VALGRIND,[test "x${with_valgrind}" = "xyes"])
- AS_IF([test "x$with_valgrind" = "xyes"],
- AC_DEFINE([HAVE_VALGRIND],[1],
- [Add additional valgrind code for testing with valgrind.]))
-])