ioctl: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 8 May 2011 22:34:48 +0000 (00:34 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:12 +0000 (00:06 +0200)
* m4/ioctl.m4 (gl_FUNC_IOCTL): Set HAVE_IOCTL. Move AC_LIBOBJ
invocations from here...
* modules/ioctl (configure.ac): ... to here.
(Depends-on): Update condition.

ChangeLog
m4/ioctl.m4
modules/ioctl

index 7d9b83827f43c77ad4bf0f22eff6cd601290a72e..9eec8fb518f7af265745bf7511c504c4875236d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-08  Bruno Haible  <bruno@clisp.org>
+
+       ioctl: Move AC_LIBOBJ invocations to module description.
+       * m4/ioctl.m4 (gl_FUNC_IOCTL): Set HAVE_IOCTL. Move AC_LIBOBJ
+       invocations from here...
+       * modules/ioctl (configure.ac): ... to here.
+       (Depends-on): Update condition.
+
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
        imaxdiv: Move AC_LIBOBJ invocations to module description.
index 3c17a2ed47be5179d2fc3433a6a284abbb2ac35a..e799600f95381e7b6c847ce5f2ba24b38ba9006f 100644 (file)
@@ -1,4 +1,4 @@
-# ioctl.m4 serial 2
+# ioctl.m4 serial 3
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,11 +8,12 @@ AC_DEFUN([gl_FUNC_IOCTL],
 [
   AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  HAVE_IOCTL=1
   if test "$ac_cv_header_winsock2_h" = yes; then
     dnl Even if the 'socket' module is not used here, another part of the
     dnl application may use it and pass file descriptors that refer to
     dnl sockets to the ioctl() function. So enable the support for sockets.
-    AC_LIBOBJ([ioctl])
+    HAVE_IOCTL=0
   else
     AC_CHECK_FUNCS([ioctl])
     dnl On glibc systems, the second parameter is 'unsigned long int request',
@@ -30,7 +31,6 @@ AC_DEFUN([gl_FUNC_IOCTL],
       ])
     if test $gl_cv_func_ioctl_posix_signature != yes; then
       REPLACE_IOCTL=1
-      AC_LIBOBJ([ioctl])
     fi
   fi
 ])
index 57328f3efb261b76ed2e4dccc8e45ea07125d888..9842a53f97bcfbb29f6bbfc1a0dbf8ee3e9a2610 100644 (file)
@@ -8,12 +8,15 @@ m4/ioctl.m4
 
 Depends-on:
 sys_ioctl
-sys_socket      [test "$ac_cv_header_winsock2_h" = yes || test $REPLACE_IOCTL = 1]
-errno           [test "$ac_cv_header_winsock2_h" = yes || test $REPLACE_IOCTL = 1]
-fd-hook         [test "$ac_cv_header_winsock2_h" = yes || test $REPLACE_IOCTL = 1]
+sys_socket      [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
+errno           [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
+fd-hook         [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
 
 configure.ac:
 gl_FUNC_IOCTL
+if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+  AC_LIBOBJ([ioctl])
+fi
 gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
 
 Makefile.am: