1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-12-04 11:25:18 -05:00

Main: enable "-Werror" by default

Disable with "--disable-werror"
This commit is contained in:
Alex Kotov 2022-02-02 07:38:45 +05:00
parent 44cb155baf
commit 15ea973a16
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 9 additions and 0 deletions

View file

@ -2,6 +2,7 @@
* configure.ac: Generate position-independent code by default, disable with
"--disable-pic"
* configure.ac: "-Werror" by default, disable with "--disable-werror"
2022-02-01 Alex Kotov <kotovalexarian@gmail.com>

View file

@ -37,6 +37,10 @@ TESTS = \
examples/panic_simple
endif
if ENABLE_WERROR
AM_CFLAGS += -Werror
endif
if WITH_CMDLINE
libkernaux_a_SOURCES += src/cmdline.c
if ENABLE_TESTS

View file

@ -104,6 +104,7 @@ stable options.
* `--enable-bloat`, disable with `--disable-bloat`
* `--enable-float`, disable with `--disable-float`
* `--enable-pic`, disable with `--disable-pic`
* `--enable-werror`, disable with `--disable-werror`
#### Packages

View file

@ -17,6 +17,7 @@ dnl Features (enabled by default)
AC_ARG_ENABLE([bloat], AS_HELP_STRING([--disable-bloat], [disable unnecessary heavy binary data]))
AC_ARG_ENABLE([float], AS_HELP_STRING([--disable-float], [disable floating-point arithmeric]))
AC_ARG_ENABLE([pic], AS_HELP_STRING([--disable-pic], [do not generate position-independent code]))
AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror]))
dnl Features (disabled by default)
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests], [enable tests and examples]))
@ -91,6 +92,7 @@ dnl Features (enabled by default)
AM_CONDITIONAL([ENABLE_BLOAT], [test "$enable_bloat" != no])
AM_CONDITIONAL([ENABLE_FLOAT], [test "$enable_float" != no])
AM_CONDITIONAL([ENABLE_PIC], [test "$enable_pic" != no])
AM_CONDITIONAL([ENABLE_WERROR], [test "$enable_werror" != no])
dnl Features (disabled by default)
AM_CONDITIONAL([ENABLE_TESTS], [test "$enable_tests" = yes])
@ -127,6 +129,7 @@ dnl Features (enabled by default)
AS_IF([test "$enable_bloat" != no], [AC_DEFINE([ENABLE_BLOAT], [1], [enabled unnecessary heavy binary data])])
AS_IF([test "$enable_float" != no], [AC_DEFINE([ENABLE_FLOAT], [1], [enabled floating-point arithmeric])])
AS_IF([test "$enable_pic" != no], [AC_DEFINE([ENABLE_PIC], [1], [generate position-independent code])])
AS_IF([test "$enable_werror" != no], [AC_DEFINE([ENABLE_WERROR], [1], [enabled -Werror])])
dnl Features (disabled by default)
AS_IF([test "$enable_tests" = yes], [AC_DEFINE([ENABLE_TESTS], [1], [enabled tests and examples])])