X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/1aaccf40b93719fd3df7cc89e023b9bb48b358b6..6bf8286c5ef3ec41bd954ef4ce8926374e7003c3:/configure.ac?ds=sidebyside diff --git a/configure.ac b/configure.ac index 40353daa..142b854a 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,8 @@ AC_DEFUN([catacomb_CPU_FAMILIES], $1([x86_64,cygwin], [amd64], [win]) $1([x86_64,*], [amd64], [sysv]) $1([arm,*-gnueabi | arm,*-gnueabihf | dnl - armv*,*-gnueabi | armv*,*-gnueabihf], [armel], [gnueabi])]) + armv*,*-gnueabi | armv*,*-gnueabihf | dnl + arm,*-androideabi], [armel], [gnueabi])]) dnl A utility to clear the `seen' flags, used so as to process each CPU or dnl ABI once. @@ -245,6 +246,29 @@ AC_SEARCH_LIBS([sqrt], [m]) AC_SUBST([MATHLIBS], [$LIBS]) LIBS=$mdw_ORIG_LIBS +dnl Logging is weird under Termux. Unfortunately, it involves macros, so we +dnl have to do this the hard way. +AC_CACHE_CHECK( + [library needed for syslog], [mdw_cv_syslog_lib], + [mdw_ORIG_LIBS=$LIBS LIBS= + for i in 0 1; do + AC_TRY_LINK([#include ], + [openlog("test", LOG_PID, LOG_DAEMON); + syslog(LOG_ERR, "this is a test");], + [ok=t], [ok=nil]) + case $i,$ok in + *,t) mdw_cv_syslog_lib=${LIBS:-none}; break ;; + 0,nil) LIBS="-llog" ;; + 1,nil) AC_MSG_ERROR("failed to link test program") ;; + esac + done + LIBS=$mdw_ORIG_LIBS]) +case $mdw_cv_syslog_lib in + none) LOGLIBS= ;; + *) LOGLIBS=$mdw_cv_syslog_lib ;; +esac +AC_SUBST([LOGLIBS]) + dnl Find out whether very long integer types are available. AC_CHECK_HEADERS([stdint.h]) AC_SUBST([have_stdint_h])