~ubuntu-branches/ubuntu/natty/gnupg2/natty-security

« back to all changes in this revision

Viewing changes to gl/m4/setenv.m4

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2005-12-08 22:13:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051208221321-4rvs2vu835iam5wv
Tags: 1.9.19-2
* Convert debian/changelog to UTF-8.
* Put gnupg-agent and gpgsm lintian overrides in the respectively
  right package.  Closes: #335066
* Added debhelper tokens to maintainer scripts.
* xsession fixes:
  o Added host name to gpg-agent PID file name.  Closes: #312717
  o Fixed xsession script to be able to run under zsh.  Closes: #308516
  o Don't run gpg-agent if one is already running.  Closes: #336480
* debian/control:
  o Fixed package description of gpgsm package.  Closes: #299842
  o Added mention of gpg-agent to description of gnupg-agent package.
    Closes: #304355
* Thanks to Peter Eisentraut <petere@debian.org> for all of the above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# setenv.m4 serial 5
 
2
dnl Copyright (C) 2001-2004 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
AC_DEFUN([gt_FUNC_SETENV],
 
8
[
 
9
  AC_REPLACE_FUNCS(setenv unsetenv)
 
10
  if test $ac_cv_func_setenv = no; then
 
11
    gl_PREREQ_SETENV
 
12
  fi
 
13
  if test $ac_cv_func_unsetenv = no; then
 
14
    gl_PREREQ_UNSETENV
 
15
  else
 
16
    AC_CACHE_CHECK([for unsetenv() return type], gt_cv_func_unsetenv_ret,
 
17
      [AC_TRY_COMPILE([#include <stdlib.h>
 
18
extern
 
19
#ifdef __cplusplus
 
20
"C"
 
21
#endif
 
22
#if defined(__STDC__) || defined(__cplusplus)
 
23
int unsetenv (const char *name);
 
24
#else
 
25
int unsetenv();
 
26
#endif
 
27
], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
 
28
    if test $gt_cv_func_unsetenv_ret = 'void'; then
 
29
      AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not int.])
 
30
    fi
 
31
  fi
 
32
])
 
33
 
 
34
# Check if a variable is properly declared.
 
35
# gt_CHECK_VAR_DECL(includes,variable)
 
36
AC_DEFUN([gt_CHECK_VAR_DECL],
 
37
[
 
38
  define([gt_cv_var], [gt_cv_var_]$2[_declaration])
 
39
  AC_MSG_CHECKING([if $2 is properly declared])
 
40
  AC_CACHE_VAL(gt_cv_var, [
 
41
    AC_TRY_COMPILE([$1
 
42
      extern struct { int foo; } $2;],
 
43
      [$2.foo = 1;],
 
44
      gt_cv_var=no,
 
45
      gt_cv_var=yes)])
 
46
  AC_MSG_RESULT($gt_cv_var)
 
47
  if test $gt_cv_var = yes; then
 
48
    AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
 
49
              [Define if you have the declaration of $2.])
 
50
  fi
 
51
])
 
52
 
 
53
# Prerequisites of lib/setenv.c.
 
54
AC_DEFUN([gl_PREREQ_SETENV],
 
55
[
 
56
  AC_REQUIRE([AC_FUNC_ALLOCA])
 
57
  AC_CHECK_HEADERS_ONCE(unistd.h)
 
58
  AC_CHECK_HEADERS(search.h)
 
59
  AC_CHECK_FUNCS(tsearch)
 
60
  gt_CHECK_VAR_DECL([#include <errno.h>], errno)
 
61
  gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
 
62
])
 
63
 
 
64
# Prerequisites of lib/unsetenv.c.
 
65
AC_DEFUN([gl_PREREQ_UNSETENV],
 
66
[
 
67
  AC_CHECK_HEADERS_ONCE(unistd.h)
 
68
  gt_CHECK_VAR_DECL([#include <errno.h>], errno)
 
69
  gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
 
70
])