mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 21:06:17 +00:00
configure: use AC_CHECK_FUNC to check for mmap
This commit is contained in:
parent
26ff0ced15
commit
f56720fc7b
1 changed files with 1 additions and 10 deletions
11
configure.ac
11
configure.ac
|
@ -406,16 +406,7 @@ case $ac_cv_audioresample_format in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dnl Check for mmap (needed by allocators library)
|
dnl Check for mmap (needed by allocators library)
|
||||||
AC_MSG_CHECKING(if mmap is supported)
|
AC_CHECK_FUNC([mmap], [AC_DEFINE(HAVE_MMAP, 1, [Defined if mmap is supported])])
|
||||||
AC_TRY_LINK(
|
|
||||||
[#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/mman.h>],
|
|
||||||
[char * p = (char *)mmap(NULL, 10, PROT_READ, MAP_SHARED, -1, 2);
|
|
||||||
munmap(p,10);],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_MMAP, 1, [Defined if mmap is supported])],
|
|
||||||
[AC_MSG_RESULT(no)] )
|
|
||||||
|
|
||||||
dnl *** plug-ins to include ***
|
dnl *** plug-ins to include ***
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue