Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-286
authorContinuous Integration <ci@tangent.org>
Tue, 30 Apr 2013 06:56:24 +0000 (23:56 -0700)
committerContinuous Integration <ci@tangent.org>
Tue, 30 Apr 2013 06:56:24 +0000 (23:56 -0700)
16 files changed:
ChangeLog
Makefile.am
bootstrap.sh
configure.ac
docs/include.am
libhashkit/aes.cc
libtest/include.am
libtest/main.cc
libtest/yatl.m4
m4/ax_harden_compiler_flags.m4
m4/ax_memcached.m4
m4/ax_prog_sphinx_build.m4
m4/ax_uuid.m4
man/include.am
tests/include.am
version.m4 [new file with mode: 0644]

index 4d20c93c751f79a0cc66be68f7aa96e7ccfcad7d..5fbed1604d924502373be1e7b4c50f8d78f6d42b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+1.0.18
+
 1.0.17 Tue Apr  2 14:02:01 HST 2013
 * Remove c++ namespace that was being exposed (the API should be plug compatible)..
 * Fix cases where --servers wasn't behaving the same in all clients.
index a359ac00d229e52e17889078206e76b86a410afd..6a851b5036b5b11249b611ca959fb7175f837786 100644 (file)
@@ -1,6 +1,7 @@
 # vim:ft=automake
 
-ACLOCAL_AMFLAGS = -I m4 -I libtest/m4
+ACLOCAL_AMFLAGS= -I m4 -I libtest/m4
+AM_YFLAGS= -d
 
 # includes append to these:
 SUFFIXES =
@@ -140,6 +141,7 @@ maintainer-clean-local:
        -rm -f build-aux/install-sh
        -rm -f build-aux/ltmain.sh
        -rm -f build-aux/missing
+       -rm -f build-aux/ylwrap
        -rm -f mem_config.in
        -rm -f config.log
        -rm -f config.status
index 1c2beff215d86e4ee8f10beeac949978c534e5e2..9a549f06cc9994fc41944291ed956778dbc38bbc 100755 (executable)
@@ -188,9 +188,15 @@ function set_VENDOR_DISTRIBUTION ()
 function set_VENDOR_RELEASE ()
 {
   local release=`echo "$1" | tr '[A-Z]' '[a-z]'`
-  case "$VENDOR_DISTRIBUTION" in
+
+  if $DEBUG; then 
+    echo "VENDOR_DISTRIBUTION:$VENDOR_DISTRIBUTION"
+    echo "VENDOR_RELEASE:$release"
+  fi
+
+  case $VENDOR_DISTRIBUTION in
     darwin)
-      case "$VENDOR_DISTRIBUTION" in
+      case $release in
         10.6*)
           VENDOR_RELEASE='snow_leopard'
           ;;
@@ -200,10 +206,12 @@ function set_VENDOR_RELEASE ()
         mountain)
           VENDOR_RELEASE='mountain'
           ;;
-        10.8*)
+        10.8.*)
+          echo "mountain_lion"
           VENDOR_RELEASE='mountain_lion'
           ;;
         *)
+          echo $VENDOR_RELEASE
           VENDOR_RELEASE='unknown'
           ;;
       esac
@@ -226,6 +234,8 @@ function set_VENDOR_RELEASE ()
         VENDOR_RELEASE="precise"
       elif [[ "x$VENDOR_RELEASE" == 'x12.10' ]]; then
         VENDOR_RELEASE="quantal"
+      elif [[ "x$VENDOR_RELEASE" == 'x13.04' ]]; then
+        VENDOR_RELEASE="raring"
       fi
       ;;
     opensuse)
@@ -375,11 +385,17 @@ function run_configure ()
   local BUILD_CONFIGURE_ARG= 
 
   # If ENV DEBUG is set we enable both debug and asssert, otherwise we see if this is a VCS checkout and if so enable assert
-  # Set ENV ASSERT in order to enable assert
-  if $DEBUG; then 
-    BUILD_CONFIGURE_ARG+=' --enable-debug --enable-assert'
-  elif [[ -n "$VCS_CHECKOUT" ]]; then
-    BUILD_CONFIGURE_ARG+=' --enable-assert'
+  # Set ENV ASSERT in order to enable assert.
+  # If we are doing a valgrind run, we always compile with assert disabled
+  if $valgrind_run; then
+    BUILD_CONFIGURE_ARG+= " CXXFLAGS=-DNDEBUG "
+    BUILD_CONFIGURE_ARG+= " CFLAGS=-DNDEBUG "
+  else
+    if $DEBUG; then 
+      BUILD_CONFIGURE_ARG+=' --enable-debug --enable-assert'
+    elif [[ -n "$VCS_CHECKOUT" ]]; then
+      BUILD_CONFIGURE_ARG+=' --enable-assert'
+    fi
   fi
 
   if [[ -n "$CONFIGURE_ARG" ]]; then 
