tcgetsid: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 22 May 2011 12:59:53 +0000 (14:59 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:59 +0000 (00:06 +0200)
* m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Set HAVE_TCGETSID. Move AC_LIBOBJ
and gl_PREREQ_TCGETSID invocations from here...
* modules/tcgetsid (configure.ac): ... to here.
(Depends-on): Update conditions.

ChangeLog
m4/tcgetsid.m4
modules/tcgetsid

index b30a82b..fb057cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
+       tcgetsid: Move AC_LIBOBJ invocations to module description.
+       * m4/tcgetsid.m4 (gl_FUNC_TCGETSID): Set HAVE_TCGETSID. Move AC_LIBOBJ
+       and gl_PREREQ_TCGETSID invocations from here...
+       * modules/tcgetsid (configure.ac): ... to here.
+       (Depends-on): Update conditions.
+
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
        symlinkat: Move AC_LIBOBJ invocations to module description.
        * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Move AC_LIBOBJ invocation from
        here...
index f8ab91e..31e034a 100644 (file)
@@ -1,4 +1,4 @@
-# tcgetsid.m4 serial 2
+# tcgetsid.m4 serial 3
 dnl Copyright (C) 2010-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,
@@ -17,9 +17,10 @@ AC_DEFUN([gl_FUNC_TCGETSID],
   fi
 
   AC_CHECK_FUNCS([tcgetsid])
-  if test $ac_cv_func_tcgetsid = no; then
-    AC_LIBOBJ([tcgetsid])
-    gl_PREREQ_TCGETSID
+  if test $ac_cv_func_tcgetsid = yes; then
+    HAVE_TCGETSID=1
+  else
+    HAVE_TCGETSID=0
   fi
 ])
 
index 6dddb6e..38fc9e3 100644 (file)
@@ -9,10 +9,14 @@ m4/tcgetsid.m4
 Depends-on:
 termios
 extensions
-sys_ioctl       [test $ac_cv_func_tcgetsid = no]
+sys_ioctl       [test $HAVE_TCGETSID = 0]
 
 configure.ac:
 gl_FUNC_TCGETSID
+if test $HAVE_TCGETSID = 0; then
+  AC_LIBOBJ([tcgetsid])
+  gl_PREREQ_TCGETSID
+fi
 gl_TERMIOS_MODULE_INDICATOR([tcgetsid])
 
 Makefile.am: