On Thu, 2007-02-01 at 00:59 -0500, Tom Lane wrote:
> Is there a way to detect via #if that profiling is enabled? I wouldn't
> expect a really portable answer, but maybe there's something that works
> for gcc?
What about a "--enable-gprof" (or "--enable-profiling"?) configure flag?
This could add the appropriate compiler flags to CFLAGS, enable
LINUX_PROFILE if on Linux, and enable the "gprof/pid" mkdir().
-Neil