diff options
| author | Dennis Camera <cdist@dtnr.ch> | 2021-04-02 15:37:41 +0200 |
|---|---|---|
| committer | Dennis Camera <skonfig@dtnr.ch> | 2022-08-03 17:19:04 +0200 |
| commit | a2a49a4365691a56b87ac1e723b7c8a33880c74b (patch) | |
| tree | 33b4573a115a2894b49b12d09e35b0ead5008c06 /configure.ac | |
| parent | dd498274f02e043c094e1be85e8e1dc3f13f3e61 (diff) | |
| download | skonfig-c-a2a49a4365691a56b87ac1e723b7c8a33880c74b.tar.gz skonfig-c-a2a49a4365691a56b87ac1e723b7c8a33880c74b.zip | |
Add debug builds
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ff589cf..6fead6d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,12 +13,30 @@ AM_INIT_AUTOMAKE([subdir-objects]) # Checks for programs. AC_PROG_CC +AC_LANG([C]) + # Checks for libraries. # Checks for header files. +AC_CHECK_HEADERS([stdio.h]) # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. +# Add debug support +AC_ARG_ENABLE( + [debug], + AS_HELP_STRING([--enable-debug], [enable debugging, default: no]), + [case ${enableval} in + (yes) debug=true ;; + (no) debug=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; + esac], + [debug=false]) +AM_CONDITIONAL(DEBUG, [test "x${debug}" = xtrue]) +AM_COND_IF(DEBUG, + AC_DEFINE(DEBUG, 1, [Define to 0 if this is a release build]), + AC_DEFINE(DEBUG, 0, [Define to 1 or higher if this is a debug build])) + AC_OUTPUT |
