From: Bruno Haible Date: Sun, 8 May 2011 11:21:50 +0000 (+0200) Subject: getpass-gnu: Move AC_LIBOBJ invocations to module description. X-Git-Tag: v0.1~2554 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=4d1af83a4cfc1a443cc32b76729f8f238af3b6a7;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index f2aad564a..da75d62fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-05-08 Bruno Haible + 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 + 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... diff --git a/m4/getpass.m4 b/m4/getpass.m4 index 9ec351750..64cee1ea8 100644 --- a/m4/getpass.m4 +++ b/m4/getpass.m4 @@ -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. diff --git a/modules/getpass-gnu b/modules/getpass-gnu index 92e2d798d..cd83015ee 100644 --- a/modules/getpass-gnu +++ b/modules/getpass-gnu @@ -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: