summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-02-27 00:04:39 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-02-27 00:05:06 -0800
commit6ef14349fa73922473ba8202e256f20e17661b25 (patch)
tree32e211a68c8f28caec74799f39426de2461b5d90 /configure.ac
parent619fc5c197ebef5444aed24fe30657989fc2a839 (diff)
downloademacs-6ef14349fa73922473ba8202e256f20e17661b25.tar.gz
Don't require GNU putenv
* configure.ac: Use system putenv even if it lacks GNU features, as we don't need them. This works around a bug in FreeBSD 10.1 getenv. Fixes: bug#19874
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0bcc55c4c20..e7408f11ed4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -780,6 +780,11 @@ AC_DEFUN([gl_CRYPTO_CHECK])
# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
# as we don't use them.
AC_DEFUN([gl_FCNTL_O_FLAGS])
+# Use the system putenv even if it lacks GNU features, as we don't need them,
+# and the gnulib replacement runs afoul of a FreeBSD 10.1 bug; see Bug#19874.
+AC_CHECK_FUNCS_ONCE([putenv])
+AC_DEFUN([gl_FUNC_PUTENV],
+ [test "$ac_cv_func_putenv" = yes || REPLACE_PUTENV=1])
# Initialize gnulib right after choosing the compiler.
dnl Amongst other things, this sets AR and ARFLAGS.