openpty: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sat, 21 May 2011 15:24:06 +0000 (17:24 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:38 +0000 (00:06 +0200)
* m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here...
* modules/openpty (configure.ac): ... to here.

ChangeLog
m4/pty.m4
modules/openpty

index 8b1d34c..f832499 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
+       openpty: Move AC_LIBOBJ invocations to module description.
+       * m4/pty.m4 (gl_FUNC_OPENPTY): Move AC_LIBOBJ invocations from here...
+       * modules/openpty (configure.ac): ... to here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
        forkpty: Move AC_LIBOBJ invocations to module description.
        * m4/pty.m4 (gl_FUNC_FORKPTY): Move AC_LIBOBJ invocations from here...
        * modules/forkpty (configure.ac): ... to here.
index 1042a40..fc99e73 100644 (file)
--- a/m4/pty.m4
+++ b/m4/pty.m4
@@ -1,4 +1,4 @@
-# pty.m4 serial 10
+# pty.m4 serial 11
 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,
@@ -124,14 +124,13 @@ AC_DEFUN([gl_FUNC_OPENPTY],
       ])
     if test $gl_cv_func_openpty_const != yes; then
       REPLACE_OPENPTY=1
-      AC_LIBOBJ([openpty])
       AC_DEFINE([HAVE_OPENPTY], [1],
         [Define to 1 if the system has the 'openpty' function.])
     fi
   else
     dnl The system does not have openpty.
     HAVE_OPENPTY=0
-    AC_LIBOBJ([openpty])
+    dnl Prerequisites of lib/openpty.c in this case.
     AC_CHECK_FUNCS([_getpty posix_openpt])
   fi
 ])
index b2d9685..27a8bfc 100644 (file)
@@ -13,6 +13,9 @@ ioctl
 
 configure.ac:
 gl_FUNC_OPENPTY
+if test $HAVE_OPENPTY = 0 || test $REPLACE_OPENPTY = 1; then
+  AC_LIBOBJ([openpty])
+fi
 gl_PTY_MODULE_INDICATOR([openpty])
 
 Makefile.am: