Fixes for
authorBrian Aker <brian@tangent.org>
Mon, 29 Apr 2013 10:38:15 +0000 (06:38 -0400)
committerBrian Aker <brian@tangent.org>
Mon, 29 Apr 2013 10:38:15 +0000 (06:38 -0400)
bootstrap.sh
configure.ac
libhashkit/aes.cc
m4/ax_harden_compiler_flags.m4
m4/ax_prog_sphinx_build.m4
man/include.am

index 6a93c970553b2509bb62d47cae14e27017517fdc..9a549f06cc9994fc41944291ed956778dbc38bbc 100755 (executable)
@@ -654,7 +654,7 @@ function make_for_snapshot ()
   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
@@ -857,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
@@ -872,9 +879,7 @@ function make_for_continuus_integration ()
       assert_file 'configure'
     fi
 
-    if [ -n "$BOOTSTRAP_SNAPSHOT_CHECK" ]; then
-      assert_file "$BOOTSTRAP_SNAPSHOT_CHECK" 'snapshot check failed'
-    fi
+    check_snapshot
   else
     # If we didn't require a snapshot, then we should not have a configure
     assert_no_file 'configure'
@@ -1611,6 +1616,7 @@ function bootstrap ()
       'snapshot')
         make_for_snapshot
         snapshot_run=true
+        check_snapshot
         ;;
       'rpm')
         make_rpm
index 2e3920cfcfbd23a59050fd548436cadd6e9ac554..f562fcd3fa7779ce7da88b82d46e70f085a4bfc7 100644 (file)
@@ -114,7 +114,7 @@ AC_PROG_AWK
 AC_PROG_MKDIR_P
 AC_PROG_SED
 AX_PROG_MEMCACHED
-AX_PROG_SPHINX_BUILD(,[AC_MSG_ERROR([sphinx-build version 1.0 or greater is required])])
+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])
 
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 b3b939217ad9c6acafc82e05dbe89f5716046ad3..2783f291b1befe5e5f56d5d0528189e43a58003b 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])
@@ -279,33 +281,35 @@ AC_DEFUN([_HARDEN_CXX_COMPILER_FLAGS],
           _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations])
           _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"],[
+          _APPEND_COMPILE_FLAGS_ERROR([-Weffc++])
+          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([-Wold-style-cast])
           _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered])
           _APPEND_COMPILE_FLAGS_ERROR([-Wunused])
           _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result])
@@ -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 2bbe57e2c453fe36c991c5427ee789a4ec1e34e7..3a89a3316b631cb655c55f381795eabd3c0b5699 100644 (file)
@@ -26,7 +26,12 @@ AC_DEFUN([AX_PROG_SPHINX_BUILD],
     AS_IF([test x"SPHINXBUILD" = x":"],
       [SPHINXBUILD=],
       [AS_IF([test -x "$SPHINXBUILD"],
-        [$SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+        [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
         ])
index f11f37a445ac4681ae668871789938db1a22322f..602cfa9680852f0d9711a5078f30027823cd4560 100644 (file)
@@ -3,8 +3,10 @@
 # All paths should be given relative to the root
 
 # Build rule for documentation
-$(dist_man_MANS): man
-BUILT_SOURCES+= $(dist_man_MANS)
+$(dist_man_MANS): $(top_srcdir)/configure.ac
+       $(MAKE) $(AM_MAKEFLAGS) man
+
+.NOTPARALLEL: $(dist_man_MANS)
 
 dist_man_MANS+= man/memaslap.1
 dist_man_MANS+= man/memcapable.1