mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Android: check for extra libs needed for build
This commit is contained in:
parent
c2fc4c10ac
commit
da16b33ab9
65
aclocal.m4
vendored
65
aclocal.m4
vendored
@ -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],
|
||||
[
|
||||
|
14
configure.ac
14
configure.ac
@ -315,6 +315,20 @@ AC_C_BIGENDIAN(
|
||||
[AC_MSG_ERROR([Cannot determine CPU endianity.])]
|
||||
)
|
||||
|
||||
BIRD_CHECK_ANDROID_GLOB
|
||||
if test "$bird_cv_lib_glob" = no ; then
|
||||
AC_MSG_ERROR([glob.h not found.])
|
||||
elif test "$bird_cv_lib_glob" != yes ; then
|
||||
LIBS="$LIBS $bird_cv_lib_glob"
|
||||
fi
|
||||
|
||||
BIRD_CHECK_ANDROID_LOG
|
||||
if test "$bird_cv_lib_log" = no ; then
|
||||
AC_MSG_ERROR([don't know how to link syslog.])
|
||||
elif test "$bird_cv_lib_log" != yes ; then
|
||||
LIBS="$LIBS $bird_cv_lib_log"
|
||||
fi
|
||||
|
||||
if test "$enable_debug" = yes ; then
|
||||
AC_DEFINE([DEBUGGING], [1], [Define to 1 if debugging is enabled])
|
||||
LDFLAGS="$LDFLAGS -rdynamic"
|
||||
|
Loading…
Reference in New Issue
Block a user