@@ -431,7 +447,7 @@ function setup_gdb_command () {
 function setup_valgrind_command () {
   VALGRIND_PROGRAM=`type -p valgrind`
   if [[ -n "$VALGRIND_PROGRAM" ]]; then
-    VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE"
+    VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --malloc-fill=A5 --free-fill=DE --xml=yes --xml-file=\"valgrind-%p.xml\""
   fi
 }
 
@@ -531,11 +547,6 @@ function safe_popd ()
 
 function make_valgrind ()
 {
-  if [[ "$VENDOR_DISTRIBUTION" == 'darwin' ]]; then
-    make_darwin_malloc
-    return
-  fi
-
   # If the env VALGRIND_COMMAND is set then we assume it is valid
   local valgrind_was_set=false
   if [[ -z "$VALGRIND_COMMAND" ]]; then
@@ -555,8 +566,10 @@ function make_valgrind ()
 
   save_BUILD
 
+  valgrind_run=true
+
   # If we are required to run configure, do so now
-  run_configure_if_required
+  run_configure
 
   # If we don't have a configure, then most likely we will be missing libtool
   assert_file 'configure'
@@ -566,9 +579,22 @@ function make_valgrind ()
     TESTS_ENVIRONMENT="$VALGRIND_COMMAND"
   fi
 
-  make_target 'check' || return 1
+  make_target 'all'
+  make_target 'check'
+  ret=$?
+
+  # If we aren't going to error, we will clean up our environment
+  if [ "$ret" -eq 0 ]; then
+     make 'distclean'
+  fi
+
+  valgrind_run=false
 
   restore_BUILD
+
+  if [ "$ret" -ne 0 ]; then
+    return 1
+  fi
 }
 
 function make_install_system ()
@@ -619,32 +645,21 @@ function make_darwin_malloc ()
   MallocScribble=$old_MallocScribble
 }
 
-function snapshot_check ()
-{
-  if [ ! -f "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then
-    make_for_snapshot
-  fi
-
-  if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then
-    assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed'
-  fi
-}
-
 # This will reset our environment, and make sure built files are available.
 function make_for_snapshot ()
 {
-  # Make sure it is clean
-  make_maintainer_clean
+  # Lets make sure we have a clean environment
+  assert_no_file 'Makefile'
+  assert_no_file 'configure'
+  assert_no_directory 'autom4te.cache'
 
   run_configure
-  make_target 'dist'
+  make_target 'all'
   make_target 'distclean'
 
   # We should have a configure, but no Makefile at the end of this exercise
   assert_no_file 'Makefile'
   assert_exec_file 'configure'
-
-  snapshot_check
 }
 
 function check_mingw ()
@@ -813,7 +828,7 @@ function make_for_clang_analyzer ()
 function check_for_jenkins ()
 {
   if ! $jenkins_build_environment; then
-    echo "Not inside of jenkins"
+    echo "Not inside of jenkins, simulating environment"
 
     if [ -f 'configure' ]; then
       make_maintainer_clean
@@ -842,6 +857,13 @@ function make_universe ()
   make_install_system
 }
 
+function check_snapshot ()
+{
+  if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then
+    assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed'
+  fi
+}
+
 function make_for_continuus_integration ()
 {
   # Setup the environment if we are local
@@ -853,7 +875,11 @@ function make_for_continuus_integration ()
   # Platforms which require bootstrap should have some setup done before we hit this stage.
   # If we are building locally, skip this step, unless we are just testing locally. 
   if $BOOTSTRAP_SNAPSHOT; then
-    snapshot_check
+    if $BOOTSTRAP_SNAPSHOT; then
+      assert_file 'configure'
+    fi
+
+    check_snapshot
   else
     # If we didn't require a snapshot, then we should not have a configure
     assert_no_file 'configure'
@@ -877,34 +903,7 @@ function make_for_continuus_integration ()
         make_rpm
       elif [[ -d rpm ]]; then
         make_rpm
-      else
-        make_distcheck
       fi
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_install_system
-      ;;
-    *-precise-*)
-      run_configure
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_target 'all'
-
-      make_distcheck
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_valgrind
-
-      assert_exec_file 'configure'
-      assert_file 'Makefile'
-
-      make_install_system
       ;;
     *)
       make_jenkins_default
@@ -1102,7 +1101,7 @@ function run_autoreconf ()
     run $BOOTSTRAP_LIBTOOLIZE '--copy' '--install' '--force' || die "Cannot execute $BOOTSTRAP_LIBTOOLIZE"
   fi
 
-  run $AUTORECONF || die "Cannot execute $AUTORECONF"
+  run $AUTORECONF $AUTORECONF_ARGS || die "Cannot execute $AUTORECONF"
 
   eval 'bash -n configure' || die "autoreconf generated a malformed configure"
 }
@@ -1283,12 +1282,16 @@ function autoreconf_setup ()
         fi
       fi
     fi
+
     if $VERBOSE; then
       LIBTOOLIZE_OPTIONS="--verbose $BOOTSTRAP_LIBTOOLIZE_OPTIONS"
     fi
+
     if $DEBUG; then
       LIBTOOLIZE_OPTIONS="--debug $BOOTSTRAP_LIBTOOLIZE_OPTIONS"
     fi
+
+    # Here we set LIBTOOLIZE to true since we are going to invoke it via BOOTSTRAP_LIBTOOLIZE
     LIBTOOLIZE=true
   fi
 
@@ -1326,7 +1329,7 @@ function autoreconf_setup ()
     fi
 
     if [[ -n "$GNU_BUILD_FLAGS" ]]; then
-      AUTORECONF="$AUTORECONF $GNU_BUILD_FLAGS"
+      AUTORECONF_ARGS="$GNU_BUILD_FLAGS"
     fi
   fi
 
@@ -1553,6 +1556,7 @@ function bootstrap ()
     fi
 
     local snapshot_run=false
+    local valgrind_run=false
 
     case $target in
       'self')
@@ -1612,11 +1616,16 @@ function bootstrap ()
       'snapshot')
         make_for_snapshot
         snapshot_run=true
+        check_snapshot
         ;;
       'rpm')
         make_rpm
         ;;
+      'darwin_malloc')
+        make_darwin_malloc
+        ;;
       'valgrind')
+        make_maintainer_clean 
         make_valgrind
         ;;
       'universe')
index a70143abc8b8a3c51715e0462dc7c46897b11a94..b0870bbfc490758e6dc20372a07d63550379b03b 100644 (file)
@@ -6,7 +6,8 @@
 # Use and distribution licensed under the BSD license.  See
 # the COPYING file in this directory for full text.
 
-AC_INIT([libmemcached],[1.0.17],[http://libmemcached.org/])
+m4_include([version.m4])
+AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -50,6 +51,9 @@ LT_INIT
 LT_LANG([C++])
 LT_LIB_M
 
+AC_PROG_CC_C99
+AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])])
+
 AX_ASSERT
 
 AX_PLATFORM
@@ -100,13 +104,20 @@ PROTOCOL_BINARY_TEST
 ENABLE_DEPRECATED
 
 # Checks for programs.
+AC_CHECK_PROGS([DPKG_GENSYMBOLS],[dpkg-gensymbols])
+AC_CHECK_PROGS([LEX],['flex'],[:])
+AC_CHECK_PROGS([PERL],[perl])
+AC_CHECK_PROGS([VALGRIND],['valgrind'])
+AC_CHECK_PROGS([WINE],['wine'])
+AC_CHECK_PROGS([YACC],['bison --warnings=all'],[:])
 AC_PROG_AWK
-AC_PROG_SED
 AC_PROG_MKDIR_P
-AC_CHECK_PROGS([LEX],['flex'],[:])
-AC_CHECK_PROGS([YACC],['bison'],[:])
-AX_PROG_SPHINX_BUILD
+AC_PROG_SED
 AX_PROG_MEMCACHED
+AX_PROG_SPHINX_BUILD(,[AC_MSG_WARN([sphinx-build version 1.0 or greater is required to build man pages])])
+AX_WITH_PROG([LCOV],[lcov])
+AX_WITH_PROG([LCOV_GENHTML],[genhtml])
+AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY],[0],[If Memcached binary with sasl support is available])
 
 # Checks for libraries.
 AC_SEARCH_LIBS([getopt_long],[gnugetopt])
