aclocal.glob, m4/: Split the monster into separate `aclocal'-ish files.
[runlisp] / m4 / mdw-decl-environ.m4
CommitLineData
fb2149fc
MW
1dnl -*-autoconf-*-
2
3dnl --- *@-mdw_DECL_ENVIRON-@* ---
4dnl
5dnl Author: Mark Wooding
6dnl
7dnl Synopsis: mdw_DECL_ENVIRON
8dnl
9dnl Arguments: ---
10dnl
11dnl Use: Searches for a declaration of the global `environ' variable.
12dnl If one is found in one of the `usual' places, DECL_ENVIRON
13dnl is defined as a preprocessor symbol.
14
15AC_DEFUN([mdw_DECL_ENVIRON],
16[AC_CACHE_CHECK([for declaration of \`environ'], mdw_cv_environ,
17[AC_EGREP_CPP([\<environ\>],
18[#include <sys/types.h>
19#if HAVE_UNISTD_H
20#include <unistd.h>
21#endif
22#if STDC_HEADERS
23#include <stdlib.h>
24#include <stddef.h>
25#endif], [mdw_cv_environ=yes], [mdw_cv_environ=no])])
26if test $mdw_cv_environ = yes; then
27 AC_DEFINE([DECL_ENVIRON], [1],
28 [Define if you have the `environ' vector of environment variables.])
29fi])