~ubuntu-branches/ubuntu/trusty/wget/trusty-updates

« back to all changes in this revision

Viewing changes to m4/getpass.m4

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# getpass.m4 serial 11
 
2
dnl Copyright (C) 2002-2003, 2005-2006, 2009 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
# Provide a getpass() function if the system doesn't have it.
 
8
AC_DEFUN([gl_FUNC_GETPASS],
 
9
[
 
10
  AC_REPLACE_FUNCS([getpass])
 
11
  AC_CHECK_DECLS_ONCE([getpass])
 
12
  if test $ac_cv_func_getpass = no; then
 
13
    gl_PREREQ_GETPASS
 
14
  fi
 
15
])
 
16
 
 
17
# Provide the GNU getpass() implementation. It supports passwords of
 
18
# arbitrary length (not just 8 bytes as on HP-UX).
 
19
AC_DEFUN([gl_FUNC_GETPASS_GNU],
 
20
[
 
21
  AC_CHECK_DECLS_ONCE([getpass])
 
22
  dnl TODO: Detect when GNU getpass() is already found in glibc.
 
23
  AC_LIBOBJ([getpass])
 
24
  gl_PREREQ_GETPASS
 
25
  dnl We must choose a different name for our function, since on ELF systems
 
26
  dnl an unusable getpass() in libc.so would override our getpass() if it is
 
27
  dnl compiled into a shared library.
 
28
  AC_DEFINE([getpass], [gnu_getpass],
 
29
    [Define to a replacement function name for getpass().])
 
30
])
 
31
 
 
32
# Prerequisites of lib/getpass.c.
 
33
AC_DEFUN([gl_PREREQ_GETPASS], [
 
34
  AC_CHECK_HEADERS_ONCE([stdio_ext.h termios.h])
 
35
  AC_CHECK_FUNCS_ONCE([__fsetlocking tcgetattr tcsetattr])
 
36
  AC_CHECK_DECLS([__fsetlocking],,,
 
37
    [#include <stdio.h>
 
38
     #if HAVE_STDIO_EXT_H
 
39
      #include <stdio_ext.h>
 
40
     #endif])
 
41
  AC_CHECK_DECLS_ONCE([fflush_unlocked])
 
42
  AC_CHECK_DECLS_ONCE([flockfile])
 
43
  AC_CHECK_DECLS_ONCE([fputs_unlocked])
 
44
  AC_CHECK_DECLS_ONCE([funlockfile])
 
45
  AC_CHECK_DECLS_ONCE([putc_unlocked])
 
46
  :
 
47
])