Add option to disable compiler optimization
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 15 Jul 2009 16:26:51 +0000 (18:26 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 15 Jul 2009 16:26:51 +0000 (18:26 +0200)
configure.ac

index b63808d63a3186346711f1145d527a59821e2e06..8223648e4b679db49964f61fc5c2792899c3dcd7 100644 (file)
@@ -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
 ])