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.
9 AC_DEFUN(jm_FUNC_PUTENV,
10 [AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
16 if (putenv ("CONFTEST_putenv=val"))
19 /* Try to remove it. */
20 if (putenv ("CONFTEST_putenv"))
23 /* Make sure it was deleted. */
24 if (getenv ("CONFTEST_putenv") != 0)
30 jm_cv_func_svid_putenv=yes,
31 jm_cv_func_svid_putenv=no,
32 dnl When crosscompiling, assume putenv is broken.
33 jm_cv_func_svid_putenv=no)
35 if test $jm_cv_func_svid_putenv = no; then
37 LIBOBJS="$LIBOBJS putenv.$ac_objext"
38 AC_DEFINE_UNQUOTED(putenv, rpl_putenv,
39 [Define to rpl_memcmp if the replacement function should be used.])