port autotools change for BSD to cmake recipe:
Conditionalized sendfile support on the presence of sys/sendfile.h, since FreeBSD version is slightly different.
This commit is contained in:
parent
9c44d69905
commit
b1c974d10b
2 changed files with 4 additions and 2 deletions
|
@ -16,9 +16,10 @@ CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
|
|||
CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H)
|
||||
CHECK_INCLUDE_FILES(sys/poll.h HAVE_SYS_POLL_H)
|
||||
CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_H)
|
||||
if(HAVE_POLL_H OR HAVE_SYS_POLL_H OR HAVE_SYS_SELECT_H)
|
||||
CHECK_INCLUDE_FILES(sys/sendfile.h HAVE_SYS_SENDFILE_H)
|
||||
if(HAVE_POLL_H OR HAVE_SYS_POLL_H OR HAVE_SYS_SELECT_H OR HAVE_SYS_SENDFILE_H)
|
||||
CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
|
||||
endif(HAVE_POLL_H OR HAVE_SYS_POLL_H OR HAVE_SYS_SELECT_H)
|
||||
endif(HAVE_POLL_H OR HAVE_SYS_POLL_H OR HAVE_SYS_SELECT_H OR HAVE_SYS_SENDFILE_H)
|
||||
|
||||
#in configure.ac it is not explicitly tested, if it is in 'm', instead the first
|
||||
#test is if "floor" is available in m and later on it is checked if round,
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
#cmakedefine HAVE_POLL_H 1
|
||||
#cmakedefine HAVE_SYS_POLL_H 1
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
#cmakedefine HAVE_SYS_SENDFILE_H 1
|
||||
#cmakedefine HAVE_SENDFILE 1
|
||||
#cmakedefine HAVE_ROUND 1
|
||||
|
|
Loading…
Add table
Reference in a new issue