]> git.meshlink.io Git - catta/commitdiff
Check for a working C++ compiler in configure.ac (Closes #75) Thanks, tedp!
authorLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 15:44:16 +0000 (15:44 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 31 Dec 2006 15:44:16 +0000 (15:44 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1356 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

configure.ac

index f3b9e413407826670a95f9b7d5c2c00b0d6f5808..89477e3de24e3e41ccae596e9fa9eec839362bc3 100644 (file)
@@ -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]))
 
 #