From ec1594416d7fc29c7baeeb10f7645934a9679bb5 Mon Sep 17 00:00:00 2001 From: Alban Crequy Date: Mon, 22 Aug 2011 16:57:52 +0100 Subject: Add a configure option for GProf It should help to investigate https://bugzilla.gnome.org/show_bug.cgi?id=657086 --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 977319090..cb60cf5f3 100644 --- a/configure.ac +++ b/configure.ac @@ -152,6 +152,17 @@ AS_COMPILER_FLAG(-Wstrict-prototypes, ERROR_CFLAGS="$ERROR_CFLAGS -Wstrict-proto AC_SUBST(ERROR_CFLAGS) +AC_ARG_ENABLE(gprof, + AS_HELP_STRING([--enable-gprof=@<:@no/yes@:>@], + [build with support for gprof]),, + [enable_gprof=no]) +if test "x$enable_gprof" != "xno" ; then + CFLAGS="$CFLAGS -pg" + LDFLAGS="$LDFLAGS -pg" +fi + +AC_SUBST(LDFLAGS) + # ----------------------------------------------------------- # Pkg-Config dependency checks # ----------------------------------------------------------- @@ -639,6 +650,7 @@ Configure summary: Compiler....................: ${CC} Compiler Flags..............: ${CFLAGS} ${ERROR_CFLAGS} + Linker Flags................: ${LDFLAGS} Prefix......................: ${prefix} Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS} -- cgit v1.2.3