1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

allow setting profiling gcc flags without hassle

And also ignore the files generated hereby. ;)
This commit is contained in:
Phil Sutter 2009-09-20 19:18:17 +02:00
parent cfccea4079
commit 5c67c0dc97
2 changed files with 20 additions and 0 deletions

3
.gitignore vendored
View File

@ -32,6 +32,9 @@ src/build.h
src/config.h
src/defconfig.h
src/*.o
src/*.gcda
src/*.gcno
src/*.gcov
conky-*.tar.*
doc/*.html
doc/*.mxml

View File

@ -921,6 +921,23 @@ if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
fi
fi
dnl
dnl profiling
dnl
AC_ARG_ENABLE([profiling],
AC_HELP_STRING([--enable-profiling], [specify compiler flags for use with gprof and gcov @<:@default=no@:>@]),
[want_profiling="$enableval"], [want_profiling=no])
if test "x$want_profiling" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
if test "x$want_debug" = "xyes"; then
conky_CFLAGS="$conky_CFLAGS -pg -fprofile-arcs -ftest-coverage"
else
conky_CFLAGS="$conky_CFLAGS -g3 -pg -fprofile-arcs -ftest-coverage"
fi
AC_DEFINE([PROFILING], [], [Define for profiling (gprof and gcov) support])
fi
AC_SUBST(conky_CFLAGS)
AC_SUBST(conky_LIBS)
AC_SUBST(X11_LIBS)