summaryrefslogtreecommitdiff
path: root/devel/ccache/files/extra-patch-memcached-configure.ac
blob: b71e2d8838752dc5c5ac941cc9b10dc04e7f4326 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- 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,