From b073677225181b9ab525a8304cb2a2cdcaac0277 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Mon, 29 Apr 2013 06:38:15 -0400 Subject: [PATCH] Fixes for --- bootstrap.sh | 14 +++- configure.ac | 2 +- libhashkit/aes.cc | 18 ++-- m4/ax_harden_compiler_flags.m4 | 149 +++++++++++++++++---------------- m4/ax_prog_sphinx_build.m4 | 7 +- man/include.am | 6 +- 6 files changed, 108 insertions(+), 88 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 6a93c970..9a549f06 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 diff --git a/configure.ac b/configure.ac index 2e3920cf..f562fcd3 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/libhashkit/aes.cc b/libhashkit/aes.cc index c7083a6e..12adcae3 100644 --- a/libhashkit/aes.cc +++ b/libhashkit/aes.cc @@ -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); diff --git a/m4/ax_harden_compiler_flags.m4 b/m4/ax_harden_compiler_flags.m4 index b3b93921..2783f291 100644 --- a/m4/ax_harden_compiler_flags.m4 +++ b/m4/ax_harden_compiler_flags.m4 @@ -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 @@ -45,15 +45,15 @@ # 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]) ])])])]) diff --git a/m4/ax_prog_sphinx_build.m4 b/m4/ax_prog_sphinx_build.m4 index 2bbe57e2..3a89a331 100644 --- a/m4/ax_prog_sphinx_build.m4 +++ b/m4/ax_prog_sphinx_build.m4 @@ -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 ]) diff --git a/man/include.am b/man/include.am index f11f37a4..602cfa96 100644 --- a/man/include.am +++ b/man/include.am @@ -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 -- 2.30.2