changeset 15065:580ad7c3aa8c

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.
author Bruno Haible <bruno@clisp.org>
date Sat, 21 May 2011 17:21:17 +0200
parents 1b845c6de6db
children 554c82adb9b9
files ChangeLog m4/pty.m4 modules/forkpty
diffstat 3 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
 	ptsname: Move AC_LIBOBJ invocations to module description.
--- a/m4/pty.m4
+++ b/m4/pty.m4
@@ -1,4 +1,4 @@
-# pty.m4 serial 9
+# pty.m4 serial 10
 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,
@@ -67,12 +67,10 @@
       ])
     if test $gl_cv_func_forkpty_const != yes; then
       REPLACE_FORKPTY=1
-      AC_LIBOBJ([forkpty])
     fi
   else
     dnl The system does not have forkpty.
     HAVE_FORKPTY=0
-    AC_LIBOBJ([forkpty])
   fi
 ])
 
--- a/modules/forkpty
+++ b/modules/forkpty
@@ -13,6 +13,9 @@
 
 configure.ac:
 gl_FUNC_FORKPTY
+if test $HAVE_FORKPTY = 0 || test $REPLACE_FORKPTY = 1; then
+  AC_LIBOBJ([forkpty])
+fi
 gl_PTY_MODULE_INDICATOR([forkpty])
 
 Makefile.am: