getpass: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 8 May 2011 11:18:21 +0000 (13:18 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:07 +0000 (00:06 +0200)
* m4/getpass.m4 (gl_FUNC_GETPASS): Set HAVE_GETPASS. Move AC_LIBOBJ and
gl_PREREQ_GETPASS invocations from here...
* modules/getpass (configure.ac): ... to here.

ChangeLog
m4/getpass.m4
modules/getpass

index 3291e64..f2aad56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
+       getpass: Move AC_LIBOBJ invocations to module description.
+       * m4/getpass.m4 (gl_FUNC_GETPASS): Set HAVE_GETPASS. Move AC_LIBOBJ and
+       gl_PREREQ_GETPASS invocations from here...
+       * modules/getpass (configure.ac): ... to here.
+
+2011-05-08  Bruno Haible  <bruno@clisp.org>
+
        getpagesize: Move AC_LIBOBJ invocations to module description.
        * m4/getpagesize.m4 (gl_FUNC_GETPAGESIZE): Move AC_LIBOBJ invocation
        from here...
index c6ec427..9ec3517 100644 (file)
@@ -1,4 +1,4 @@
-# getpass.m4 serial 12
+# getpass.m4 serial 13
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -11,10 +11,12 @@ AC_DEFUN([gl_FUNC_GETPASS],
   dnl Persuade Solaris <unistd.h> and <stdlib.h> to declare getpass().
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  AC_REPLACE_FUNCS([getpass])
+  AC_CHECK_FUNCS([getpass])
   AC_CHECK_DECLS_ONCE([getpass])
-  if test $ac_cv_func_getpass = no; then
-    gl_PREREQ_GETPASS
+  if test $ac_cv_func_getpass = yes; then
+    HAVE_GETPASS=1
+  else
+    HAVE_GETPASS=0
   fi
 ])
 
index 161c151..c1cbc25 100644 (file)
@@ -15,6 +15,10 @@ strdup-posix
 
 configure.ac:
 gl_FUNC_GETPASS
+if test $HAVE_GETPASS = 0; then
+  AC_LIBOBJ([getpass])
+  gl_PREREQ_GETPASS
+fi
 
 Makefile.am: