Add configure options for instrumentation: --enable-coverage & --enable-profiling
This commit is contained in:
parent
7310422053
commit
78b09e081f
|
@ -750,6 +750,8 @@ enable_silent_rules
|
|||
enable_extrawarnings
|
||||
enable_static
|
||||
enable_debug
|
||||
enable_coverage
|
||||
enable_profiling
|
||||
enable_dependency_tracking
|
||||
enable_commoncrypto
|
||||
enable_iconv
|
||||
|
@ -1395,6 +1397,8 @@ Optional Features:
|
|||
—-disable-extrawarnings do not compile with -Wextra warnings enabled
|
||||
--enable-static compile static binaries
|
||||
--enable-debug compile with debuging enabled
|
||||
--enable-coverage enable code coverage
|
||||
--enable-profiling enable profiling
|
||||
--enable-dependency-tracking
|
||||
do not reject slow dependency extractors
|
||||
--disable-dependency-tracking
|
||||
|
@ -3497,6 +3501,30 @@ $as_echo "#define NDEBUG 1" >>confdefs.h
|
|||
|
||||
fi
|
||||
|
||||
# Check whether --enable-coverage was given.
|
||||
if test "${enable_coverage+set}" = set; then :
|
||||
enableval=$enable_coverage;
|
||||
fi
|
||||
|
||||
if test "x$enable_coverage" = xyes
|
||||
then
|
||||
CFLAGS="${CFLAGS} --coverage"
|
||||
CXXFLAGS="${CXXFLAGS} --coverage"
|
||||
LDFLAGS="${LDFLAGS} --coverage"
|
||||
fi
|
||||
|
||||
# Check whether --enable-profiling was given.
|
||||
if test "${enable_profiling+set}" = set; then :
|
||||
enableval=$enable_profiling;
|
||||
fi
|
||||
|
||||
if test "x$enable_profiling" = xyes
|
||||
then
|
||||
CFLAGS="${CFLAGS} -pg"
|
||||
CXXFLAGS="${CXXFLAGS} -pg"
|
||||
LDFLAGS="${LDFLAGS} -pg"
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -44,6 +44,22 @@ else
|
|||
AC_DEFINE(NDEBUG, 1, [Compile without debug code])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(coverage, [ --enable-coverage enable code coverage])
|
||||
if test "x$enable_coverage" = xyes
|
||||
then
|
||||
CFLAGS="${CFLAGS} --coverage"
|
||||
CXXFLAGS="${CXXFLAGS} --coverage"
|
||||
LDFLAGS="${LDFLAGS} --coverage"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(profiling, [ --enable-profiling enable profiling])
|
||||
if test "x$enable_profiling" = xyes
|
||||
then
|
||||
CFLAGS="${CFLAGS} -pg"
|
||||
CXXFLAGS="${CXXFLAGS} -pg"
|
||||
LDFLAGS="${LDFLAGS} -pg"
|
||||
fi
|
||||
|
||||
dnl ###################
|
||||
dnl Checks for programs
|
||||
dnl ###################
|
||||
|
|
Loading…
Reference in New Issue