diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2009-07-03 13:04:57 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2009-07-03 13:04:57 +0000 |
commit | 9fe40f0e26340190a179651f1498a462d11f9e5b (patch) | |
tree | bd31ba9ccf22f4eff33d55de0c28a374890ecce9 /configure.in | |
parent | 72ec0c8d03f32629971da18e0baa631fc7cb3e0a (diff) | |
download | emacs-9fe40f0e26340190a179651f1498a462d11f9e5b.tar.gz |
(--enable-profiling): New option.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.in b/configure.in index a1b02dced8b..3bcd60b3860 100644 --- a/configure.in +++ b/configure.in @@ -273,6 +273,19 @@ if test x$ac_gc_check_cons_list != x ; then [Define this to check for errors in cons list.]) fi +AC_ARG_ENABLE(profiling, +[ --enable-profiling + Build emacs with profiling support. + This might not work on all platforms.], +[ac_enable_profiling="${enableval}"],[]) +if test x$ac_enable_profiling != x ; then + PROFILING_CFLAGS="-DPROFILING=1 -pg" + PROFILING_LDFLAGS="-pg" +else + PROFILING_CFLAGS= + PROFILING_LDFLAGS= +fi + #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the path through pwd unnecessarily, since pwd can #### give you automounter prefixes, which can go away. We do all this @@ -931,7 +944,7 @@ configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' /* Get the CFLAGS for real compilation. */ #ifdef __GNUC__ -configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}' +configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' #else configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' #endif @@ -939,6 +952,8 @@ configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' #endif /* not THIS_IS_CONFIGURE */ ' > ${tempcname} +LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" + # The value of CPP is a quoted variable reference, so we need to do this # to get its actual value... CPP=`eval "echo $CPP"` |