From 24dcddb216f309d1b93dad108995295f9ededf55 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Mon, 17 Feb 2014 15:33:07 -0800 Subject: [PATCH] Update autoconf scripts 1. Add patch to AX_TLS to let it work with AC v2.63. 2. AX_TLS() call needs a no-op in the false case. 3. Move AX_HARDEN call back to its original position. 4. Print CC rather than CC_VERSION in configuration summary. --- configure.ac | 8 ++++---- m4/ax_tls.m4 | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index e1ed459fb..32da5f401 100644 --- a/configure.ac +++ b/configure.ac @@ -95,7 +95,6 @@ AC_TYPE_UINT8_T AM_PROG_AS AM_PROG_CC_C_O LT_LIB_M -AX_HARDEN_CC_COMPILER_FLAGS OPTIMIZE_CFLAGS="-Os -fomit-frame-pointer" OPTIMIZE_FAST_CFLAGS="-O2 -fomit-frame-pointer" @@ -103,7 +102,7 @@ OPTIMIZE_HUGE_CFLAGS="-funroll-loops -DTFM_SMALL_SET -DTFM_HUGE_SET" DEBUG_CFLAGS="-g -DDEBUG -DDEBUG_CYASSL" # Thread local storage -AX_TLS([AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"]) +AX_TLS([AM_CFLAGS="$AM_CFLAGS -DHAVE_THREAD_LS"], [:]) # DEBUG AX_DEBUG @@ -1554,6 +1553,7 @@ then fi LIB_SOCKET_NSL +AX_HARDEN_CC_COMPILER_FLAGS # link to ws2_32 if on mingw case $host_os in @@ -1640,9 +1640,9 @@ echo "" echo " * Installation prefix: $prefix" echo " * System type: $host_vendor-$host_os" echo " * Host CPU: $host_cpu" -echo " * C Compiler: $CC_VERSION" +echo " * C Compiler: $CC" echo " * C Flags: $CFLAGS" -echo " * C++ Compiler: $CXX_VERSION" +echo " * C++ Compiler: $CXX" echo " * C++ Flags: $CXXFLAGS" echo " * CPP Flags: $CPPFLAGS" echo " * LIB Flags: $LIB" diff --git a/m4/ax_tls.m4 b/m4/ax_tls.m4 index 033e3b135..3f6b5e10b 100644 --- a/m4/ax_tls.m4 +++ b/m4/ax_tls.m4 @@ -44,7 +44,23 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 10 +#serial 11 + +# Define m4_ifblank and m4_ifnblank macros from introduced in +# autotools 2.64 m4sugar.m4 if using an earlier autotools. + +ifdef([m4_ifblank], [], [ + m4_define([m4_ifblank], + [m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$2], [$3])]) + ]) + + +ifdef([m4_ifnblank], [], [ + m4_define([m4_ifnblank], + [m4_if(m4_translit([[$1]], [ ][ ][ +]), [], [$3], [$2])]) + ]) AC_DEFUN([AX_TLS], [ AC_MSG_CHECKING(for thread local storage (TLS) class)