mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
configure: fix F_SETPIPE_SZ detection
Currently CEPH_HAVE_SETPIPE_SZ is not set even if F_SETPIPE_SZ is available, because AC_COMPILE_IFELSE test program as written always fails to compile. F_SETPIPE_SZ is a macro, so use AC_EGREP_CPP which works on the preprocessor output instead of trying to compile. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
This commit is contained in:
parent
450163ec40
commit
a5f479c2aa
20
configure.ac
20
configure.ac
@ -640,11 +640,21 @@ AC_CHECK_FUNC([splice],
|
||||
[AC_DEFINE([CEPH_HAVE_SPLICE], [], [splice(2) is supported])],
|
||||
[])
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <fcntl.h>
|
||||
F_SETPIPE_SZ]])],
|
||||
[AC_DEFINE([CEPH_HAVE_SETPIPE_SZ], [], [F_SETPIPE_SZ is supported])],
|
||||
[AC_MSG_NOTICE(["F_SETPIPE_SZ not found, zero-copy may be less efficent"])])
|
||||
|
||||
# F_SETPIPE_SZ in fcntl.h
|
||||
AC_MSG_CHECKING([for F_SETPIPE_SZ in fcntl.h])
|
||||
AC_EGREP_CPP([yes_have_f_setpipe_sz], [
|
||||
#define _GNU_SOURCE
|
||||
#include <fcntl.h>
|
||||
#ifdef F_SETPIPE_SZ
|
||||
yes_have_f_setpipe_sz
|
||||
#endif
|
||||
], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([CEPH_HAVE_SETPIPE_SZ], [], [F_SETPIPE_SZ is supported])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([F_SETPIPE_SZ not found, zero-copy may be less efficent])
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS([posix_fallocate])
|
||||
AC_CHECK_HEADERS([sys/prctl.h])
|
||||
|
Loading…
Reference in New Issue
Block a user