[vlc-devel] [PATCH] configure.ac: check newlocale against android_support
Rémi Denis-Courmont
remi at remlab.net
Fri May 8 18:11:07 CEST 2020
Le perjantaina 8. toukokuuta 2020, 14.35.42 EEST Alexandre Janniaux a écrit :
> Android has uselocale through libandroid_support, which depends on
> libc++abi for new/delete operators as being a C++ library.
> ---
> configure.ac | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 10ce6501eaf..0a01062b620 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -675,8 +675,15 @@ VLC_LIBRARY_SUFFIX
> dnl Check for system libs needed
> need_libc=false
>
> +dnl Android has uselocale through Android support on API < 21
> +AC_SEARCH_LIBS([uselocale], [android_support], [
> + AS_IF([test "$ac_cv_search_newlocale" = "-landroid_support"], [
> + AX_APPEND_FLAG([-landroid_support -lc++abi], [LDFLAGS]) ])
This looks like it belongs in LIBS, not LDFLAGS.
But first, is there a benefit to uselocale() on Android? Does it actually work
for the purpose that VLC uses it?
> + AC_DEFINE([HAVE_USELOCALE], [1], [Define if uselocale() is available.])
> +],,[-lc++abi])
> +
> dnl Check for usual libc functions
> -AC_CHECK_FUNCS([accept4 fcntl flock fstatat fstatvfs fork getmntent_r
> getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale
> pipe2 pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime
> uselocale]) +AC_CHECK_FUNCS([accept4 fcntl flock fstatat fstatvfs fork
> getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream
> newlocale pipe2 pread posix_fadvise posix_madvise setlocale stricmp
> strnicmp strptime]) AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd
> fdopendir flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll
> posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup
> strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab
> tdestroy tfind timegm timespec_get strverscmp pathconf])
> AC_REPLACE_FUNCS([gettimeofday])
> AC_CHECK_FUNC(fdatasync,,
--
レミ・デニ-クールモン
http://www.remlab.net/
More information about the vlc-devel
mailing list