diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-24 15:38:32 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-07-24 15:38:32 +0200 |
commit | cec40a74679821513e627f93b924067a404f6475 (patch) | |
tree | 793bbe5b326e7008e4657cf11b2937cafbe3d922 /configure.ac | |
parent | 18f70a6229f586d5e4f387075be42d7a1ef5d269 (diff) | |
parent | 8263690e754a83b8f3c58bd0080a1628d6cba556 (diff) |
Merge remote-tracking branch 'origin/mq-filter-stack'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index da1a8f44..5ec75359 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,12 @@ AC_ARG_ENABLE([debug], [enable_debug=no] ) +AC_ARG_ENABLE([debug-generated], + [AS_HELP_STRING([--enable-debug-generated], [enable this to abstain from generating #line @<:@no@:>@])], + [], + [enable_debug_generated=no] +) + AC_ARG_ENABLE([memcheck], [AS_HELP_STRING([--enable-memcheck], [check memory allocations when debugging @<:@yes@:>@])], [], @@ -109,6 +115,11 @@ if test -z "$GCC" ; then AC_MSG_ERROR([This program requires the GNU C Compiler.]) fi +BIRD_CHECK_THREAD_LOCAL +if test "$bird_cv_thread_local" = yes ; then + AC_DEFINE([HAVE_THREAD_LOCAL], [1], [Define to 1 if _Thread_local is available]) +fi + if test "$enable_pthreads" != no ; then BIRD_CHECK_PTHREADS @@ -141,6 +152,14 @@ fi AC_MSG_CHECKING([CFLAGS]) AC_MSG_RESULT([$CFLAGS]) +if test "$enable_debug" = no; then + BIRD_CHECK_LTO +fi + +if test "$bird_cv_c_lto" = yes; then + CFLAGS="$CFLAGS -flto" + LDFLAGS="$LDFLAGS -flto" +fi AC_PROG_CPP AC_PROG_INSTALL @@ -156,7 +175,7 @@ test -z "$M4" && AC_MSG_ERROR([M4 is missing.]) AC_MSG_CHECKING([bison version]) BIRD_CHECK_BISON_VERSION(BISON_VERSION) AC_MSG_RESULT([$BISON_VERSION]) -if test "$bird_bison_synclines" = yes; then +if test "$bird_bison_synclines" = yes && test "$enable_debug_generated" = no; then M4FLAGS="$M4FLAGS -s" fi @@ -364,6 +383,9 @@ if test "$enable_debug" = yes ; then AC_CHECK_LIB([efence], [malloc]) fi fi +else + BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_implicit_fallthrough], [-Wno-implicit-fallthrough]) + BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_implicit_fallthrough], [-Wno-implicit-fallthrough]) fi CLIENT=birdcl |