index b302681d5ba7aaa0c68d2c9c6c61e301d276b425..f28079f8d6745b36a2912d482b977a703a47ef27 100644 (file)
@@ -19,7 +19,6 @@ clean-docs-check:
        -rm -rf docs/_build docs/doctrees man/.doctrees/
 
 .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-if HAVE_SPHINX
 
 sphinx-help:
        @echo "Please use \`make <target>' where <target> is one of"
@@ -86,15 +85,9 @@ latexpdf: latex
 text: docs/conf.py
        @PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text
 
-if HAVE_RECENT_SPHINX
 man:
        @PYTHONPATH=$(SPHINX_BUILDDIR)/docs  $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man
 
-else
-
-man:
-
-endif
 
 changes: docs/conf.py
        @PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes
@@ -106,9 +99,3 @@ doctest: docs/conf.py
        PYTHONPATH=${top_srcdir}/docs  $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest
        @echo "Testing of doctests in the sources finished, look at the " \
              "results in $(SPHINX_BUILDDIR)/doctest/output.txt."
-
-else
-
-man:
-
-endif
index c7083a6e4adc3c83676195b59225770ac5876997..12adcae36a7f2b45281e5abe2d85c505284939ad 100644 (file)
@@ -62,7 +62,7 @@ struct aes_key_t {
 
 aes_key_t* aes_create_key(const char *key, const size_t key_length)
 {
-  aes_key_t* _aes_key= (aes_key_t*)calloc(1, sizeof(aes_key_t));
+  aes_key_t* _aes_key= (aes_key_t*)(calloc(1, sizeof(aes_key_t)));
   if (_aes_key)
   {
     uint8_t rkey[AES_KEY_LENGTH/8];
@@ -79,7 +79,7 @@ aes_key_t* aes_create_key(const char *key, const size_t key_length)
       {
         ptr= rkey;  /*  Just loop over tmp_key until we used all key */
       }
-      *ptr^= (uint8_t) *sptr;
+      *ptr^= (uint8_t)(*sptr);
     }
 
     _aes_key->decode_key.nr= rijndaelKeySetupDec(_aes_key->decode_key.rk, rkey, AES_KEY_LENGTH);
@@ -96,7 +96,7 @@ aes_key_t* aes_clone_key(aes_key_t *_aes_key)
     return NULL;
   }
 
-  aes_key_t* _aes_clone_key= (aes_key_t*)calloc(1, sizeof(aes_key_t));
+  aes_key_t* _aes_clone_key= (aes_key_t*)(calloc(1, sizeof(aes_key_t)));
   if (_aes_clone_key)
   {
     memcpy(_aes_clone_key, _aes_key, sizeof(aes_key_t));
@@ -122,8 +122,8 @@ hashkit_string_st* aes_encrypt(aes_key_t *_aes_key,
 
     for (size_t x= num_blocks; x > 0; x--)   /* Encode complete blocks */
     { 
-      rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, (const uint8_t*) source,
-                      (uint8_t*) dest);
+      rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, (const uint8_t*)(source),
+                      (uint8_t*) (dest));
       source+= AES_BLOCK_SIZE;
       dest+= AES_BLOCK_SIZE;
     }
@@ -132,7 +132,7 @@ hashkit_string_st* aes_encrypt(aes_key_t *_aes_key,
     char pad_len= AES_BLOCK_SIZE - (source_length - AES_BLOCK_SIZE*num_blocks);
     memcpy(block, source, 16 -pad_len);
     memset(block + AES_BLOCK_SIZE -pad_len, pad_len, pad_len);
-    rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, block, (uint8_t*) dest);
+    rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, block, (uint8_t*) (dest));
     hashkit_string_set_length(destination, AES_BLOCK_SIZE*(num_blocks + 1));
   }
 
@@ -160,15 +160,15 @@ hashkit_string_st* aes_decrypt(aes_key_t *_aes_key,
 
     for (size_t x = num_blocks-1; x > 0; x--)
     {
-      rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*) source, (uint8_t*) dest);
+      rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*) (source), (uint8_t*)(dest));
       source+= AES_BLOCK_SIZE;
       dest+= AES_BLOCK_SIZE;
     }
 
     uint8_t block[AES_BLOCK_SIZE];
