From: Martin Pool Date: Tue, 15 Jan 2002 11:20:26 +0000 (+0000) Subject: Add --enable-profile to turn on gprof. This is not perfect, because X-Git-Tag: v2.5.2pre1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da7b63972d83c1b755f3f096d3f2724261e77e65;p=thirdparty%2Frsync.git Add --enable-profile to turn on gprof. This is not perfect, because it seems to only write to ./gmon.out, and that causes trouble when there are several rsync processes in the same directory. But you can make it work. --- diff --git a/configure.in b/configure.in index b5b5e9aa..38acc96e 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,21 @@ else dnl CFLAGS=${CFLAGS-"-g"} fi + + + +AC_ARG_ENABLE(profile, + AC_HELP_STRING([--enable-profile], + [turn on CPU profiling (default no)], + [], [])) +if test x"$enable_profile" = xyes +then + CFLAGS="$CFLAGS -pg" +fi + + +# This is needed for our included version of popt. Kind of silly, but +# I don't want our version too far out of sync. CFLAGS="$CFLAGS -DHAVE_CONFIG_H" # If GCC, turn on warnings.