diff options
author | Havoc Pennington <hp@redhat.com> | 2003-02-13 01:28:10 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-02-13 01:28:10 +0000 |
commit | 32dc75ee6b1bb06e8cc1b956e7d80b54f24b5df6 (patch) | |
tree | e0adedb78bb8e320f6701721c62428ca98fb38ad /configure.in | |
parent | 3791dcca16cb46b0ff7305beff75d1aa2645940c (diff) |
2003-02-12 Havoc Pennington <hp@pobox.com>
* dbus/Makefile.am: remove break-loader from the build, since it
moved.
* configure.in: add --enable-gcov to turn on coverage profiling
flags and disable optimization
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 8fb1cc6c..9fcee8e9 100644 --- a/configure.in +++ b/configure.in @@ -29,6 +29,7 @@ AC_ARG_ENABLE(tests, [ --enable-tests enable unit test code],enable_tests=$ AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no) AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=yes) AC_ARG_ENABLE(asserts, [ --enable-asserts include assertion checks],enable_asserts=$enableval,enable_asserts=yes) +AC_ARG_ENABLE(gcov, [ --enable-gcov compile with coverage profiling instrumentation (gcc only)],enable_gcov=$enableval,enable_gcov=no) dnl DBUS_BUILD_TESTS controls unit tests built in to .c files dnl and also some stuff in the test/ subdir @@ -44,8 +45,8 @@ if test x$enable_asserts = xno; then AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking]) fi -changequote(,)dnl if test "x$GCC" = "xyes"; then + changequote(,)dnl case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; @@ -97,8 +98,27 @@ if test "x$GCC" = "xyes"; then *) CFLAGS="$CFLAGS -pedantic" ;; esac fi + if test x$enable_gcov = xyes; then + case " $CFLAGS " in + *[\ \ ]-fprofile-arcs[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -fprofile-arcs" ;; + esac + case " $CFLAGS " in + *[\ \ ]-ftest-coverage[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -ftest-coverage" ;; + esac + + ## remove optimization + CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'` + fi + changequote([,])dnl +else + if test x$enable_gcov = xyes; then + AC_MSG_ERROR([--enable-gcov can only be used with gcc]) + fi fi -changequote([,])dnl + + AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) @@ -237,8 +257,10 @@ echo " prefix: ${prefix} source code location: ${srcdir} compiler: ${CC} + cflags: ${CFLAGS} Maintainer mode: ${USE_MAINTAINER_MODE} + gcc coverage profiling: ${enable_gcov} Building unit tests: ${enable_tests} Building verbose mode: ${enable_verbose_mode} Building assertions: ${enable_asserts} @@ -249,6 +271,9 @@ echo " if test x$enable_tests = xyes; then echo "NOTE: building with unit tests increases the size of the installed library" fi +if test x$enable_gcov = xyes; then + echo "NOTE: building with coverage profiling is definitely for developers only" +fi if test x$enable_verbose_mode = xyes; then echo "NOTE: building with verbose mode increases library size, but is probably a good idea anyway." fi |