From: Brian Aker Date: Fri, 22 Nov 2013 12:27:05 +0000 (-0500) Subject: Fix for compiling c++ with pthreads X-Git-Tag: 1.0.18~14^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=52549085a3f42554cf40c63d4f0d20ec7170a46a;p=m6w6%2Flibmemcached Fix for compiling c++ with pthreads --- 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