summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-12-02 11:00:20 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-12-09 16:37:21 +0100
commitdf74a17238e376b00cbafe7a48e8e4b406095755 (patch)
tree489e6cf894f01fd46fd4557d852543523dd81657 /m4
parent2f1ba3b77f07f23ebbf0ad576985613331e4c3e4 (diff)
build-sys: Move posix checks to a separate m4 macro
Diffstat (limited to 'm4')
-rw-r--r--m4/spice-deps.m427
1 files changed, 27 insertions, 0 deletions
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
new file mode 100644
index 0000000..3dcc4b0
--- /dev/null
+++ b/m4/spice-deps.m4
@@ -0,0 +1,27 @@
+# SPICE_CHECK_SYSDEPS()
+# ---------------------
+# Checks for header files and library functions needed by spice-common.
+# ---------------------
+AC_DEFUN([SPICE_CHECK_SYSDEPS], [
+ AC_FUNC_ALLOCA
+ AC_CHECK_HEADERS([arpa/inet.h malloc.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])
+
+ # Checks for typedefs, structures, and compiler characteristics
+ AC_C_INLINE
+ AC_TYPE_INT16_T
+ AC_TYPE_INT32_T
+ AC_TYPE_INT64_T
+ AC_TYPE_INT8_T
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+ AC_TYPE_UINT8_T
+
+ # Checks for library functions
+ # do not check malloc or realloc, since that cannot be cross-compiled checked
+ AC_FUNC_ERROR_AT_LINE
+ AC_FUNC_FORK
+ AC_CHECK_FUNCS([dup2 floor inet_ntoa memmove memset pow sqrt])
+])