From 28eb71adcf582a728d6ae7d00f7afbf8bd4a38c1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 31 Dec 2006 15:44:16 +0000 Subject: [PATCH] Check for a working C++ compiler in configure.ac (Closes #75) Thanks, tedp! git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1356 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index f3b9e41..89477e3 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,16 @@ AC_PROG_GCC_TRADITIONAL # libtool stuff AC_PROG_LIBTOOL +AC_CACHE_CHECK([whether the C++ compiler works], [avahi_cv_sys_cxx_works], [ + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([int main() { }], [avahi_cv_sys_cxx_works=yes], + [avahi_cv_sys_cxx_works=no]) + AC_LANG_POP([C++]) + ]) +[ if [ "x$avahi_cv_sys_cxx_works" = "xno" ]; then ] + AC_MSG_FAILURE([The C++ compiler does not work]) +[ fi ] + ACX_PTHREAD(,AC_MSG_ERROR([Missing POSIX Threads support])) # -- 2.39.5