summaryrefslogtreecommitdiff
path: root/source4/lib/replace/libreplace.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-25 08:43:00 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:30 +0100
commit805eb06209e5ad5ff57cb41527b5b1642772f802 (patch)
tree6df071678e8fd143ce481d5173733de271b2074a /source4/lib/replace/libreplace.m4
parent79affaf37a29d6c9c30cc7674cfad97e67bc1867 (diff)
downloadsamba-805eb06209e5ad5ff57cb41527b5b1642772f802.tar.gz
samba-805eb06209e5ad5ff57cb41527b5b1642772f802.tar.bz2
samba-805eb06209e5ad5ff57cb41527b5b1642772f802.zip
r25726: [libreplace] move and fix getaddrinfo configure checks
- move getaddrinfo check into getaddrinfo.m4 - add getaddrinfo.o to LIBREPLACEOBJ so that we really build the replacements metze (This used to be commit b594d9c9fa86249e3d3988702a2333460cd70436)
Diffstat (limited to 'source4/lib/replace/libreplace.m4')
-rw-r--r--source4/lib/replace/libreplace.m431
1 files changed, 1 insertions, 30 deletions
diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4
index 26b4c3636d..dd7dbf4e47 100644
--- a/source4/lib/replace/libreplace.m4
+++ b/source4/lib/replace/libreplace.m4
@@ -152,36 +152,6 @@ AC_HAVE_TYPE([struct sockaddr_in6], [
#include <netinet/in.h>
])
-dnl test for getaddrinfo/getnameinfo
-AC_CACHE_CHECK([for getaddrinfo],samba_cv_HAVE_GETADDRINFO,[
-AC_TRY_COMPILE([
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#include <sys/socket.h>
-#include <netdb.h>],
-[
-struct sockaddr sa;
-struct addrinfo *ai = NULL;
-int ret = getaddrinfo(NULL, NULL, NULL, &ai);
-if (ret != 0) {
- const char *es = gai_strerror(ret);
-}
-freeaddrinfo(ai);
-ret = getnameinfo(&sa, sizeof(sa),
- NULL, 0,
- NULL, 0, 0);
-
-],
-samba_cv_HAVE_GETADDRINFO=yes,samba_cv_HAVE_GETADDRINFO=no)])
-if test x"$samba_cv_HAVE_GETADDRINFO" = x"yes"; then
- AC_DEFINE(HAVE_GETADDRINFO,1,[Whether the system has getaddrinfo and getnameinfo])
- AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo])
- AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
-fi
-
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
@@ -358,6 +328,7 @@ m4_include(win32.m4)
m4_include(timegm.m4)
m4_include(inet_ntop.m4)
m4_include(inet_pton.m4)
+m4_include(getaddrinfo.m4)
m4_include(repdir.m4)
AC_CHECK_FUNCS([syslog memset memcpy],,[AC_MSG_ERROR([Required function not found])])