diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-30 12:28:13 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-30 12:28:13 +0000 |
commit | ab2465239414853a14529f88a25f13c392aa2d3f (patch) | |
tree | 44de11090d9aec02e4928f5414f41843b6ca2fae /source/configure.in | |
parent | 200b682e9bbe79897343422f7c870382ed6de40a (diff) | |
download | samba-ab2465239414853a14529f88a25f13c392aa2d3f.tar.gz samba-ab2465239414853a14529f88a25f13c392aa2d3f.tar.xz samba-ab2465239414853a14529f88a25f13c392aa2d3f.zip |
- added AC_HAVE_DECL() macro to aclocal.m4, so we can easily add
tests for a fn or variable being defined in headers
- used this to add prototypes for asprintf and vasprintf on systems
that don't have them
Diffstat (limited to 'source/configure.in')
-rw-r--r-- | source/configure.in | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/source/configure.in b/source/configure.in index 00d91847f42..f7751dc0f51 100644 --- a/source/configure.in +++ b/source/configure.in @@ -322,28 +322,14 @@ if test x"$samba_cv_sig_atomic_t" = x"yes"; then AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE) fi -AC_CACHE_CHECK([for errno in errno.h],samba_cv_errno, [ - AC_TRY_COMPILE([#include <errno.h>],[int i = errno], - samba_cv_errno=yes,samba_cv_have_errno=no)]) -if test x"$samba_cv_errno" = x"yes"; then - AC_DEFINE(HAVE_ERRNO_DECL) -fi - -# stupid glibc has the functions but no declaration. grrrr. -AC_CACHE_CHECK([for setresuid declaration],samba_cv_have_setresuid_decl,[ - AC_TRY_COMPILE([#include <unistd.h>],[int i = (int)setresuid], - samba_cv_have_setresuid_decl=yes,samba_cv_have_setresuid_decl=no)]) -if test x"$samba_cv_have_setresuid_decl" = x"yes"; then - AC_DEFINE(HAVE_SETRESUID_DECL) -fi - -# stupid glibc has the functions but no declaration. grrrr. -AC_CACHE_CHECK([for setresgid declaration],samba_cv_have_setresgid_decl,[ - AC_TRY_COMPILE([#include <unistd.h>],[int i = (int)setresgid], - samba_cv_have_setresgid_decl=yes,samba_cv_have_setresgid_decl=no)]) -if test x"$samba_cv_have_setresgid_decl" = x"yes"; then - AC_DEFINE(HAVE_SETRESGID_DECL) -fi +# stupid headers have the functions but no declaration. grrrr. +AC_HAVE_DECL(errno, [#include <errno.h>]) +AC_HAVE_DECL(setresuid, [#include <unistd.h>]) +AC_HAVE_DECL(setresgid, [#include <unistd.h>]) +AC_HAVE_DECL(asprintf, [#include <stdio.h>]) +AC_HAVE_DECL(vasprintf, [#include <stdio.h>]) +AC_HAVE_DECL(vsnprintf, [#include <stdio.h>]) +AC_HAVE_DECL(snprintf, [#include <stdio.h>]) # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. |