Mercurial > libpst
diff configure.in @ 288:fa7fc1ac6385
add gprof profiling option; allow fork for parallel processing of individual email folders in separate mode
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 27 May 2011 09:50:24 -0700 |
parents | 6a9f92d4e449 |
children | 5b3e7661adad |
line wrap: on
line diff
--- a/configure.in Tue May 24 17:01:00 2011 -0700 +++ b/configure.in Fri May 27 09:50:24 2011 -0700 @@ -268,7 +268,7 @@ case "${enableval}" in yes) ;; no) ;; - *) AC_MSG_ERROR(bad value ${enableval} for --static-tools) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-static-tools) ;; esac ], [ @@ -324,6 +324,34 @@ fi +# The following lines adds the --enable-profiling option to configure: +# +# Give the user the choice to enter one of these: +# --enable-profiling +# --enable-profiling=yes +# --enable-profiling=no +# +AC_MSG_CHECKING([whether to link with gprof profiling]) +AC_ARG_ENABLE([profiling], + AC_HELP_STRING([--enable-profiling], [link with gprof profiling]), + [ + case "${enableval}" in + yes) + CFLAGS="$CFLAGS -pg" + CPPFLAGS="$CPPFLAGS -pg" + CXXFLAGS="$CXXFLAGS -pg" + ;; + no) + ;; + *) AC_MSG_ERROR(bad value ${enableval} for --profiling) ;; + esac + ], + [ + enable_profiling=no + ]) +AC_MSG_RESULT([$enable_profiling]) +AM_CONDITIONAL(GPROF_PROFILING, [test "$enable_profiling" = "yes"]) + AC_OUTPUT( \ Makefile \