diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-10-31 20:30:06 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-10-31 23:22:26 -0400 |
commit | c36581bc01fc8891ea43d4c455961bb39ea54904 (patch) | |
tree | 4b9ad177ecdbb7a2e8fed7640cd31bfa096a1d7c | |
parent | cff94b97ca2e3a4b7396845a7a2fd1c9ab812d55 (diff) | |
download | dimension-c36581bc01fc8891ea43d4c455961bb39ea54904.tar.xz |
Add --enable-debug configure option.
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | libdimension-python/Makefile.am | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index bafc63e..5652aff 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ AC_ARG_ENABLE([png], if test "$enable_png" != "no"; then PKG_CHECK_MODULES([libpng], [libpng], [enable_png=yes], [test "$enable_png" = "yes" && AC_MSG_ERROR([libpng not found]) - enable_png-no]) + enable_png=no]) AC_SUBST(libpng_CFLAGS) AC_SUBST(libpng_LIBS) fi @@ -76,6 +76,17 @@ AC_ARG_ENABLE([profile], [enable_profile=no]) AM_CONDITIONAL([PROFILE], [test "$enable_profile" = "yes"]) +dnl Debug/release builds +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [Perform potentially expensive sanity checks while running [default=no]])], + [], + [enable_debug=no]) +if test "$enable_debug" = "no"; then + AC_DEFINE([NDEBUG], [1]) +fi +AM_CONDITIONAL([DEBUG], [test "$enable_debug" = "yes"]) + dnl Python headers PKG_CHECK_MODULES([Python], [python3 >= 3.2], [], diff --git a/libdimension-python/Makefile.am b/libdimension-python/Makefile.am index 33e93a5..6e76591 100644 --- a/libdimension-python/Makefile.am +++ b/libdimension-python/Makefile.am @@ -26,7 +26,11 @@ AM_CFLAGS = $(Python_CFLAGS) AM_LDFLAGS = $(Python_LDFLAGS) wrapper.c: wrapper.pyx wrapper.pxd +if DEBUG cython --line-directives wrapper.pyx +else + cython wrapper.pyx +endif pkgpyexec_LTLIBRARIES = wrapper.la wrapper_la_SOURCES = wrapper.c \ |