diff options
Diffstat (limited to 'libraries/base/configure.ac')
-rw-r--r-- | libraries/base/configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac index eff1e026c7..d84c3cf27f 100644 --- a/libraries/base/configure.ac +++ b/libraries/base/configure.ac @@ -69,6 +69,22 @@ if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.]) fi +# unsetenv +AC_CHECK_FUNCS([unsetenv]) + +### POSIX.1003.1 unsetenv returns 0 or -1 (EINVAL), but older implementations +### in common use return void. +AC_CACHE_CHECK([return type of unsetenv], fptools_cv_func_unsetenv_return_type, + [AC_EGREP_HEADER(changequote(<, >)<void[ ]+unsetenv>changequote([, ]), + stdlib.h, + [fptools_cv_func_unsetenv_return_type=void], + [fptools_cv_func_unsetenv_return_type=int])]) +case "$fptools_cv_func_unsetenv_return_type" in + "void" ) + AC_DEFINE([UNSETENV_RETURNS_VOID], [1], [Define if stdlib.h declares unsetenv to return void.]) + ;; +esac + dnl-------------------------------------------------------------------- dnl * Deal with arguments telling us iconv is somewhere odd dnl-------------------------------------------------------------------- |