summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in36
1 files changed, 5 insertions, 31 deletions
diff --git a/configure.in b/configure.in
index 2b1929ed..9485ebb4 100644
--- a/configure.in
+++ b/configure.in
@@ -71,6 +71,8 @@ AC_HEADER_STDC
AC_C_INLINE
AM_PROG_LIBTOOL
AC_PROG_MKDIR_P
+COMPILER_COVERAGE
+COMPILER_OPTIMISATIONS
# Set some internal variables depending on the platform for later use.
dbus_win=no
@@ -128,7 +130,6 @@ AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion chec
AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes)
AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto)
AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)
-AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no)
AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto)
AC_ARG_ENABLE(libaudit,AS_HELP_STRING([--enable-libaudit],[build audit daemon support for SELinux]),enable_libaudit=$enableval,enable_libaudit=auto)
@@ -202,20 +203,10 @@ if test x$enable_userdb_cache = xyes; then
AC_DEFINE(DBUS_ENABLE_USERDB_CACHE,1,[Build with caching of user data])
fi
-if test x$enable_gcov = xyes; then
+if test x$enable_compiler_coverage = xyes; then
## so that config.h changes when you toggle gcov support
AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
-
- AC_MSG_CHECKING([for gcc 3.3 version of gcov file format])
- have_gcc33_gcov=no
- AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])],
- have_gcc33_gcov=yes)
- if test x$have_gcc33_gcov = xyes ; then
- AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format])
- fi
- AC_MSG_RESULT($have_gcc33_gcov)
fi
-AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
# glibc21.m4 serial 3
dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
@@ -1295,24 +1286,7 @@ 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
AC_SUBST(PIC_CFLAGS)
@@ -1704,7 +1678,7 @@ echo "
echo "
Maintainer mode: ${USE_MAINTAINER_MODE}
- gcc coverage profiling: ${enable_gcov}
+ gcc coverage profiling: ${enable_compiler_coverage}
Building unit tests: ${enable_tests}
Building verbose mode: ${enable_verbose_mode}
Building assertions: ${enable_asserts}
@@ -1743,7 +1717,7 @@ fi
if test x$enable_tests = xyes -a x$enable_asserts = xno; then
echo "NOTE: building with unit tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests)"
fi
-if test x$enable_gcov = xyes; then
+if test x$enable_compiler_coverage = xyes; then
echo "NOTE: building with coverage profiling is definitely for developers only."
fi
if test x$enable_verbose_mode = xyes; then