AC_LANG_POP
CXXFLAGS="$old_CXXFLAGS"
])
-AM_CONDITIONAL([ENABLE_STACKPROF],[test "x${ac_cv_header_linux_perf_event_h}x${ac_cv_have_cxx20_format_h}x${HAVE_CXX20}" = "xyesxyesxyes" ])
-
+AS_IF([test "x${ac_cv_header_linux_perf_event_h}x${ac_cv_have_cxx20_format_h}x${HAVE_CXX20}" = "xyesxyesxyes" ],[enable_stackprof=yes],[enable_stackprof=no])
+AM_CONDITIONAL(ENABLE_STACKPROF, test "x$enable_stackprof" = "xyes")
+if test "x${ac_cv_header_linux_perf_event_h}x$enable_stackprof" = "xyesxno"; then
+ AC_MSG_WARN([Unable to build eu-stackprof, missing C++20 with format.h])
+fi
AC_CHECK_HEADERS([execinfo.h])