summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-07-15 19:03:03 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-07-15 19:03:03 +0200
commit05f7912308ec2e0837b0456c8649eda8e14fa014 (patch)
tree06bb6614560dedd14da92de7d2a829f5f9cf3bac
parent3dcf25807a0cf7f8429cc6f35e009bb15500ab19 (diff)
downloadofono-05f7912308ec2e0837b0456c8649eda8e14fa014.tar.bz2
Add option to disable compiler optimization
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index cc650e17..640c3cde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,11 +23,18 @@ 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
+])
+
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
])