From 2df6747e93282e30cac318252c487fc564728af2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 15 Jul 2009 18:26:51 +0200 Subject: [PATCH] Add option to disable compiler optimization --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b63808d..8223648 100644 --- a/configure.ac +++ b/configure.ac @@ -30,13 +30,20 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])]) AC_DISABLE_STATIC AC_PROG_LIBTOOL +AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], + [disable code optimization through compiler]), [ + if (test "${enableval}" = "no"); then + CFLAGS="$CFLAGS -O0" + fi +]) + GTK_DOC_CHECK AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [ if (test "${enableval}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then - CFLAGS="$CFLAGS -g -O0" + CFLAGS="$CFLAGS -g" fi ]) -- 2.7.4