summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2018-04-23 15:54:20 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-06-26 17:11:27 +0200
commitda16b33ab98602628d66ed4f434dc6fa76f338c6 (patch)
tree676643c38fa406d7014ce96ba37b53a97ab94433 /aclocal.m4
parentc2fc4c10ac81b8815c1434aa2b0945aa937df4fa (diff)
Android: check for extra libs needed for build
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m465
1 files changed, 65 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 8160e539..dcf1bd8b 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -65,6 +65,71 @@ AC_DEFUN([BIRD_CHECK_MPLS_KERNEL],
)
])
+AC_DEFUN([BIRD_CHECK_ANDROID_GLOB],
+[
+ AC_CACHE_CHECK(
+ [for glob.h],
+ [bird_cv_lib_glob],
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ #include <glob.h>
+ #include <stdlib.h>
+ ],
+ [ 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 <glob.h>
+ #include <stdlib.h>
+ ],
+ [ 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 <sys/syslog.h> ],
+ [ syslog(0, ""); ]
+ )
+ ],
+ [bird_cv_lib_log=yes],
+ [
+ bird_tmp_libs="$LIBS"
+ LIBS="$LIBS -llog"
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM(
+ [ #include <sys/syslog.h> ],
+ [ syslog(0, ""); ]
+ )
+ ],
+ [bird_cv_lib_log=-llog],
+ [bird_cv_lib_log=no]
+ )
+ LIBS="$bird_tmp_libs"
+ ]
+ )
+ )
+])
AC_DEFUN([BIRD_CHECK_GCC_OPTION],
[