-    rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*) source, block);
+    rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*)(source), block);
     /* Use last char in the block as size */
-    unsigned int pad_len= (unsigned int) (unsigned char) block[AES_BLOCK_SIZE-1];
+    unsigned int pad_len= (unsigned int) (unsigned char)(block[AES_BLOCK_SIZE-1]);
     if (pad_len > AES_BLOCK_SIZE)
     {
       hashkit_string_free(destination);
index 9ef6d0ba88c7951099908877221deae5736c67d4..97991375fe63c342861bde3968655b708605ab66 100644 (file)
@@ -9,7 +9,7 @@ VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitc
 SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
 VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND)
 HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
-DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --error-exitcode=1
+DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1
 SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
 MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif
 GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb
@@ -221,6 +221,18 @@ libtest_skiptest_SOURCES= libtest/skiptest.cc
 check_PROGRAMS+= libtest/skiptest
 noinst_PROGRAMS+= libtest/skiptest
 
+test-skiptest: libtest/skiptest
+       @libtest/skiptest
+
+valgrind-skiptest: libtest/skiptest
+       @$(VALGRIND_COMMAND) libtest/skiptest
+
+helgrind-skiptest: libtest/skiptest
+       @$(HELGRIND_COMMAND) libtest/skiptest
+
+drd-skiptest: libtest/skiptest
+       @$(DRD_COMMAND) libtest/skiptest
+
 libtest_wait_SOURCES=
 libtest_wait_SOURCES+= libtest/wait.cc
 libtest_wait_SOURCES+= libtest/dream.cc
index 2ceeac92cf0bdba962a035e4e240a38e4409ab79..46429241f56a264777ff91b973d8de8c5809f00b 100644 (file)
@@ -297,7 +297,6 @@ int main(int argc, char *argv[])
       std::auto_ptr<libtest::Framework> frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard));
 
       // Run create(), bail on error.
-      try
       {
         switch (frame->create())
         {
@@ -305,17 +304,14 @@ int main(int argc, char *argv[])
           break;
 
         case TEST_SKIPPED:
-          return EXIT_SKIP;
+          SKIP("SKIP was returned from framework create()");
+          break;
 
         case TEST_FAILURE:
           std::cerr << "Could not call frame->create()" << std::endl;
           return EXIT_FAILURE;
         }
       }
-      catch (const libtest::__skipped& e)
-      {
-        return EXIT_SKIP;
-      }
 
       frame->exec();
 
index 61d1a2f0f4ecbbf3c0619a39025ac36b62d9ffe6..0e88425db8a7b61c92d2df8c937f6ad3de52bef1 100644 (file)
@@ -7,7 +7,6 @@ AC_SUBST([LIBTEST_VERSION],[1.0])
 AC_CONFIG_FILES([libtest/version.h])
 
 m4_include([libtest/m4/mysql.m4])
-AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY],[0],[If Memcached binary with sasl support is available])
 
 YATL_MYSQL
 
index b3b939217ad9c6acafc82e05dbe89f5716046ad3..d4fccad605d56b726da94ffe6009dbb8948743e7 100644 (file)
@@ -15,7 +15,7 @@
 #
 # LICENSE
 #
-#  Copyright (C) 2012 Brian Aker
+#  Copyright (C) 2012-2013 Brian Aker
 #  All rights reserved.
 #
 #  Redistribution and use in source and binary forms, with or without
 #  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#  Notes:
+#  We do not test for c99 or c++11, that is out of scope.
 
 # The Following flags are not checked for
 # -Wdeclaration-after-statement is counter to C99
-# _APPEND_COMPILE_FLAGS_ERROR([-std=c++11]) -- Not ready yet
-# _APPEND_COMPILE_FLAGS_ERROR([-pedantic]) --
-# ?  _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) -- Don't turn on for
-# compatibility issues memcached_stat_st
+# _APPEND_COMPILE_FLAGS_ERROR([-pedantic])
 
-#serial 9
+#serial 10
 
 AC_DEFUN([_WARNINGS_AS_ERRORS],
     [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors],
@@ -76,13 +76,12 @@ AC_DEFUN([_APPEND_COMPILE_FLAGS_ERROR],
 # Everything above this does the heavy lifting, while what follows does the specifics.
 
 AC_DEFUN([_HARDEN_LINKER_FLAGS],
-         [
-         AS_IF([test "$CC" != "clang"],
-           [_APPEND_LINK_FLAGS_ERROR([-z relro -z now])
-#_APPEND_LINK_FLAGS_ERROR([-pie])
-           AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],
-             [AX_APPEND_LINK_FLAGS([-Werror])])])
-         ])
+        [AS_IF([test "$CC" != "clang"],
+          [_APPEND_LINK_FLAGS_ERROR([-z relro -z now])
+          AS_IF([test "x$ac_cv_warnings_as_errors" = xyes],[AX_APPEND_LINK_FLAGS([-Werror])])
+          AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[_APPEND_LINK_FLAGS_ERROR([-rdynamic])])
+          ])
+        ])
 
 AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
          [AC_LANG_PUSH([C])dnl
@@ -106,13 +105,12 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
            [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas])
            _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])])
 
-         AS_IF([test "$CC" = "clang"],
-           [_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
+         AS_IF([test "$CC" = "clang"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
 
          _APPEND_COMPILE_FLAGS_ERROR([-Wall])
          _APPEND_COMPILE_FLAGS_ERROR([-Wextra])
+         _APPEND_COMPILE_FLAGS_ERROR([-Weverything])
          _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail])
-         _APPEND_COMPILE_FLAGS_ERROR([-std=c99])
 # Anything below this comment please keep sorted.
 # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute])
           _APPEND_COMPILE_FLAGS_ERROR([-Wunsuffixed-float-constants])
@@ -147,7 +145,6 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
                 _APPEND_COMPILE_FLAGS_ERROR([-Wno-suggest-attribute=pure])
                 _APPEND_COMPILE_FLAGS_ERROR([-Wno-redundant-decls])],
                 [_APPEND_COMPILE_FLAGS_ERROR([-Wredundant-decls])])
-
           _APPEND_COMPILE_FLAGS_ERROR([-Wshadow])
           _APPEND_COMPILE_FLAGS_ERROR([-Wshorten-64-to-32])
           _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare])
@@ -158,30 +155,32 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
           _APPEND_COMPILE_FLAGS_ERROR([-Wundef])
           _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations])
           _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations])
-          AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[
-            _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
-            AS_IF([test "x$enable_shared" = "xyes"],[
+          AS_IF([test "x$MINGW" != xyes],[
+            AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[
+              AS_IF([test "x$enable_shared" = "xyes"],[
+                _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
                 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread])
-                ])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])
+              ])
+            ])
           ])
           _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered])
           _APPEND_COMPILE_FLAGS_ERROR([-Wunused])
@@ -194,7 +193,11 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
           _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
           _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
           _APPEND_COMPILE_FLAGS_ERROR([-pipe])
+          _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])
           _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpacked])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code])
 
           AS_IF([test "x$ax_enable_debug" = xno],
             [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
@@ -202,8 +205,7 @@ AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS],
                 [AS_IF([test "x$ac_c_gcc_recent" = xyes],
                   [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])
                   #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector])
-                  #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector])
-                  #_APPEND_COMPILE_FLAGS_ERROR([--param=ssp-buffer-size=1])
+                  #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4])
                   _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all])
                   ])])])])
 
@@ -236,11 +238,11 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
            [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas])
            _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])])
 
-         AS_IF([test "$CXX" = "clang++"],
-           [_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
+         AS_IF([test "$CXX" = "clang++"],[_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])])
 
          _APPEND_COMPILE_FLAGS_ERROR([-Wall])
          _APPEND_COMPILE_FLAGS_ERROR([-Wextra])
+         _APPEND_COMPILE_FLAGS_ERROR([-Weverything])
          _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail])
 # Anything below this comment please keep sorted.
 # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute])
@@ -280,30 +282,32 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
           _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations])
           _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat])
 #         _APPEND_COMPILE_FLAGS_ERROR([-Weffc++])
-          AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[
-            _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
-            AS_IF([test "x$enable_shared" = "xyes"],[
+          AS_IF([test "x$MINGW" != xyes],[
+            AS_IF([test "x$ac_cv_vcs_checkout" = xyes],[
+              AS_IF([test "x$enable_shared" = "xyes"],[
+                _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer])
                 _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread])
-                ])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
-            _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound])
+                _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])
+              ])
+            ])
           ])
 #         _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast])
           _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered])
@@ -318,7 +322,11 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
           _APPEND_COMPILE_FLAGS_ERROR([-fwrapv])
           _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt])
           _APPEND_COMPILE_FLAGS_ERROR([-pipe])
