[enable_debug=no]
)
+AC_ARG_ENABLE([lto],
+ [AS_HELP_STRING([--enable-lto], [enable link-time optimization @<:@no@:>@])],
+ [],
+ [enable_lto=auto]
+)
+
AC_ARG_ENABLE([debug-generated],
[AS_HELP_STRING([--enable-debug-generated], [enable this to abstain from generating #line @<:@no@:>@])],
[],
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_missing_init], [-Wno-missing-field-initializers], [-Wall -Wextra])
BIRD_CHECK_GCC_OPTION([bird_cv_c_option_watomic_implicit_seq_cst], [-Watomic-implicit-seq-cst], [-Wall -Wextra])
- if test "$enable_debug" = no; then
+ if test "$enable_lto" = no || (test "$enable_debug" = yes && test "$enable_lto" = auto); then
+ # LTO is not configured at all
+ true
+ else
BIRD_CHECK_LTO
+
+ if test "$enable_lto" = yes && test "$bird_cv_c_lto" = no; then
+ AC_MSG_ERROR([LTO not available.])
+ fi
fi
if test "$bird_cv_c_lto" = yes; then
AC_MSG_RESULT([ Iproute2 directory: $iproutedir])
AC_MSG_RESULT([ System configuration: $sysdesc])
AC_MSG_RESULT([ Debugging: $enable_debug])
+AC_MSG_RESULT([ Link-time optimization: $enable_lto])
AC_MSG_RESULT([ Compact tries: $enable_compact_tries])
AC_MSG_RESULT([ Routing protocols: $protocols])
AC_MSG_RESULT([ LibSSH support in RPKI: $enable_libssh])