diff options
author | Chris Wilson <chris+github@qwirx.com> | 2016-09-03 00:07:23 +0100 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2016-09-03 00:07:23 +0100 |
commit | c0125ee22e09a31ae291e42faa817835bd903dbc (patch) | |
tree | aca37c831ef9897f1b4898cbf8d2bef36112c5af /infrastructure/m4/boxbackup_tests.m4 | |
parent | 0560d351665313fcdd503af213118eec46930cbe (diff) |
Update platform feature detection to work with CMake.
Rewrite some macros in forms that can be parsed by our parser written in CMake
language (fake m4 with regexps).
Fix incorrect conditional includes and incorrect #if/#ifdef assumptions.
Diffstat (limited to 'infrastructure/m4/boxbackup_tests.m4')
-rw-r--r-- | infrastructure/m4/boxbackup_tests.m4 | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/infrastructure/m4/boxbackup_tests.m4 b/infrastructure/m4/boxbackup_tests.m4 index 09d73e04..0c1e2107 100644 --- a/infrastructure/m4/boxbackup_tests.m4 +++ b/infrastructure/m4/boxbackup_tests.m4 @@ -101,7 +101,7 @@ AX_PATH_BDB([1.x or 4.1], [ ]) # need to find libdl before trying to link openssl, apparently -AC_SEARCH_LIBS([dlsym], ["dl"]) +AC_SEARCH_LIBS([dlsym], [dl]) AC_CHECK_FUNCS([dlsym dladdr]) ## Check for Open SSL, use old versions only if explicitly requested @@ -126,20 +126,12 @@ Upgrade or read the documentation for alternatives]]) ### Checks for header files. -case $target_os in -mingw32*) ;; -winnt*) ;; -*) - AC_HEADER_DIRENT - ;; -esac - AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([dlfcn.h fcntl.h getopt.h netdb.h process.h pwd.h signal.h]) -AC_CHECK_HEADERS([syslog.h time.h cxxabi.h]) +AC_CHECK_HEADERS([cxxabi.h dirent.h dlfcn.h fcntl.h getopt.h netdb.h process.h pwd.h signal.h]) +AC_CHECK_HEADERS([syslog.h time.h unistd.h]) AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h]) -AC_CHECK_HEADERS([sys/file.h sys/param.h sys/poll.h sys/socket.h sys/time.h]) +AC_CHECK_HEADERS([sys/file.h sys/param.h sys/poll.h sys/socket.h sys/stat.h sys/time.h]) AC_CHECK_HEADERS([sys/types.h sys/uio.h sys/un.h sys/wait.h sys/xattr.h]) AC_CHECK_HEADERS([sys/ucred.h],,, [ #ifdef HAVE_SYS_PARAM_H @@ -193,11 +185,11 @@ AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T -AC_CHECK_MEMBERS([struct stat.st_flags]) -AC_CHECK_MEMBERS([struct stat.st_atim]) -AC_CHECK_MEMBERS([struct stat.st_atimespec]) -AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec]) -AC_CHECK_MEMBERS([struct stat.st_atimensec]) +AC_CHECK_MEMBERS([struct stat.st_flags],,, [[#include <sys/stat.h>]]) +AC_CHECK_MEMBERS([struct stat.st_atim],,, [[#include <sys/stat.h>]]) +AC_CHECK_MEMBERS([struct stat.st_atimespec],,, [[#include <sys/stat.h>]]) +AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],,, [[#include <sys/stat.h>]]) +AC_CHECK_MEMBERS([struct stat.st_atimensec],,, [[#include <sys/stat.h>]]) AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[ #include <sys/types.h> #include <netinet/in.h> @@ -206,7 +198,7 @@ AC_CHECK_MEMBERS([DIR.d_fd],,, [[#include <dirent.h>]]) AC_CHECK_MEMBERS([DIR.dd_fd],,, [[#include <dirent.h>]]) AC_CHECK_MEMBERS([struct tcp_info.tcpi_rtt],,, [[#include <netinet/tcp.h>]]) -AC_CHECK_DECLS([O_BINARY]) +AC_CHECK_DECLS([O_BINARY],,, [[#include <fcntl.h>]]) AC_CHECK_DECLS([ENOTSUP],,, [[#include <sys/errno.h>]]) AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]]) @@ -285,7 +277,7 @@ AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([ftruncate getpeereid getpeername getpid gettimeofday lchown]) AC_CHECK_FUNCS([setproctitle utimensat]) -AC_SEARCH_LIBS([setproctitle], ["bsd"]) +AC_SEARCH_LIBS([setproctitle], [bsd]) # NetBSD implements kqueue too differently for us to get it fixed by 0.10 # TODO: Remove this when NetBSD kqueue implementation is working. The main |