Last change
on this file since 3532 was 2595, checked in by bird, 13 years ago |
gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)
|
File size:
1.2 KB
|
Line | |
---|
1 | # putenv.m4 serial 18
|
---|
2 | dnl Copyright (C) 2002-2012 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 | dnl From Jim Meyering.
|
---|
8 | dnl
|
---|
9 | dnl Check whether putenv ("FOO") removes FOO from the environment.
|
---|
10 | dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
|
---|
11 |
|
---|
12 | AC_DEFUN([gl_FUNC_PUTENV],
|
---|
13 | [
|
---|
14 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
---|
15 | AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
|
---|
16 | [gl_cv_func_svid_putenv],
|
---|
17 | [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
|
---|
18 | /* Put it in env. */
|
---|
19 | if (putenv ("CONFTEST_putenv=val"))
|
---|
20 | return 1;
|
---|
21 |
|
---|
22 | /* Try to remove it. */
|
---|
23 | if (putenv ("CONFTEST_putenv"))
|
---|
24 | return 2;
|
---|
25 |
|
---|
26 | /* Make sure it was deleted. */
|
---|
27 | if (getenv ("CONFTEST_putenv") != 0)
|
---|
28 | return 3;
|
---|
29 |
|
---|
30 | return 0;
|
---|
31 | ]])],
|
---|
32 | gl_cv_func_svid_putenv=yes,
|
---|
33 | gl_cv_func_svid_putenv=no,
|
---|
34 | dnl When crosscompiling, assume putenv is broken.
|
---|
35 | gl_cv_func_svid_putenv=no)
|
---|
36 | ])
|
---|
37 | if test $gl_cv_func_svid_putenv = no; then
|
---|
38 | REPLACE_PUTENV=1
|
---|
39 | fi
|
---|
40 | ])
|
---|
Note:
See
TracBrowser
for help on using the repository browser.