diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 18 |
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) |