summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-06-18 02:47:22 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-06-18 02:47:22 (GMT)
commit56f6a4f225140e98bc3333cdf913c5043ff97538 (patch)
treeeb4d43272108bab542673a6768bfef1e50b6f5d9 /configure.in
parent964c798a94a77eda6cc61f7530d71b8c32f25a3e (diff)
downloadcpython-56f6a4f225140e98bc3333cdf913c5043ff97538.zip
cpython-56f6a4f225140e98bc3333cdf913c5043ff97538.tar.gz
cpython-56f6a4f225140e98bc3333cdf913c5043ff97538.tar.bz2
allow developers to more easily build a profiling version of the interpreter
and modules by configuring with the --enable-profiling flag.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index cff0ed3..7e13874 100644
--- a/configure.in
+++ b/configure.in
@@ -485,6 +485,24 @@ then
fi
AC_MSG_RESULT($enable_shared)
+AC_MSG_CHECKING(for --enable-profiling)
+AC_ARG_ENABLE(profiling,
+ AC_HELP_STRING(--enable-profiling, enable C-level code profiling),
+[ac_save_cc="$CC"
+ CC="$CC -pg"
+ AC_TRY_RUN([int main() { return 0; }],
+ ac_enable_profiling="yes",
+ ac_enable_profiling="no",
+ ac_enable_profiling="no")
+ CC="$ac_save_cc"])
+AC_MSG_RESULT($ac_enable_profiling)
+
+case "$ac_enable_profiling" in
+ "yes")
+ BASECFLAGS="-pg $BASECFLAGS"
+ LDFLAGS="-pg $LDFLAGS"
+ ;;
+esac
AC_MSG_CHECKING(LDLIBRARY)