Add --enable-profile to turn on gprof. This is not perfect, because
authorMartin Pool <mbp@samba.org>
Tue, 15 Jan 2002 11:20:26 +0000 (11:20 +0000)
committerMartin Pool <mbp@samba.org>
Tue, 15 Jan 2002 11:20:26 +0000 (11:20 +0000)
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

index b5b5e9a..38acc96 100644 (file)
@@ -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.