Updated pandora-build files to version 0.174
authorMonty Taylor <mordred@inaugust.com>
Sun, 6 Mar 2011 19:19:23 +0000 (11:19 -0800)
committerMonty Taylor <mordred@inaugust.com>
Sun, 6 Mar 2011 19:19:23 +0000 (11:19 -0800)
16 files changed:
.quickly
config/pandora-plugin
m4/pandora_canonical.m4
m4/pandora_cinttypes.m4
m4/pandora_cstdint.m4
m4/pandora_have_libaio.m4 [new file with mode: 0644]
m4/pandora_have_libboost_filesystem.m4
m4/pandora_have_libboost_test.m4 [new file with mode: 0644]
m4/pandora_have_libhaildb.m4
m4/pandora_have_libuuid.m4
m4/pandora_plugins.m4
m4/pandora_stl_hash.m4
m4/pandora_vc_build.m4
m4/pandora_visibility.m4
m4/pandora_warnings.m4
m4/pandora_with_valgrind.m4 [new file with mode: 0644]

index 398e2ab6780a0a2bbb816d1db60ed45b69bbe5aa..e274c88f50d96e7e5de4f3ff4e68b1fafc8605f4 100644 (file)
--- 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
index 91302914c3c1c40fbb251ceae52d40ed809f5e33..936dbd32f8e98300c9d0754c54fb1ae2f03b5f15 100755 (executable)
@@ -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:
index 002f2fd339532abd614d915579ef66e0fc456099..30113045c2a89717ec704eba17b2f7d05689bcb0 100644 (file)
@@ -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 <config/top.h>
 ])
   mkdir -p config
   cat > config/top.h.stamp <<EOF_CONFIG_TOP
index 83a725154ae25172e53c01a67d026733464aae70..e4a8b478c68d472a7814f7a13dab4de1730c883f 100644 (file)
@@ -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 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 
index fb6fbacf87b21158f4754aafa8a24688e89d8a1c..9c84843823010b6d0e84f614dd2c87f078103849 100644 (file)
@@ -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 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 
diff --git a/m4/pandora_have_libaio.m4 b/m4/pandora_have_libaio.m4
new file mode 100644 (file)
index 0000000..000073b
--- /dev/null
@@ -0,0 +1,56 @@
+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])
+])
index 6b9ecba59ed8ca89f0378cb5cf523c5fb3e806df..ea6953ecf519f820f04f5cf158458894a8b4c7f7 100644 (file)
@@ -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 (file)
index 0000000..7a526c0
--- /dev/null
@@ -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/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}]))
+])
+
index 56f71ccc03299189f7a7fcf0ce6c494d85886f2c..b957f64c5ce1852726833472fa39c663f3658d29 100644 (file)
@@ -21,7 +21,7 @@ AC_DEFUN([_PANDORA_SEARCH_LIBHAILDB],[
     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])
@@ -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}]))
 ])
index f1c583e6e180ae550967cfe0f54cfed3ee789fe5..0bd28b9af89027dd637ac3060704eaae606aea1f 100644 (file)
@@ -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.])
   ])
 ])
 
index 6ee13da0bff286838731bfac18ea1b556055d801..540443b047f5c07703ba0c4648f496c6d7bd87e4 100644 (file)
@@ -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)
index 30277d2f7aaee96e8cd1e3fe1d9204d300ba8835..ef1daac728fd297ffdc4673c8ecafbcc7bbb2ea9 100644 (file)
@@ -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
index 5e7ed652bfd553020cb0a444e8263f9f1392a723..494e7e23de19c30b0ac12a985beddb088d23808d 100644 (file)
@@ -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}"
index a85d68b0c32c7dc74f57772ab62c9b8a9637cb34..f0baa60111f87f33d0a3163501fc87cc3fc42a02 100644 (file)
@@ -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}"
 ])
index 30ff3434359ae28c601d506d2961db1bc5cdcc71..9561897598cde0d6dd7c507204af8c2641813241 100644 (file)
@@ -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<Table_TableOptions_RowType>() {
       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<Table_TableOptions_RowType>() {
   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 (file)
index 0000000..47944d8
--- /dev/null
@@ -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.]))
+])