+          _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie])
           _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wpacked])
+#         _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long])
+          _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code])
 
           AS_IF([test "x$ax_enable_debug" = xno],
           [AS_IF([test "x$ac_cv_vcs_checkout" = xyes],
@@ -326,8 +334,7 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
               [AS_IF([test "x$ac_c_gcc_recent" = xyes],
                 [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2])
                 #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector])
-                #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector])
-                #_APPEND_COMPILE_FLAGS_ERROR([--param=ssp-buffer-size=1])
+                #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4])
                 _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all])
                 ])])])])
 
index 21067c68d05f6bc2a8406d7d9888e28b244fe86b..160cfe32399e5eaa7f17f535b66faf8391cddba4 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#serial 3
+#serial 4
 
 AC_DEFUN([AX_PROG_MEMCACHED],
-    [AX_WITH_PROG([MEMCACHED_BINARY],[memcached])
-    AS_IF([test -f "$ac_cv_path_MEMCACHED_BINARY"],
-      [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available])
-      AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$ac_cv_path_MEMCACHED_BINARY",[Name of the memcached binary used in make test])
-      ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`
-      AC_MSG_RESULT([memcached version "$ax_memcached_version"])
-      AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])
-      ])
-    ])
+         [AX_WITH_PROG([MEMCACHED_BINARY],[memcached],[unknown])
+         ax_memcached_success=
+         AS_IF([test x"$MEMCACHED_BINARY" != xunknown],
+               [AS_IF([test -x "$MEMCACHED_BINARY"],
+                      [ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'`
+                      AS_IF([test -n "$ax_memcached_version"],
+                            [ax_memcached_success='ok'
+                            AC_MSG_RESULT([memcached version "$ax_memcached_version"])
+                            AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])])
+                      ])
+               ])
+
+         AS_IF([test -n "$ax_memcached_success"], 
+               [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available])
+               AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$MEMCACHED_BINARY",[Name of the memcached binary used in make test])
+               ],
+               [AC_DEFINE([HAVE_MEMCACHED_BINARY], [0], [If Memcached binary is available])
+               MEMCACHED_BINARY=
+               ])
+         ])
index cbbf17239738e22278f14a3a039159de0ffa0d30..3a89a3316b631cb655c55f381795eabd3c0b5699 100644 (file)
@@ -4,42 +4,41 @@
 #
 # SYNOPSIS
 #
-#   AX_PROG_SPHINX_BUILD()
+#   AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
 #
 # DESCRIPTION
 #
-#   Look for sphinx-build
+#   Look for sphinx-build and make sure it is a recent version of it.
 #
 # LICENSE
 #
-#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 2
+#serial 3
 
 AC_DEFUN([AX_PROG_SPHINX_BUILD],
-    [AC_PREREQ([2.63])dnl
-    AC_CHECK_PROGS([PERL], [perl])
-    AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
-    AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
-    AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
-
-    AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
-    AS_IF([test "x${SPHINXBUILD}" != "x:"],[
-      AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
-
-        ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
-        AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
-          [ac_cv_recent_sphinx=no])
+    [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
+    AS_IF([test x"SPHINXBUILD" = x":"],
+      [SPHINXBUILD=],
+      [AS_IF([test -x "$SPHINXBUILD"],
+        [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
+        junk=`$SPHINXBUILD &> version_file`
+        ax_sphinx_build_version=`head -1 version_file`
+        rm version_file
+        AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"])
+        $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+        AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
         rm -rf conftest.d
         ])
       ])
 
-    AM_CONDITIONAL([HAVE_DPKG_GENSYMBOLS],[test "x${DPKG_GENSYMBOLS}" != "x:"])
-    AM_CONDITIONAL([HAVE_SPHINX],[test "x${SPHINXBUILD}" != "x:"])
-    AM_CONDITIONAL([HAVE_RECENT_SPHINX],[test "x${ac_cv_recent_sphinx}" = "xyes"])
-])
+    AS_IF([test -n "${SPHINXBUILD}"],
+      [AC_SUBST([SPHINXBUILD])
+      ifelse([$1], , :, [$1])],
+      [ifelse([$2], , :, [$2])])
+    ])
index 93c5f89f2367791683bccd039df80f09677a045f..293fdfc58a06c39a5a9f75fa2d8debc9176d7acc 100644 (file)
@@ -6,22 +6,23 @@
 # SYNOPSIS
 #
 #   AX_UUID()
