Fix: don't build C++ example if a C++ compiler isn't available
[lttng-ust.git] / configure.ac
index 9d51e2e2411dc6b48d15601d2ebdd6c86cc09e43..24d16e9d4bfdbfd3615db0ac490dff1949dd0d78 100644 (file)
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([lttng-ust],[2.0.4],[mathieu dot desnoyers at efficios dot com])
+AC_INIT([lttng-ust],[2.0.6],[mathieu dot desnoyers at efficios dot com])
 
 # Following the numbering scheme proposed by libtool for the library version
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
@@ -64,12 +64,26 @@ AS_IF([test "x$libtool_fixup" = "xyes"],
                  ])
            ])
 
+AM_CONDITIONAL([NO_SHARED], [test "x$enable_shared" = "xno"])
+
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_MAKE_SET
 LT_INIT
 
+# rw_PROG_CXX_WORKS
+# Check whether the C++ compiler works.
+AC_CACHE_CHECK([whether the C++ compiler works],
+               [rw_cv_prog_cxx_works],
+               [AC_LANG_PUSH([C++])
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+                               [rw_cv_prog_cxx_works=yes],
+                               [rw_cv_prog_cxx_works=no])
+               AC_LANG_POP([C++])])
+
+AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
+
 ## Checks for libraries.
 AC_CHECK_LIB([dl], [dlopen])
 AC_CHECK_LIB([pthread], [pthread_create])
This page took 0.023939 seconds and 4 git commands to generate.