2006-12-03 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Sat, 2 Dec 2006 23:58:35 +0000 (23:58 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sat, 2 Dec 2006 23:58:35 +0000 (23:58 +0000)
* configure.ac: Add check for use of descriptor passing.

trunk/ChangeLog
trunk/configure.ac

index 9c932b8c01a78bd6f64b1c6b328c7dbcea685a05..24c25123d5219d02748aa05b935a9e5474a09508 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-03  Marcus Brinkmann  <marcus@g10code.de>
+
+       * configure.ac: Add check for use of descriptor passing.
+
 2006-11-29  Marcus Brinkmann  <marcus@g10code.de>
 
        * configure.ac (NEED_GPG_VERSION): Bump to 1.3.0.
index 8a6b1e5e3e9aade92119b759b0eea34d8ecfb8c2..31f05bfe64d0531456f37c66517bdbd384ea70f7 100644 (file)
@@ -468,6 +468,32 @@ AC_REPLACE_FUNCS(setenv)
 # More assuan checks.
 AC_CHECK_HEADERS([sys/uio.h])
 
+# Assuan check for descriptor passing.
+AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
+                [use_descriptor_passing=yes],
+                [use_descriptor_passing=no
+                 AC_MSG_WARN([
+***
+*** Data structure for sending ancillary data missing.
+*** Descriptor passing won't work.
+***])],[
+#include <stdlib.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#if HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+#include <unistd.h>
+       ])
+if test "$use_descriptor_passing" = "yes"; then
+ AC_DEFINE(USE_DESCRIPTOR_PASSING, 1,
+            [Defined if descriptor passing is supported])
+fi
+AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
+
 # End of assuan checks.
 
 AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")