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 b30a82b8ca6a4faefebb560903c31dea142cc43e..fb057cf74a013d47759bc8020f57bfd40b996c40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index f8ab91e21dee13057fed7e7f3a6a65dffc02fa13..31e034a763ee16e160e99fd9a98bf69deb29342c 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 6dddb6eb331d6f10f29c5fd0295388d922a5ca5b..38fc9e3e5099b33d5fa0a724f3a9ce1985e053f6 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: