2008-08-27 20:38:55 +00:00
|
|
|
dnl
|
2010-04-06 12:46:19 +00:00
|
|
|
dnl Debugging, profiling and optimization options
|
2008-08-27 20:38:55 +00:00
|
|
|
dnl
|
2010-08-10 20:27:12 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([debug],
|
2010-04-06 12:46:19 +00:00
|
|
|
AC_HELP_STRING([--enable-debug],[compile with debug information (no)]),
|
2010-08-10 20:27:12 +00:00
|
|
|
[],
|
|
|
|
[enable_debug=no])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([profiling],
|
2010-04-06 12:46:19 +00:00
|
|
|
AC_HELP_STRING([--enable-profiling],[compile with profiling information (no)]),
|
2010-08-10 20:27:12 +00:00
|
|
|
[],
|
|
|
|
[enable_profiling=no])
|
|
|
|
|
2010-08-21 11:53:20 +00:00
|
|
|
AC_ARG_ENABLE([optimization],
|
|
|
|
AC_HELP_STRING([--enable-optimization],[compile with optimization: -O3 (yes)]),
|
|
|
|
[],
|
|
|
|
[if test x"$enable_debug" = xyes ; then
|
|
|
|
enable_optimization=no
|
|
|
|
else
|
|
|
|
enable_optimization=yes
|
|
|
|
fi])
|
|
|
|
|
|
|
|
DEBUG_CFLAGS=""
|
|
|
|
OPTIMIZATION_CFLAGS=""
|
|
|
|
PROFILING_CFLAGS=""
|
|
|
|
PROFILING_LIBS=""
|
|
|
|
|
2010-08-10 20:27:12 +00:00
|
|
|
if test x"$enable_debug" = xyes ; then
|
|
|
|
DEBUG_CFLAGS="-g -DDEBUG"
|
|
|
|
fi
|
|
|
|
|
2010-08-21 11:53:20 +00:00
|
|
|
if test x"$enable_optimization" = xyes; then
|
|
|
|
OPTIMIZATION_CFLAGS="-O3"
|
2010-08-10 20:27:12 +00:00
|
|
|
fi
|
|
|
|
|
2010-08-16 21:51:52 +00:00
|
|
|
if test x"$enable_profiling" = xyes ; then
|
2010-08-10 20:27:12 +00:00
|
|
|
PROFILING_CFLAGS="-pg"
|
|
|
|
PROFILING_LIBS="-pg"
|
|
|
|
fi
|
2008-08-27 20:38:55 +00:00
|
|
|
|
|
|
|
AC_SUBST(DEBUG_CFLAGS)
|
|
|
|
AC_SUBST(PROFILING_CFLAGS)
|
|
|
|
AC_SUBST(PROFILING_LIBS)
|
|
|
|
AC_SUBST(OPTIMIZATION_CFLAGS)
|