include some header files conditionally add specific test for fcntl

This commit is contained in:
Cedric Bail 2013-03-10 17:57:23 +01:00 committed by Cedric BAIL
parent c97d05aca2
commit 3fe8098e9c
10 changed files with 50 additions and 10 deletions

View File

@ -313,6 +313,7 @@ sys/signalfd.h \
sys/types.h \
sys/param.h \
sys/mman.h \
netinet/in.h \
])
have_inotify="${ac_cv_header_sys_inotify_h}"
@ -478,12 +479,11 @@ mkdirat \
mtrace \
realpath \
strlcpy \
fcntl \
])
AC_FUNC_ALLOCA
EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday dirfd])
EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday dirfd fcntl])
have_atfile_source="${ac_cv_func_fstatat}"
AC_DEFINE_IF([HAVE_ATFILE_SOURCE],
@ -1776,8 +1776,10 @@ EFL_EVAL_PKGS([ECORE])
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ \
langinfo.h \
features.h \
sys/prctl.h \
sys/resource.h \
sys/timerfd.h \
])

View File

@ -6,6 +6,7 @@ dnl Macros that check functions availability for the EFL:
dnl dirfd
dnl dladdr
dnl dlopen
dnl fcntl
dnl fnmatch
dnl gettimeofday
dnl iconv
@ -114,6 +115,22 @@ case "$host_os" in
esac
])
dnl _EFL_CHECK_FUNC_FCNTL is for internal use
dnl _EFL_CHECK_FUNC_FCNTL(EFL, VARIABLE)
AC_DEFUN([_EFL_CHECK_FUNC_FCNTL],
[
case "$host_os" in
mingw*)
$2="yes"
;;
*)
EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[
#include <fcntl.h>
]], [[int g = fcntl(0, 0);]])
;;
esac
])
dnl _EFL_CHECK_FUNC_FNMATCH is for internal use
dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE)
AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH],

View File

@ -11,7 +11,9 @@
#include <fcntl.h>
#include <errno.h>
#include <langinfo.h>
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
#endif
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>

View File

@ -14,7 +14,9 @@
# include <ucontext.h>
#elif defined(USE_SETJMP)
# include <sys/time.h>
# include <sys/resource.h>
# if HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
# endif
# include <setjmp.h>
#endif

View File

@ -8,7 +8,9 @@
#include <sys/stat.h>
#include <unistd.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_SIGNATURE
# include <sys/mman.h>

View File

@ -4,7 +4,10 @@
#include <string.h>
#include <stdlib.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef _WIN32
# include <winsock2.h>

View File

@ -7,7 +7,10 @@
#include <math.h>
#include <ctype.h>
#include <limits.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef _WIN32
# include <winsock2.h>

View File

@ -5,7 +5,10 @@
#ifdef __OpenBSD__
# include <sys/types.h>
#endif /* ifdef __OpenBSD__ */
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef _WIN32
# include <winsock2.h>

View File

@ -16,7 +16,10 @@
#include <fnmatch.h>
#include <fcntl.h>
#include <zlib.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_EVIL
# include <Evil.h>

View File

@ -14,7 +14,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_EVIL
# include <Evil.h>