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

ChangeLog
m4/getpass.m4
modules/getpass-gnu

index f2aad56..da75d62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
+       getpass-gnu: Move AC_LIBOBJ invocations to module description.
+       * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set REPLACE_GETPASS. Move
+       AC_LIBOBJ and gl_PREREQ_GETPASS invocations from here...
+       * modules/getpass-gnu (configure.ac): ... to here.
+
+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...
index 9ec3517..64cee1e 100644 (file)
@@ -29,13 +29,15 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 
   AC_CHECK_DECLS_ONCE([getpass])
   dnl TODO: Detect when GNU getpass() is already found in glibc.
-  AC_LIBOBJ([getpass])
-  gl_PREREQ_GETPASS
-  dnl We must choose a different name for our function, since on ELF systems
-  dnl an unusable getpass() in libc.so would override our getpass() if it is
-  dnl compiled into a shared library.
-  AC_DEFINE([getpass], [gnu_getpass],
-    [Define to a replacement function name for getpass().])
+  REPLACE_GETPASS=1
+
+  if test $REPLACE_GETPASS = 1; then
+    dnl We must choose a different name for our function, since on ELF systems
+    dnl an unusable getpass() in libc.so would override our getpass() if it is
+    dnl compiled into a shared library.
+    AC_DEFINE([getpass], [gnu_getpass],
+      [Define to a replacement function name for getpass().])
+  fi
 ])
 
 # Prerequisites of lib/getpass.c.
index 92e2d79..cd83015 100644 (file)
@@ -13,6 +13,10 @@ stdbool
 
 configure.ac:
 gl_FUNC_GETPASS_GNU
+if test $REPLACE_GETPASS = 1; then
+  AC_LIBOBJ([getpass])
+  gl_PREREQ_GETPASS
+fi
 
 Makefile.am: