--- configure.ac.orig 2017-03-09 12:57:19.209816000 -0800 +++ configure.ac 2017-03-09 13:00:24.478539000 -0800 @@ -28,6 +28,10 @@ AC_PROG_CC_C99 if test "$ac_cv_prog_cc_c99" = no; then AC_MSG_ERROR(cannot find a C99-compatible compiler) fi +AC_PROG_CXX +if test "$ac_cv_prog_cxx" = no; then + AC_MSG_ERROR(cannot find a C++-compatible compiler) +fi AC_PROG_CPP AC_PROG_INSTALL @@ -97,6 +101,9 @@ AC_ARG_ENABLE(memcached, [AS_HELP_STRING([--enable-memcached], [enable memcached as a cache backend])]) +# Need to use C++ compiler for linking -lmemcached as static, rather than +# hacking in GCC's -lstdc++, since we may be using Clang. +AC_LANG(C++) dnl enable-memcached: Check if -lmemcached is needed. if test x${enable_memcached} != x; then if test x${enable_static} != x; then @@ -110,6 +117,7 @@ if test x${enable_memcached} != x; then ]) ccache_memcached='CCACHE_MEMCACHED=1 ' fi +AC_LANG(C) dnl Check for zlib AC_ARG_WITH(bundled-zlib,