summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-12-24 22:38:42 -0500
committerDmitri Pal <dpal@redhat.com>2011-01-03 15:00:42 -0500
commit574be6d8c0896c8bee0c16224f52c2dbea48a44e (patch)
treefe07531ea8086f262bf9ce62850eeab4f3961164 /configure.ac
parent68ecd60fac51706c743a5c4a4cfe87ec6ca9d304 (diff)
downloadding-libs-574be6d8c0896c8bee0c16224f52c2dbea48a44e.tar.gz
ding-libs-574be6d8c0896c8bee0c16224f52c2dbea48a44e.tar.xz
ding-libs-574be6d8c0896c8bee0c16224f52c2dbea48a44e.zip
[BUILD] Allow trace per component
This patch add ability to build tracing for each component independently.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2e22e8a..d1b68f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,11 +39,24 @@ AC_PATH_PROG([DOXYGEN], [doxygen], [false])
AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ])
# Enable trace build
+# To turn on the tracing of one of the componenets one has not only
+# to enable it with --enable-trace but to drop a file named "trace"
+# into a corresponding directory.
+# Tracing can be built for collection, ini, refarray or basicobjects.
+# The approach allows building different libraries with trace
+# independent of each other.
AC_ARG_ENABLE([trace],
[AS_HELP_STRING([--enable-trace[=LEVEL]],[build with low level tracing enabled])],
[trace_level="$enableval"],
[trace_level="0"])
-AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] ],[AC_SUBST([TRACE_VAR],["-DTRACE_LEVEL=$trace_level"])])
+AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] -a [ -e $srcdir/ini/trace] ],
+ [AC_SUBST([TRACE_INI],["-DTRACE_LEVEL=$trace_level"])])
+AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] -a [ -e $srcdir/collection/trace] ],
+ [AC_SUBST([TRACE_COLLECTION],["-DTRACE_LEVEL=$trace_level"])])
+AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] -a [ -e $srcdir/refarray/trace] ],
+ [AC_SUBST([TRACE_REFARRAY],["-DTRACE_LEVEL=$trace_level"])])
+AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] -a [ -e $srcdir/basicobjects/trace] ],
+ [AC_SUBST([TRACE_BASICOBJECTS],["-DTRACE_LEVEL=$trace_level"])])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([long long])