From 1e921ec868871bfd8954879c3f28ca1e286d2c86 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 23 Apr 2018 15:54:20 +0200 Subject: Android: check for extra libs needed for build --- aclocal.m4 | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'aclocal.m4') diff --git a/aclocal.m4 b/aclocal.m4 index 365bfa81..58ad2cc5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -31,6 +31,72 @@ AC_DEFUN([BIRD_CHECK_PTHREADS], CFLAGS="$bird_tmp_cflags" ]) +AC_DEFUN([BIRD_CHECK_ANDROID_GLOB], +[ + AC_CACHE_CHECK( + [for glob.h], + [bird_cv_lib_glob], + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [ + #include + #include + ], + [ glob(NULL, 0, NULL, NULL); ] + ) + ], + [bird_cv_lib_glob=yes], + [ + bird_tmp_libs="$LIBS" + LIBS="$LIBS -landroid-glob" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [ + #include + #include + ], + [ glob(NULL, 0, NULL, NULL); ] + ) + ], + [bird_cv_lib_glob=-landroid-glob], + [bird_cv_lib_glob=no] + ) + LIBS="$bird_tmp_libs" + ] + ) + ) +]) + +AC_DEFUN([BIRD_CHECK_ANDROID_LOG], +[ + AC_CACHE_CHECK( + [for syslog lib flags], + [bird_cv_lib_log], + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [ #include ], + [ syslog(0, ""); ] + ) + ], + [bird_cv_lib_log=yes], + [ + bird_tmp_libs="$LIBS" + LIBS="$LIBS -llog" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [ #include ], + [ syslog(0, ""); ] + ) + ], + [bird_cv_lib_log=-llog], + [bird_cv_lib_log=no] + ) + LIBS="$bird_tmp_libs" + ] + ) + ) +]) + AC_DEFUN([BIRD_CHECK_GCC_OPTION], [ bird_tmp_cflags="$CFLAGS" -- cgit v1.2.3