From 52549085a3f42554cf40c63d4f0d20ec7170a46a Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 22 Nov 2013 07:27:05 -0500 Subject: [PATCH] Fix for compiling c++ with pthreads --- configure.ac | 10 ++++------ m4/ax_pthread.m4 | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 696f9bae..2b7bfd54 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,7 @@ AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible c AC_DEFUN([CHECK_CXX0X],[ AC_LANG_PUSH([C++]) AX_CHECK_COMPILE_FLAG([-std=c++0x],[ - CXXFLAGS="$CXXFLAGS -std=c++0x"]) + CXX="$CXX -std=c++0x"]) AC_LANG_POP([C++]) ]) CHECK_CXX0X @@ -71,10 +71,6 @@ AX_PLATFORM m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -AX_CXX_HEADER_STDCXX_98 -AS_IF([test "x$ax_cv_cxx_stdcxx_98" = "xno"], - [AC_MSG_ERROR([Your system lacks a new enough C++ compiler])]) - AC_DEFUN([LIBMEMCACHED_PROTOCOL], [AC_ARG_ENABLE([libmemcachedprotocol], [AS_HELP_STRING([--enable-libmemcachedprotocol], @@ -297,8 +293,10 @@ SOCKET_SEND_FLAGS AX_UUID_GENERATE_TIME_SAFE AC_DEFUN([CHECK_FOR_PTHREAD_AND_SASL], - [AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])]) + [AC_LANG_PUSH([C++]) + AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])]) AX_PTHREAD_TIMEDJOIN_NP + AC_LANG_POP([C++]) # The sasl functions should only be visible if we build with sasl support # diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 index ebea7fb5..007f6276 100644 --- a/m4/ax_pthread.m4 +++ b/m4/ax_pthread.m4 @@ -87,7 +87,6 @@ AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h @@ -328,5 +327,4 @@ else ax_pthread_ok=no $2 fi -AC_LANG_POP ])dnl AX_PTHREAD -- 2.30.2