Permalink
Browse files

COUCHDB-1699: configure: C++ compiler detection improvement

- amended patch to resolve detection failures on Windows, OSX, and gentoo
  • Loading branch information...
1 parent 4e3d674 commit d9e3c58b930315189a4141891bd49d5d212c1059 @breser breser committed with dch Mar 19, 2013
Showing with 2 additions and 7 deletions.
  1. +2 −7 configure.ac
View
@@ -44,14 +44,9 @@ m4_define([snappy_minor], [0])
m4_define([snappy_patchlevel], [3])
AC_PROG_CXX
-AC_MSG_CHECKING([that we found a C++ compiler])
-if test -n "$ac_ct_CXX" ; then
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([A C++ compiler is required.])
-fi
AC_LANG([C++])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],,
+ AC_MSG_ERROR([A C++ compiler is required.]))
AC_C_BIGENDIAN
AC_CHECK_HEADERS([stdint.h stddef.h sys/mman.h sys/resource.h])
AC_CHECK_FUNC([mmap])

0 comments on commit d9e3c58

Please sign in to comment.