From da7b63972d83c1b755f3f096d3f2724261e77e65 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 15 Jan 2002 11:20:26 +0000 Subject: [PATCH] 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. --- configure.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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. -- 2.34.1