Check for the existence of setenv() in the system libraries and use the system version if it exists.  This prevents "error: declaration of setenv() throws different exceptions" when building on certain Linux platforms.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4263 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/configure.ac b/configure.ac
index 1ac6351..d13ecbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,8 @@
 AC_LANG_RESTORE
 AC_SUBST(INET_LIB)
 
+AC_CHECK_FUNC(setenv, AC_DEFINE([HAVE_SETENV], [1], [Is setenv() present?]))
+
 dnl Check for zlib library
 INCLUDED_ZLIB=no
 AC_ARG_WITH([included-zlib],