Add '.ext/cfd/' from commit 'e370d22add00480a67fd028c0e7d3148737fe484'
[runlisp] / .ext / cfd / m4 / mdw-decl-environ.m4
1 dnl -*-autoconf-*-
2
3 ### SYNOPSIS
4 ###
5 ### mdw_DECL_ENVIRON
6 ###
7 ### DESCRIPTION
8 ###
9 ### Define a preprocessor symbol `DECL_ENVIRON' if the `environ' vector is
10 ### declared in one of the `usual' places.
11 ###
12 ### LICENSE
13 ###
14 ### Copyright (c) 1999 Mark Wooding <mdw@distorted.org.uk>
15 ###
16 ### This program is free software: you can redistribute it and/or modify it
17 ### under the terms of the GNU General Public License as published by the
18 ### Free Software Foundation, either version 2 of the License, or (at your
19 ### option) any later version.
20 ###
21 ### This program is distributed in the hope that it will be useful, but
22 ### WITHOUT ANY WARRANTY; without even the implied warranty of
23 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 ### General Public License for more details.
25 ###
26 ### You should have received a copy of the GNU General Public License along
27 ### with this program. If not, see <http://www.gnu.org/licenses/>.
28 ###
29 ### As a special exception, the respective Autoconf Macro's copyright owner
30 ### gives unlimited permission to copy, distribute and modify the configure
31 ### scripts that are the output of Autoconf when processing the Macro. You
32 ### need not follow the terms of the GNU General Public License when using
33 ### or distributing such scripts, even though portions of the text of the
34 ### Macro appear in them. The GNU General Public License (GPL) does govern
35 ### all other use of the material that constitutes the Autoconf Macro.
36 ###
37 ### This special exception to the GPL applies to versions of the Autoconf
38 ### Macro released by the Autoconf Archive. When you make and distribute a
39 ### modified version of the Autoconf Macro, you may extend this special
40 ### exception to the GPL to apply to your modified version as well.
41
42 # serial 1
43 AC_DEFUN([mdw_DECL_ENVIRON],
44 [AC_CACHE_CHECK([for declaration of \`environ'], mdw_cv_environ,
45 [AC_EGREP_CPP([\<environ\>],
46 [#include <sys/types.h>
47 #if HAVE_UNISTD_H
48 #include <unistd.h>
49 #endif
50 #if STDC_HEADERS
51 #include <stdlib.h>
52 #include <stddef.h>
53 #endif], [mdw_cv_environ=yes], [mdw_cv_environ=no])])
54 if test $mdw_cv_environ = yes; then
55 AC_DEFINE([DECL_ENVIRON], [1],
56 [Define if you have the `environ' vector of environment variables.])
57 fi])