summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m443
1 files changed, 43 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index c401d447..746d5df5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,25 @@
dnl ** Additional Autoconf tests for BIRD configure script
dnl ** (c) 1999 Martin Mares <mj@ucw.cz>
+AC_DEFUN([BIRD_CHECK_THREAD_LOCAL],
+[
+ AC_CACHE_CHECK(
+ [whether _Thread_local is known],
+ [bird_cv_thread_local],
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ _Thread_local static int x = 42;
+ ],
+ []
+ )
+ ],
+ [bird_cv_thread_local=yes],
+ [bird_cv_thread_local=no]
+ )
+ )
+])
+
AC_DEFUN([BIRD_CHECK_PTHREADS],
[
bird_tmp_cflags="$CFLAGS"
@@ -131,6 +150,30 @@ AC_DEFUN([BIRD_CHECK_ANDROID_LOG],
)
])
+AC_DEFUN([BIRD_CHECK_LTO],
+[
+ bird_tmp_cflags="$CFLAGS"
+ bird_tmp_ldflags="$LDFLAGS"
+ CFLAGS="-flto"
+ LDFLAGS="-flto"
+
+ AC_CACHE_CHECK(
+ [whether link time optimizer is available],
+ [bird_cv_c_lto],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM()],
+ [bird_cv_c_lto=yes],
+ [bird_cv_c_lto=no]
+ )
+ ]
+ )
+
+ CFLAGS="$bird_tmp_cflags"
+ LDFLAGS="$bird_tmp_ldflags"
+])
+
+
AC_DEFUN([BIRD_CHECK_GCC_OPTION],
[
bird_tmp_cflags="$CFLAGS"