Correct the linkage of tests/* against Android Sensor rot

Signed-off-by: Gong BI1XJT <bi1xjt@rad1o.cn>
This commit is contained in:
Gong BI1XJT 2026-05-17 21:02:25 +08:00
parent dce66f854d
commit 1f2cebac17
2 changed files with 19 additions and 0 deletions

View file

@ -153,6 +153,21 @@ sys/select.h glob.h ])
dnl set host_os variable
AC_CANONICAL_HOST
ANDROID_LIBS=""
android=no
case "$host_os" in
linux-android*|android*)
android=yes
ANDROID_LIBS="-landroid -lc++"
ROT_BACKEND_LIST="$ROT_BACKEND_LIST rotators/androidsensor"
;;
esac
AM_CONDITIONAL([ANDROID], [test "x$android" = "xyes"])
AC_SUBST([ANDROID_LIBS])
dnl ws2tcpip.h not provided by cygwin and its test causes a configure warning.
dnl wspiapi.h provides needed freeaddrinfo function on W2k systems.
AS_IF([test "${host_os}" != "cygwin"], [

View file

@ -42,6 +42,10 @@ rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_builddir)/src -I$(srcdir) -I$(
# all the programs need this
LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS) -lm
if ANDROID
LDADD += $(ANDROID_LIBS)
endif
rigmem_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS) -I$(top_builddir)/src
rigctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src -I$(top_builddir)/security
rotctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -I$(top_builddir)/src