[vlc-devel] [PATCH] configure.ac: enforce compilation check for wordexp
Alexandre Janniaux
ajanni at videolabs.io
Mon Nov 16 15:32:06 CET 2020
Hi,
Note that this doesn't need to link, so it would fail if the
standard library exposes the function but doesn't actually
implement it for instance.
We probably want AC_LINK_IFELSE here for that reason.
Regards,
--
Alexandre Janniaux
Videolabs
On Mon, Nov 16, 2020 at 01:41:43PM +0100, Alexandre Janniaux wrote:
> wordexp can be available on the OS as a private API but not available
> for the application. This is the case on iOS armv7.
>
> Fix #25206
> ---
> configure.ac | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index a0b153664c..ace3d2872d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -694,8 +694,15 @@ VLC_LIBRARY_SUFFIX
> dnl Check for system libs needed
> need_libc=false
>
> +dnl Check for function marked by SDK availability tags
> +dnl - wordexp is not available on iOS
> +AC_COMPILE_IFELSE(
> + [AC_LANG_PROGRAM([#include <wordexp.h>],[(void)wordexp;])],
> + [AC_DEFINE([HAVE_WORDEXP], [1], [Define to 1 if wordexp is available])]
> +)
> +
> 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 wordexp])
> +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_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,,
> --
> 2.29.2
>
More information about the vlc-devel
mailing list