[vlc-devel] [PATCH] configure: check for declarations of daemon and fork
Rémi Denis-Courmont
remi at remlab.net
Fri Sep 11 13:49:22 CEST 2015
Le 2015-09-11 14:40, Felix Paul Kühne a écrit :
> tvOS includes those functions but prevents their use so we need check
> their declaration
Autodetection cannot fix that.
> ---
> configure.ac | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 55513bd..2974bb4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -548,7 +548,9 @@ need_libc=false
>
> dnl Check for usual libc functions
> AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
> -AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty
> lstat memalign mkostemp mmap open_memstream openat pread
> posix_fadvise
> posix_madvise setlocale stricmp strnicmp strptime uselocale
> pthread_cond_timedwait_monotonic_np pthread_condattr_setclock])
> +AC_CHECK_DECLS([daemon],,,[#include <stdlib.h>])
> +AC_CHECK_DECLS([fork],,,[#include <unistd.h>])
IIRC, Diego advises against using AC_CHECK_DECLS, which he considers
flaky. Regardless the test is not even correct here.
> +AC_CHECK_FUNCS([fcntl fstatvfs getenv getpwuid_r isatty lstat
> memalign mkostemp mmap open_memstream openat pread posix_fadvise
> posix_madvise setlocale stricmp strnicmp strptime uselocale
> pthread_cond_timedwait_monotonic_np pthread_condattr_setclock])
> AC_REPLACE_FUNCS([atof atoll dirfd fdopendir ffsll flockfile fsync
> getdelim getpid lldiv nrand48 poll posix_memalign rewind setenv
> strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof
> strtok_r strtoll swab tdestroy strverscmp])
> AC_CHECK_FUNCS(fdatasync,,
> [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if
> missing.])
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list