summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-30 12:28:13 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-30 12:28:13 +0000
commit05d08414728313e2ca04cd5ccbd3ce9d3470a0a3 (patch)
treeb2af01ef32b440fec6d89b097246aa86840b1941 /source3/configure.in
parentad7c3ea0f0918f09283ab28e4fe99f1156ab52f1 (diff)
downloadsamba-05d08414728313e2ca04cd5ccbd3ce9d3470a0a3.tar.gz
samba-05d08414728313e2ca04cd5ccbd3ce9d3470a0a3.tar.bz2
samba-05d08414728313e2ca04cd5ccbd3ce9d3470a0a3.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 (This used to be commit ab2465239414853a14529f88a25f13c392aa2d3f)
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in30
1 files changed, 8 insertions, 22 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 00d91847f4..f7751dc0f5 100644
--- a/source3/configure.in
+++ b/source3/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.