+#   AX_UUID_GENERATE_TIME()
 #   AX_UUID_GENERATE_TIME_SAFE()
 #
 # DESCRIPTION
 #
-#   Check for uuid, and uuid_generate_time_safe support.
+#   Check for uuid, uuid_generate_time, and uuid_generate_time_safe support.
 #
 # LICENSE
 #
-#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
+#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
 #   and this notice are preserved. This file is offered as-is, without any
 #   warranty.
 
-#serial 6
+#serial 7
 
 AC_DEFUN([AX_UUID],
     [AC_PREREQ([2.63])dnl
@@ -72,6 +73,31 @@ AC_DEFUN([AX_UUID],
   AM_CONDITIONAL([HAVE_LIBUUID],[test "x$ax_libuuid" = xyes])
   ])
 
+  AC_DEFUN([AX_UUID_GENERATE_TIME],
+      [AC_PREREQ([2.63])dnl
+      AC_REQUIRE([AX_UUID])dnl
+      AC_CACHE_CHECK([for uuid_generate_time],
+        [ax_cv_uuid_generate_time],
+        [AX_SAVE_FLAGS
+        LIBS="$LIBUUID_LIB $LIBS"
+        AC_LANG_PUSH([C])
+        AC_RUN_IFELSE([
+          AC_LANG_PROGRAM([#include <uuid/uuid.h>],[
+            uuid_t out;
+            uuid_generate_time(out);
+            ])],
+          [ax_cv_uuid_generate_time=yes],
+          [ax_cv_uuid_generate_time=no],
+          [AC_MSG_WARN([test program execution failed])])
+        AC_LANG_POP
+        AX_RESTORE_FLAGS
+        ])
+
+      AS_IF([test "$ax_cv_uuid_generate_time" = yes],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[1],[Define if uuid_generate_time is present in uuid/uuid.h.])],
+        [AC_DEFINE([HAVE_UUID_GENERATE_TIME],[0],[Define if uuid_generate_time is present in uuid/uuid.h.])])
+      ])
+
   AC_DEFUN([AX_UUID_GENERATE_TIME_SAFE],
       [AC_PREREQ([2.63])dnl
       AC_REQUIRE([AX_UUID])dnl
index 3b68557a7937836efb7dd92770c4043742f099ee..602cfa9680852f0d9711a5078f30027823cd4560 100644 (file)
@@ -2,18 +2,11 @@
 # included from Top Level Makefile.am
 # All paths should be given relative to the root
 
-if HAVE_RECENT_SPHINX
-if IS_VCS_CHECKOUT
-
-dist-hook: man
-
 # Build rule for documentation
-$(dist_man_MANS): man
-
-BUILT_SOURCES+= $(dist_man_MANS)
+$(dist_man_MANS): $(top_srcdir)/configure.ac
+       $(MAKE) $(AM_MAKEFLAGS) man
 
-endif
-endif
+.NOTPARALLEL: $(dist_man_MANS)
 
 dist_man_MANS+= man/memaslap.1
 dist_man_MANS+= man/memcapable.1
index 44fdbfa3404c042bcd7a2a6793b02427f1050690..414b143b393c69039a5f652f81f9e430eb6dc516 100644 (file)
@@ -98,6 +98,9 @@ valgrind-memcapable: tests/memcapable
 pahole-mem: tests/testapp
        @$(PAHOLE_COMMAND)  tests/testapp
 
+pahole-hash: tests/testhashkit
+       @$(PAHOLE_COMMAND)  tests/testhashkit
+
 gdb-mem: tests/libmemcached-1.0/testapp
        @$(GDB_COMMAND)  tests/libmemcached-1.0/testapp
 
@@ -148,3 +151,9 @@ helgrind-hash: tests/testhashkit
 
 helgrind-hashplus: tests/hash_plus
        @$(HELGRIND_COMMAND) tests/hash_plus
+
+drd-mem: tests/libmemcached-1.0/testapp 
+       @$(DRD_COMMAND) tests/libmemcached-1.0/testapp
+
+drd-cycle: tests/cycle
+       @$(DRD_COMMAND) tests/cycle
diff --git a/version.m4 b/version.m4
new file mode 100644 (file)
index 0000000..759ba24
--- /dev/null
@@ -0,0 +1 @@
+m4_define([VERSION_NUMBER], [1.0.18])