build improvements and a logging fix

master
Marc Wäckerlin 8 years ago
parent df16c058fd
commit adf3048247
  1. 34
      configure.ac
  2. 12
      src/autofunctiontracelog4cxx.cxx

@ -9,7 +9,8 @@
PROJECT_URL="https://dev.marc.waeckerlin.org/projects/mrw-c++" PROJECT_URL="https://dev.marc.waeckerlin.org/projects/mrw-c++"
m4_define(x_package_name, mrw-c++) # project's name m4_define(x_package_name, mrw-c++) # project's name
m4_define(x_major, 4) # project's major version m4_define(x_major, 4) # project's major version
m4_define(x_minor, 4) # project's minor version m4_define(x_minor, 5) # project's minor version
m4_define(x_least_diff, 469) # diff in minor
m4_include(ax_init_standard_project.m4) m4_include(ax_init_standard_project.m4)
AC_INIT(x_package_name, x_version, x_bugreport, x_package_name) AC_INIT(x_package_name, x_version, x_bugreport, x_package_name)
AM_INIT_AUTOMAKE([1.9 tar-pax]) AM_INIT_AUTOMAKE([1.9 tar-pax])
@ -186,6 +187,36 @@ AC_SUBST(THREADS)
AX_OUTPUT AX_OUTPUT
# infos and warnings # infos and warnings
if test "$have_valgrind" != "yes"; then
AC_MSG_WARN([Feature Valgrind is disabled, to use it --enable-valgrind])
fi
if test "$with_threads" != "yes"; then
AC_MSG_WARN([Feature Threads is disabled, to use it --enable-threads])
fi
if test "$with_autofntrace" != "yes"; then
AC_MSG_WARN([Feature Automatic Function Trace is disabled, to use it --enable-autofntrace])
fi
if test "$have_dir" != "yes"; then
AC_MSG_WARN([Feature POSIX Directory Access is disabled, to use it --enable-dir])
fi
if test "$have_exec" != "yes"; then
AC_MSG_WARN([Feature UNIX Fork Execute is disabled, to use it --enable-exec])
fi
if test "$have_regex" != "yes"; then
AC_MSG_WARN([Feature Regular Expressions is disabled, to use it --enable-regex])
fi
if test "$have_log4cxx" != "yes"; then
AC_MSG_WARN([Feature Log4cxx Logging is disabled, to use it --enable-log4cxx])
fi
if test "$have_ltdl" != "yes"; then
AC_MSG_WARN([Feature LibTool Library is disabled, to use it --enable-ltdl])
fi
if test "$have_dynamicstack" != "yes"; then
AC_MSG_WARN([Feature Dynamic Stack is disabled, to use it --enable-dynamicstack])
fi
if test "$have_stacktrace" != "yes"; then
AC_MSG_WARN([Feature Stack Trace is disabled, to use it --enable-stacktrace])
fi
if test "$with_threads" = "no"; then if test "$with_threads" = "no"; then
AC_MSG_WARN([Multithreading support is disabled! AC_MSG_WARN([Multithreading support is disabled!
- use --enable-threads to enable it - use --enable-threads to enable it
@ -225,3 +256,4 @@ stacktrace is disabled or ltdl is disabled.
--enable-dynamic-stack should always be used together with options --enable-dynamic-stack should always be used together with options
--enable-stacktrace and --enable-stacktrace and
--enable-ltdl]);fi --enable-ltdl]);fi
AC_MSG_NOTICE([configuration done for ${PACKAGE_STRING}])

@ -197,9 +197,9 @@ extern "C" void __cyg_profile_func_enter(void *this_fn, void*) {
(hierarchy.rfind(' ', std::min(hierarchy.find('<'), (hierarchy.rfind(' ', std::min(hierarchy.find('<'),
hierarchy.find("operator")))); hierarchy.find("operator"))));
if (p!=std::string::npos) hierarchy.erase(0, p+1); if (p!=std::string::npos) hierarchy.erase(0, p+1);
// hierarchy.erase hierarchy.erase
// (hierarchy.find_first_not_of (hierarchy.find_first_not_of
// ("qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM1234567890_.")); ("qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM1234567890_."));
if (hierarchy=="") hierarchy = "global"; if (hierarchy=="") hierarchy = "global";
std::string name("mrw.fn."+hierarchy); std::string name("mrw.fn."+hierarchy);
log4cxx::Logger* logger log4cxx::Logger* logger
@ -238,9 +238,9 @@ extern "C" void __cyg_profile_func_exit(void *this_fn, void*) {
(hierarchy.rfind(' ', std::min(hierarchy.find('<'), (hierarchy.rfind(' ', std::min(hierarchy.find('<'),
hierarchy.find("operator")))); hierarchy.find("operator"))));
if (p!=std::string::npos) hierarchy.erase(0, p+1); if (p!=std::string::npos) hierarchy.erase(0, p+1);
// hierarchy.erase hierarchy.erase
// (hierarchy.find_first_not_of (hierarchy.find_first_not_of
// ("qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM1234567890_.")); ("qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM1234567890_."));
if (hierarchy=="") hierarchy = "global"; if (hierarchy=="") hierarchy = "global";
std::string name("mrw.fn."+hierarchy); std::string name("mrw.fn."+hierarchy);
log4cxx::Logger* logger log4cxx::Logger* logger

Loading…
Cancel
Save