diff --git a/aclocal.m4 b/aclocal.m4 index 48285b21..8521b53c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2,6 +2,25 @@ dnl ** Additional Autoconf tests for BIRD configure script dnl ** (c) 1999 Martin Mares dnl ** (c) 2021 Maria Matejka +# simplified adapted macro AX_COMPILER_VENDOR from autotools +AC_DEFUN([BIRD_COMPILER_VENDOR], +[ + AC_CACHE_CHECK( + [which compiler vendor we are dealing with], + [bird_cv_compiler_vendor], + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ int x = __clang__; ], []) + ], + [bird_cv_compiler_vendor=clang], + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ int x = __GNUC__; ], []) + ], + [bird_cv_compiler_vendor=gnu], + [bird_cv_compiler_vendor=unknown] + )) + ) +]) + AC_DEFUN([BIRD_CHECK_POINTER_ALIGNMENT], [ AC_CACHE_CHECK(