version = 0.4.2
template = pandora-build
project-type = library
-pandora-version = 0.171
+pandora-version = 0.174
#!/usr/bin/python
# Copyright (C) 2009 Sun Microsystems, Inc.
+# Copyright (C) 2010, 2011 Monty Taylor
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
noinst_HEADERS=
nobase_include_HEADERS=
+nobase_pkginclude_HEADERS=
check_PROGRAMS=
noinst_LTLIBRARIES=
bin_PROGRAMS=
if plugin['headers'] != "":
plugin_file.write("noinst_HEADERS += %(headers)s\n" % plugin)
if plugin['install_headers'] != "":
- plugin_file.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
+ plugin_file.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
if plugin['testsuite']:
if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
plugin_file.write("EXTRA_DIST += %(testsuitedir)s\n" % plugin)
%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
%(libname)s_la_LIBADD=%(libs)s
%(libname)s_la_DEPENDENCIES=%(libs)s
-%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
+%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s %(cppflags)s
%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
%(libname)s_la_SOURCES=%(sources)s
write_plugin_ac(plugin, plugin_ac_file)
write_plugin_am(plugin, plugin_am_file)
- write_plugin_docs(plugin, plugin_doc_index)
+ write_plugin_docs(plugin, plugin_doc_index, plugin_am_file)
plugin['writing_status'] = 'done'
-def write_plugin_docs(plugin, doc_index):
+def write_plugin_docs(plugin, doc_index, plugin_am):
if plugin['docs'] is not None and os.path.isdir("docs/plugins"):
if not os.path.exists(os.path.join("docs/plugins",plugin["name"])):
os.symlink(os.path.abspath(plugin["docs"]), os.path.join("docs/plugins",plugin["name"]))
doc_index.write("""
%(name)s/index""" % plugin)
+ plugin_am.write("""
+EXTRA_DIST+=${top_srcdir}/docs/plugins/%(name)s/*.rst
+""" % plugin)
def write_plugin_ac(plugin, plugin_ac):
#
with_%(name)s_plugin="%(enabled)s"
requested_%(name)s_plugin="no"
])
+AC_ARG_WITH([static-%(name_with_dashes)s-plugin],[
+AS_HELP_STRING([--with-static-%(name_with_dashes)s-plugin],[Build Archive Storage Engine. @<:@default=%(static_yesno)s@:>@])
+AS_HELP_STRING([--without-static-%(name_with_dashes)s-plugin],[Disable building Archive Storage Engine])
+ ],[
+ with_static_%(name)s_plugin=${withval}
+ ],[
+ with_static_%(name)s_plugin=%(static_yesno)s
+])
+AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
+ shared_%(name)s_plugin=no
+ ],[
+ shared_%(name)s_plugin=yes
+])
AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
dnl indented wierd to make the help output correct
AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Enable loading %(title)s by default. @<:@default=%(default_yesno)s@:>@])
""" % plugin)
if not plugin['unconditional']:
plugin_ac.write("""
+AM_CONDITIONAL([%(static_build_conditional_tag)s],
+ [test %(build_conditional)s -a ! %(shared_build)s])
+AM_CONDITIONAL([%(shared_build_conditional_tag)s],
+ [test %(build_conditional)s -a %(shared_build)s])
AM_CONDITIONAL([%(build_conditional_tag)s],
[test %(build_conditional)s])
""" % plugin)
plugin_ac.write("""
-AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
- [
+AS_IF([test "x$with_%(name)s_plugin" = "xyes"],[
""" % plugin)
if plugin['testsuite']:
plugin_ac.write("""
pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
""" % plugin)
- if plugin['static']:
- plugin_ac.write("""
+ plugin_ac.write("""
+ AS_IF([test "x${with_static_%(name)s_plugin}" = "xyes" -o "x${with_all_static}" = "xyes"],[
+
AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
pandora_builtin_load_list="%(module_name)s,${pandora_builtin_load_list}"
pandora_builtin_load_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_load_symbols_list}"
pandora_builtin_list="%(module_name)s,${pandora_builtin_list}"
pandora_builtin_symbols_list="_drizzled_%(module_name)s_plugin_,${pandora_builtin_symbols_list}"
pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/%(root_plugin_dir)s/%(libname)s.la"
- """ % plugin)
-
- else:
- plugin_ac.write("""
+ ],[
AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
])
+ ])
""" % plugin)
- plugin_ac.write(" ])\n")
+ plugin_ac.write("])\n")
def fix_file_paths(plugin, files):
# TODO: determine path to plugin dir relative to top_srcdir... append it to
plugin['extra_dist']=" ".join([os.path.join(plugin['rel_path'],f) for f in plugin['extra_dist'].split()])
+ if plugin['static']:
+ plugin['static_yesno']="yes"
+ else:
+ plugin['static_yesno']="no"
plugin['build_conditional_tag']= "BUILD_%s_PLUGIN" % plugin['name'].upper()
+ plugin['shared_build_conditional_tag']= "BUILD_%s_PLUGIN_SHARED" % plugin['name'].upper()
+ plugin['static_build_conditional_tag']= "BUILD_%s_PLUGIN_STATIC" % plugin['name'].upper()
plugin['name_with_dashes']= plugin['name'].replace('_','-')
if plugin.has_key('build_conditional'):
plugin['has_build_conditional']=True
else:
plugin['has_build_conditional']=False
plugin['build_conditional']='"x${with_%(name)s_plugin}" = "xyes"' %plugin
+ plugin['shared_build']='"x${shared_%(name)s_plugin}" = "xyes"' %plugin
if plugin['install']:
plugin['library_type']= 'pkgplugin'
if plugin['headers'] != "":
plugin_am.write("noinst_HEADERS += %(headers)s\n" % plugin)
if plugin['install_headers'] != "":
- plugin_am.write("nobase_include_HEADERS += %(install_headers)s\n" % plugin)
+ plugin_am.write("nobase_pkginclude_HEADERS += %(install_headers)s\n" % plugin)
if plugin['testsuite']:
if plugin.has_key('testsuitedir') and plugin['testsuitedir'] != "":
plugin_am.write("EXTRA_DIST += %(rel_path)s/%(testsuitedir)s\n" % plugin)
plugin_am.write("EXTRA_DIST += %(rel_path)s/%(dist_testsuite)s\n" % plugin)
if plugin['docs'] is not None:
plugin_am.write("EXTRA_DIST += ${top_srcdir}/%(rel_path)s/docs/*.rst\n" % plugin)
- if plugin['static']:
- plugin_am.write("""
+ plugin_am.write("""
%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
-EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
+# Include sources in EXTRA_DIST because we might not build this, but we
+# still want the sources to wind up in a tarball
+EXTRA_DIST += %(rel_path)s/plugin.ini %(sources)s
+if %(static_build_conditional_tag)s
noinst_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
%(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
%(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
%(root_plugin_dir)s_%(libname)s_la_LDFLAGS=$(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
- %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
+ %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
%(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
%(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
%(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
check_PROGRAMS += %(tests)s
PANDORA_DYNAMIC_LDADDS+=${top_builddir}/%(root_plugin_dir)s/%(libname)s.la
endif
-""" % plugin)
- else:
- plugin_am.write("""
-%(root_plugin_dir)s_%(plugin_prefix)s%(name)s_dir=${top_srcdir}/%(rel_path)s
EXTRA_DIST += %(rel_path)s/plugin.ini
-if %(build_conditional_tag)s
+if %(shared_build_conditional_tag)s
%(library_type)s_LTLIBRARIES+=%(root_plugin_dir)s/%(libname)s.la
%(root_plugin_dir)s_%(libname)s_la_LDFLAGS=-avoid-version -rpath $(pkgplugindir) $(AM_LDFLAGS) %(ldflags)s $(GCOV_LIBS)
%(root_plugin_dir)s_%(libname)s_la_LIBADD=%(libs)s
%(root_plugin_dir)s_%(libname)s_la_DEPENDENCIES=%(libs)s
- %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='"%(author)s"' -DPANDORA_MODULE_TITLE='"%(title)s"' -DPANDORA_MODULE_VERSION='"%(version)s"' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='"%(dependencies)s"' %(cppflags)s
+ %(root_plugin_dir)s_%(libname)s_la_CPPFLAGS=$(AM_CPPFLAGS) -DPANDORA_DYNAMIC_PLUGIN -DPANDORA_MODULE_NAME=%(module_name)s -DPANDORA_MODULE_AUTHOR='%(author)s' -DPANDORA_MODULE_TITLE='%(title)s' -DPANDORA_MODULE_VERSION='%(version)s' -DPANDORA_MODULE_LICENSE=%(license)s -DPANDORA_MODULE_DEPENDENCIES='%(dependencies)s' %(cppflags)s
%(root_plugin_dir)s_%(libname)s_la_CXXFLAGS=$(AM_CXXFLAGS) %(cxxflags)s
%(root_plugin_dir)s_%(libname)s_la_CFLAGS=$(AM_CFLAGS) %(cflags)s
%(root_plugin_dir)s_%(libname)s_la_SOURCES=%(sources)s
if not os.path.exists("config/pandora-plugin.ac") or "write" in actions:
plugin_ac_file = ChangeProtectedFile(os.path.join('config', 'pandora-plugin.ac'))
plugin_ac_file.write("dnl Generated file, run make to rebuild\n")
+ plugin_ac_file.write("""
+AC_ARG_WITH([all-static],[
+AS_HELP_STRING([--with-all-static],[Link all plugins staticly into the server @<:@default=no@:>@])
+],[
+ with_all_static="$withval"
+ ],[
+ with_all_static=no
+])
+ """)
if os.path.exists("docs/plugins"):
if not os.path.exists("docs/plugins/list.rst") or "write" in actions:
dnl with or without modifications, as long as this notice is preserved.
dnl Which version of the canonical setup we're using
-AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171])
+AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.174])
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
AC_ARG_ENABLE([fat-binaries],
vc_changelog=yes
])
m4_if(PCT_VERSION_FROM_VC,yes,[
- PANDORA_VC_VERSION
+ PANDORA_VC_INFO_HEADER
],[
PANDORA_TEST_VC_DIR
AC_LIB_PREFIX
PANDORA_HAVE_BETTER_MALLOC
+ PANDORA_WITH_VALGRIND
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AC_CHECK_PROGS([PERL], [perl])
#error "You should include config.h as your first include file"
#endif
+#include <config/top.h>
])
mkdir -p config
cat > config/top.h.stamp <<EOF_CONFIG_TOP
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# We check two things: where the include file is for cinttypes. We
# include AC_TRY_COMPILE for all the combinations we've seen in the
# wild. We define one of HAVE_CINTTYPES or HAVE_TR1_CINTTYPES or
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# We check two things: where the include file is for cstdint. We
# include AC_TRY_COMPILE for all the combinations we've seen in the
# wild. We define one of HAVE_CSTDINT or HAVE_TR1_CSTDINT or
--- /dev/null
+dnl Copyright (C) 2011 Andrew Hutchings
+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.
+
+#--------------------------------------------------------------------
+# Check for libaio
+#--------------------------------------------------------------------
+
+
+AC_DEFUN([_PANDORA_SEARCH_LIBAIO],[
+ AC_REQUIRE([AC_LIB_PREFIX])
+
+ AC_CHECK_HEADERS(libaio.h)
+ AC_LIB_HAVE_LINKFLAGS(aio,,
+ [
+ #include <libaio.h>
+ ],
+ [
+ int aio_cmd= IO_CMD_PREAD;
+ ])
+
+ AM_CONDITIONAL(HAVE_LIBAIO, [test "x${ac_cv_libaio}" = "xyes"])
+
+ AS_IF([test "x${ac_cv_libaio}" = "xyes"],[
+ AC_DEFINE([LINUX_NATIVE_AIO], [1], [Enabel libaio support in InnoDB])
+ ])
+])
+
+AC_DEFUN([_PANDORA_HAVE_LIBAIO],[
+
+ AC_ARG_ENABLE([libaio],
+ [AS_HELP_STRING([--disable-libaio],
+ [Build with libaio support @<:@default=on@:>@])],
+ [ac_enable_libaio="$enableval"],
+ [ac_enable_libaio="yes"])
+
+ _PANDORA_SEARCH_LIBAIO
+])
+
+
+AC_DEFUN([PANDORA_HAVE_LIBAIO],[
+ AC_REQUIRE([_PANDORA_HAVE_LIBAIO])
+])
+
+AC_DEFUN([_PANDORA_REQUIRE_LIBAIO],[
+ ac_enable_libaio="yes"
+ _PANDORA_SEARCH_LIBAIO
+ AS_IF([test "x$ac_cv_header_libaio_h" = "xno"],[
+ AC_MSG_ERROR([Couldn't find libaio.h. On Debian this can be found in libaio-dev. On Redhat this can be found in libaio-devel.])
+ ])
+])
+
+AC_DEFUN([PANDORA_REQUIRE_LIBAIO],[
+ AC_REQUIRE([_PANDORA_REQUIRE_LIBAIO])
+])
AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
[test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
+ AC_DEFINE([BOOST_FILESYSTEM_DEPRECATED], [1],
+ [Use the v2 interface until we can stop using old versions])
AC_SUBST(BOOST_LIBS)
])
--- /dev/null
+dnl Copyright (C) 2011 Andrew Hutchings
+dnl This file is free software; Andrew Hutchings
+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_TEST],[
+ AC_REQUIRE([AC_LIB_PREFIX])
+
+ dnl --------------------------------------------------------------------
+ dnl Check for boost::test
+ dnl --------------------------------------------------------------------
+
+ AC_LANG_PUSH(C++)
+ AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework-mt,,[
+ #include <boost/test/unit_test.hpp>
+ ],[
+ boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
+ ])
+ AS_IF([test "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],[
+ AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework,,[
+ #include <boost/test/unit_test.hpp>
+ ],[
+ boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
+ ])
+ ])
+ AC_LANG_POP()
+
+ AM_CONDITIONAL(HAVE_BOOST_TEST,
+ [test "x${ac_cv_libboost_unit_test_framework}" = "xyes" -o "x${ac_cv_libboost_unit_test_framework_mt}" = "xyes"])
+ BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_TEST_MT} ${LTLIBBOOST_TEST}"
+ AC_SUBST(BOOST_LIBS)
+])
+
+AC_DEFUN([PANDORA_HAVE_BOOST_TEST],[
+ PANDORA_HAVE_BOOST($1)
+ _PANDORA_SEARCH_BOOST_TEST($1)
+])
+
+AC_DEFUN([PANDORA_REQUIRE_BOOST_TEST],[
+ PANDORA_REQUIRE_BOOST($1)
+ _PANDORA_SEARCH_BOOST_TEST($1)
+ AS_IF([test "x${ac_cv_libboost_unit_test_framework}" = "xno" -a "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],
+ AC_MSG_ERROR([boost::test is required for ${PACKAGE}]))
+])
+
AC_LIB_HAVE_LINKFLAGS(haildb,,[
#include <haildb.h>
],[
- ib_set_panic_handler(NULL);
+ ib_update_table_statistics(NULL);
])
AS_IF([test "x${ac_cv_libhaildb}" = "xyes"],[
AC_DEFINE([HAVE_HAILDB_H],[1],[Do we have haildb.h])
AC_DEFUN([PANDORA_REQUIRE_LIBHAILDB],[
AC_REQUIRE([PANDORA_HAVE_LIBHAILDB])
AS_IF([test "x${ac_cv_libhaildb}" = "xno"],
- AC_MSG_ERROR([libhaildb 2.2.0 or later is required for ${PACKAGE}]))
+ AC_MSG_ERROR([libhaildb 2.3.2 or later is required for ${PACKAGE}]))
])
ac_enable_libuuid="yes"
_PANDORA_SEARCH_LIBUUID
AS_IF([test "x$ac_cv_header_uuid_uuid_h" = "xno"],[
- AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On Redhat this can be found in e2fsprogs-devel.])
+ AC_MSG_ERROR([Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.])
])
])
dnl get called probably during autoconf too, so it's important to protect
dnl with test -f ... if the files exist, we don't have the chicken/egg
dnl problem and therefore don't need to do anything here
- m4_syscmd([python config/pandora-plugin > /dev/null])
+ m4_syscmd([PYTHON=${PYTHON:-python} && $PYTHON config/pandora-plugin > /dev/null])
m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
m4_sinclude(config/pandora-plugin.ac)
+# Copyright (C) 2008 Sun Microsystems, Inc.
+# This file is free software; Sun Microsystems, Inc.
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
# We check two things: where the include file is for unordered_map, and
# what namespace unordered_map lives in within that include file. We
# include AC_COMPILE_IFELSE for all the combinations we've seen in the
PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
PANDORA_VC_BRANCH=`bzr nick`
+ PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
if test "x${vc_changelog}" = "xyes"; then
bzr log --gnu > ChangeLog
fi
PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
PANDORA_VC_REVID=${PANDORA_VC_REVID}
PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
+PANDORA_VC_TAG=${PANDORA_VC_TAG}
PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
EOF
_PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo)
_PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH],
${srcdir}/config/pandora_vc_revinfo)
+ _PANDORA_READ_FROM_FILE([PANDORA_VC_TAG],
+ ${srcdir}/config/pandora_vc_revinfo)
_PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
${srcdir}/config/pandora_vc_revinfo)
_PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
PANDORA_RELEASE_COMMENT="trunk"
])
- PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
+ AS_IF([test "x${PANDORA_VC_TAG}" = "x"],[
+ PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
+ ],[
+ PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
+ ])
PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
VERSION="${PANDORA_RELEASE_VERSION}"
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
- [],
- [gl_cv_cc_visibility=yes],
- [gl_cv_cc_visibility=no])
+ [],[
+ case "$host_os" in
+ *darwin*)
+ gl_cv_cc_visibility=no
+ ;;
+ *)
+ gl_cv_cc_visibility=yes
+ ;;
+ esac
+ ],[gl_cv_cc_visibility=no])
CFLAGS="$gl_save_CFLAGS"])
AC_MSG_RESULT([$gl_cv_cc_visibility])
if test $gl_cv_cc_visibility = yes; then
CFLAG_VISIBILITY="-fvisibility=hidden"
+ CXXFLAG_VISIBILITY="-fvisibility=hidden -fvisibility-inlines-hidden"
NO_VISIBILITY="-fvisibility=default"
HAVE_VISIBILITY=1
fi
])
AS_IF([test "x$SUNCC" = "xyes"],[
CFLAG_VISIBILITY="-xldscope=hidden"
+ CXXFLAG_VISIBILITY="-xldscope=hidden"
NO_VISIBILITY="-xldscope=global"
HAVE_VISIBILITY=1
])
AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([CXXFLAG_VISIBILITY])
AC_SUBST([NO_VISIBILITY])
AC_SUBST([HAVE_VISIBILITY])
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
AC_DEFUN([PANDORA_ENABLE_VISIBILITY],[
AC_REQUIRE([PANDORA_CHECK_VISIBILITY])
AM_CFLAGS="${AM_CFLAGS} ${CFLAG_VISIBILITY}"
- AM_CXXFLAGS="${AM_CXXFLAGS} ${CFLAG_VISIBILITY}"
+ AM_CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAG_VISIBILITY}"
])
- AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],
- [W_FAIL="-Werror"])
+ AS_IF([test "$ac_cv_warnings_as_errors" = "yes"],[
+ W_FAIL="-Werror"
+ SPHINX_WARNINGS="-W"
+ INTLTOOL_WARNINGS="yes"
+ ])
AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option],
[ac_cv_safe_to_use_fdiagnostics_show_option_],
],[
m4_if(PW_LESS_WARNINGS,[no],[
- BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing"
+ BASE_WARNINGS_FULL="${W_CONVERSION} -Wstrict-aliasing -Wswitch-enum "
CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings"
CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast"
NO_OLD_STYLE_CAST="-Wno-old-style-cast"
[ac_cv_safe_to_use_Wextra_=no])
CFLAGS="$save_CFLAGS"])
- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wswitch-enum -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
[BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
[BASE_WARNINGS="${BASE_WARNINGS} -W"])
PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow -Wno-missing-braces ${NO_ATTRIBUTES}"
NO_WERROR="-Wno-error"
PERMISSIVE_WARNINGS="-Wno-error -Wno-unused-function -fpermissive"
+ PERMISSIVE_C_WARNINGS="-Wno-error -Wno-redundant-decls"
AS_IF([test "$host_vendor" = "apple"],[
BOOSTSKIP_WARNINGS="-Wno-uninitialized"
])
AC_SUBST(INNOBASE_SKIP_WARNINGS)
AC_SUBST(BOOSTSKIP_WARNINGS)
AC_SUBST(PERMISSIVE_WARNINGS)
+ AC_SUBST(PERMISSIVE_C_WARNINGS)
AC_SUBST(NO_WERROR)
AC_SUBST([GCOV_LIBS])
+ AC_SUBST([SPHINX_WARNINGS])
+ AC_SUBST([INTLTOOL_WARNINGS])
])
--- /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.]))
+])