summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilippo Giunchedi <filippo@esaurito.net>2009-10-04 13:25:34 (GMT)
committer Filippo Giunchedi <filippo@esaurito.net>2009-10-04 13:25:34 (GMT)
commit9a7bc5c40624dc73ada04f37812d4fbd712d62ce (patch)
tree4cf601bfad5c02a58972ed8006a5910e76f505f3
parent3d5c5ce0553aaad21b355b11dc1d0a5bdb464f97 (diff)
configure.ac: rework profiling section
-rw-r--r--configure.ac19
1 files changed, 8 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 0c44483..931b89f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,19 +399,16 @@ if test x$enable_debug = xyes; then
fi
-
-
dnl ==============================================================================
dnl CHECK to use profiling flags when compiling, for execution analysis with gprof
dnl ==============================================================================
AC_ARG_ENABLE(profiling,
-[ --enable-profiling compile using gprof flags for execution analysis (no)],
-[ if test ! x$enableval = xyes; then
- have_profiling=no
- else
- have_profiling=yes;
- fi ],[ have_profiling=no ])
-if test x$have_profiling = xyes; then
+ AS_HELP_STRING([--enable-profiling],
+ [compile using gprof flags for execution analysis (no)]),
+ [enable_profiling=$enableval],
+ [enable_profiling=no])
+
+if test x$enable_profiling = xyes; then
GLOBAL_CFLAGS="$GLOBAL_CFLAGS -pg"
fi
@@ -427,7 +424,7 @@ AC_ARG_ENABLE(lubrify,
fi ],[ have_lubrifications=yes ])
if test x$have_lubrifications = xyes; then
# LUBRIFY_CFLAGS="-O4 -fomit-frame-pointer -march=${host_cpu} -finline-functions -ffast-math -funroll-loops"
- if test x$have_profiling = xyes -o x$enable_debug = xyes; then
+ if test x$enable_profiling = xyes -o x$enable_debug = xyes; then
AC_MSG_WARN([cannot lubrify code if debug or profiling are enabled])
GLOBAL_CFLAGS="$GLOBAL_CFLAGS -ggdb"
else
@@ -533,7 +530,7 @@ else
echo ":: DEBUG informations OFF"
fi
-if test "$have_profiling" = "yes"; then
+if test "$enable_profiling" = "yes"; then
echo ":: PROFILING informations ON (to use with gprof)"
else
echo ":: PROFILING informations OFF (see man gprof)"