From: Monty Taylor Date: Sun, 6 Mar 2011 19:19:23 +0000 (-0800) Subject: Updated pandora-build files to version 0.174 X-Git-Tag: 0.51~15^2~35^2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6515bf6555eac108adc478b9bf1f6c98eca838e6;p=awesomized%2Flibmemcached Updated pandora-build files to version 0.174 --- diff --git a/.quickly b/.quickly index 398e2ab6..e274c88f 100644 --- a/.quickly +++ b/.quickly @@ -2,4 +2,4 @@ project = libmemcached version = 0.4.2 template = pandora-build project-type = library -pandora-version = 0.171 +pandora-version = 0.174 diff --git a/config/pandora-plugin b/config/pandora-plugin index 91302914..936dbd32 100755 --- a/config/pandora-plugin +++ b/config/pandora-plugin @@ -1,6 +1,7 @@ #!/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 @@ -133,6 +134,7 @@ EXTRA_DIST = plugin.ini noinst_HEADERS= nobase_include_HEADERS= +nobase_pkginclude_HEADERS= check_PROGRAMS= noinst_LTLIBRARIES= bin_PROGRAMS= @@ -142,7 +144,7 @@ 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) @@ -151,7 +153,7 @@ pkgplugin_LTLIBRARIES=%(libname)s.la %(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 @@ -199,15 +201,18 @@ def write_plugin(plugin, plugin_ini_list): 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): # @@ -243,6 +248,19 @@ AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title 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@:>@]) @@ -272,20 +290,24 @@ AS_IF([test %(build_conditional)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}" @@ -294,15 +316,13 @@ AS_IF([test "x$with_%(name)s_plugin" = "xyes"], 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 @@ -347,7 +367,13 @@ def expand_plugin_ini(plugin): 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 @@ -355,6 +381,7 @@ def expand_plugin_ini(plugin): 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' @@ -510,7 +537,7 @@ EXTRA_DIST += %(rel_path)s/plugin.ini 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) @@ -518,33 +545,30 @@ EXTRA_DIST += %(rel_path)s/plugin.ini 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 @@ -662,6 +686,15 @@ PANDORA_DYNAMIC_LDADDS= 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: diff --git a/m4/pandora_canonical.m4 b/m4/pandora_canonical.m4 index 002f2fd3..30113045 100644 --- a/m4/pandora_canonical.m4 +++ b/m4/pandora_canonical.m4 @@ -4,7 +4,7 @@ dnl gives unlimited permission to copy and/or distribute it, 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], @@ -115,7 +115,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ vc_changelog=yes ]) m4_if(PCT_VERSION_FROM_VC,yes,[ - PANDORA_VC_VERSION + PANDORA_VC_INFO_HEADER ],[ PANDORA_TEST_VC_DIR @@ -268,6 +268,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ AC_LIB_PREFIX PANDORA_HAVE_BETTER_MALLOC + PANDORA_WITH_VALGRIND AC_CHECK_PROGS([DOXYGEN], [doxygen]) AC_CHECK_PROGS([PERL], [perl]) @@ -328,6 +329,7 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ #error "You should include config.h as your first include file" #endif +#include ]) mkdir -p config cat > config/top.h.stamp < + ], + [ + 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]) +]) diff --git a/m4/pandora_have_libboost_filesystem.m4 b/m4/pandora_have_libboost_filesystem.m4 index 6b9ecba5..ea6953ec 100644 --- a/m4/pandora_have_libboost_filesystem.m4 +++ b/m4/pandora_have_libboost_filesystem.m4 @@ -28,6 +28,8 @@ AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[ 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) ]) diff --git a/m4/pandora_have_libboost_test.m4 b/m4/pandora_have_libboost_test.m4 new file mode 100644 index 00000000..7a526c04 --- /dev/null +++ b/m4/pandora_have_libboost_test.m4 @@ -0,0 +1,45 @@ +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::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::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}])) +]) + diff --git a/m4/pandora_have_libhaildb.m4 b/m4/pandora_have_libhaildb.m4 index 56f71ccc..b957f64c 100644 --- a/m4/pandora_have_libhaildb.m4 +++ b/m4/pandora_have_libhaildb.m4 @@ -21,7 +21,7 @@ AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[ AC_LIB_HAVE_LINKFLAGS(haildb,,[ #include ],[ - 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]) @@ -39,5 +39,5 @@ AC_DEFUN([PANDORA_HAVE_LIBHAILDB],[ 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}])) ]) diff --git a/m4/pandora_have_libuuid.m4 b/m4/pandora_have_libuuid.m4 index f1c583e6..0bd28b9a 100644 --- a/m4/pandora_have_libuuid.m4 +++ b/m4/pandora_have_libuuid.m4 @@ -46,7 +46,7 @@ AC_DEFUN([_PANDORA_REQUIRE_LIBUUID],[ 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.]) ]) ]) diff --git a/m4/pandora_plugins.m4 b/m4/pandora_plugins.m4 index 6ee13da0..540443b0 100644 --- a/m4/pandora_plugins.m4 +++ b/m4/pandora_plugins.m4 @@ -17,7 +17,7 @@ AC_DEFUN([PANDORA_PLUGINS],[ 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) diff --git a/m4/pandora_stl_hash.m4 b/m4/pandora_stl_hash.m4 index 30277d2f..ef1daac7 100644 --- a/m4/pandora_stl_hash.m4 +++ b/m4/pandora_stl_hash.m4 @@ -1,3 +1,8 @@ +# 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 diff --git a/m4/pandora_vc_build.m4 b/m4/pandora_vc_build.m4 index 5e7ed652..494e7e23 100644 --- a/m4/pandora_vc_build.m4 +++ b/m4/pandora_vc_build.m4 @@ -60,6 +60,7 @@ AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ 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 @@ -75,6 +76,7 @@ AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ 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 @@ -100,6 +102,8 @@ AC_DEFUN([PANDORA_VC_VERSION],[ _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], @@ -111,7 +115,11 @@ AC_DEFUN([PANDORA_VC_VERSION],[ 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}" diff --git a/m4/pandora_visibility.m4 b/m4/pandora_visibility.m4 index a85d68b0..f0baa601 100644 --- a/m4/pandora_visibility.m4 +++ b/m4/pandora_visibility.m4 @@ -35,23 +35,33 @@ AC_DEFUN([PANDORA_CHECK_VISIBILITY], 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], @@ -61,5 +71,5 @@ AC_DEFUN([PANDORA_CHECK_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}" ]) diff --git a/m4/pandora_warnings.m4 b/m4/pandora_warnings.m4 index 30ff3434..95618975 100644 --- a/m4/pandora_warnings.m4 +++ b/m4/pandora_warnings.m4 @@ -75,8 +75,11 @@ AC_DEFUN([PANDORA_WARNINGS],[ - 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_], @@ -127,7 +130,7 @@ AC_DEFUN([PANDORA_WARNINGS],[ ],[ 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" @@ -153,7 +156,7 @@ AC_DEFUN([PANDORA_WARNINGS],[ [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"]) @@ -372,6 +375,7 @@ inline const EnumDescriptor* GetEnumDescriptor() { 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" ]) @@ -434,7 +438,10 @@ inline const EnumDescriptor* GetEnumDescriptor() { 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]) ]) diff --git a/m4/pandora_with_valgrind.m4 b/m4/pandora_with_valgrind.m4 new file mode 100644 index 00000000..47944d8b --- /dev/null +++ b/m4/pandora_with_valgrind.m4 @@ -0,0 +1,17 @@ +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.])) +])