# Enable asserts and additional debugging
%bcond_with developer
+# Integrate with gperftools
+%bcond_with gperftools
+
# Enable various clang/gcc debugging tool support
%bcond_with address_sanitizer
%bcond_with leak_sanitizer
%endif
%if %{with developer}
--enable-developer=yes \
+%endif
+%if %{with gperftools}
--with-gperftools \
%endif
%if %{with address_sanitizer}
# include <openssl/engine.h>
#endif
+#ifdef HAVE_GPERFTOOLS_PROFILER_H
+# include <gperftools/profiler.h>
+#endif
+
#ifdef HAVE_VALGRIND_H
# include <valgrind.h>
#endif
dependency_feature_add(cs, "runtime-lsan", (fr_get_lsan_state() == 1));
#endif
+#ifdef HAVE_GPERFTOOLS_PROFILER_H
+ {
+ struct ProfilerState state;
+
+ ProfilerGetCurrentState(&state);
+ /*
+ * Were we build with gperftools support,
+ * and is it currently enabled.
+ */
+ dependency_feature_add(cs, "gperftools", state.enabled);
+ }
+#endif
+
#ifdef HAVE_VALGRIND_H
/*
* Are we running under valgrind