2006-12-03 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Sun, 3 Dec 2006 02:00:43 +0000 (02:00 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sun, 3 Dec 2006 02:00:43 +0000 (02:00 +0000)
* configure.ac: Use descriptor passing only if --enable-fd-passing
is provided.

trunk/ChangeLog
trunk/configure.ac

index 24c25123d5219d02748aa05b935a9e5474a09508..6899474d23a78682626bd351fcd572e9b441ea51 100644 (file)
@@ -1,5 +1,8 @@
 2006-12-03  Marcus Brinkmann  <marcus@g10code.de>
 
+       * configure.ac: Use descriptor passing only if --enable-fd-passing
+       is provided.
+
        * configure.ac: Add check for use of descriptor passing.
 
 2006-11-29  Marcus Brinkmann  <marcus@g10code.de>
index 31f05bfe64d0531456f37c66517bdbd384ea70f7..c03e42f36c8a0cfb1eac1d4e08335b0a6d1557cb 100644 (file)
@@ -470,8 +470,8 @@ 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
+                [supports_descriptor_passing=yes],
+                [supports_descriptor_passing=no
                  AC_MSG_WARN([
 ***
 *** Data structure for sending ancillary data missing.
@@ -488,10 +488,23 @@ AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
 #endif
 #include <unistd.h>
        ])
+
+AC_ARG_ENABLE(fd-passing,
+  AC_HELP_STRING([--enable-fd-passing], [use FD passing if supported]),
+  use_desciptor_passing=$withval)
+
+if test "$supports_descriptor_passing" != "yes"; then
+  use_descriptor_passing=no
+fi
+
 if test "$use_descriptor_passing" = "yes"; then
- AC_DEFINE(USE_DESCRIPTOR_PASSING, 1,
-            [Defined if descriptor passing is supported])
+  fd_passing=1
+else
+  fd_passing=0
 fi
+
+AC_DEFINE_UNQUOTED(USE_DESCRIPTOR_PASSING, $fd_passing,
+          [Defined if descriptor passing is enabled and supported])
 AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
 
 # End of assuan checks.