4 dnl If you use this macro in a package, you should
5 dnl add the following two lines to acconfig.h:
6 dnl /* Define to rpl_putenv if the replacement function should be used. */
10 AC_DEFUN(jm_FUNC_PUTENV,
11 [AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv,
17 if (putenv ("CONFTEST_putenv=val"))
20 /* Try to remove it. */
21 if (putenv ("CONFTEST_putenv"))
24 /* Make sure it was deleted. */
25 if (getenv ("CONFTEST_putenv") != 0)
31 jm_cv_func_svid_putenv=yes,
32 jm_cv_func_svid_putenv=no,
33 dnl When crosscompiling, assume putenv is broken.
34 jm_cv_func_svid_putenv=no)
36 if test $jm_cv_func_svid_putenv = no; then
37 LIBOBJS="$LIBOBJS putenv.o"
38 AC_DEFINE_UNQUOTED(putenv, rpl_putenv)