5 dnl Check whether putenv ("FOO") removes FOO from the environment.
6 dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
8 dnl If you use this macro in a package, you should
9 dnl add the following two lines to acconfig.h:
10 dnl /* Define to rpl_putenv if the replacement function should be used. */
14 AC_DEFUN(jm_FUNC_PUTENV,
15 [AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
21 if (putenv ("CONFTEST_putenv=val"))
24 /* Try to remove it. */
25 if (putenv ("CONFTEST_putenv"))
28 /* Make sure it was deleted. */
29 if (getenv ("CONFTEST_putenv") != 0)
35 jm_cv_func_svid_putenv=yes,
36 jm_cv_func_svid_putenv=no,
37 dnl When crosscompiling, assume putenv is broken.
38 jm_cv_func_svid_putenv=no)
40 if test $jm_cv_func_svid_putenv = no; then
41 LIBOBJS="$LIBOBJS putenv.o"
42 AC_DEFINE_UNQUOTED(putenv, rpl_putenv)