svn commit: samba r25726 - in branches/SAMBA_4_0/source/lib/replace: .

metze at samba.org metze at samba.org
Thu Oct 25 08:43:00 GMT 2007


Author: metze
Date: 2007-10-25 08:43:00 +0000 (Thu, 25 Oct 2007)
New Revision: 25726

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25726

Log:
[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
Added:
   branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m4
Modified:
   branches/SAMBA_4_0/source/lib/replace/libreplace.m4


Changeset:
Added: branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m4	2007-10-25 06:56:27 UTC (rev 25725)
+++ branches/SAMBA_4_0/source/lib/replace/getaddrinfo.m4	2007-10-25 08:43:00 UTC (rev 25726)
@@ -0,0 +1,32 @@
+dnl test for getaddrinfo/getnameinfo
+AC_CACHE_CHECK([for getaddrinfo],libreplace_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);
+
+],
+libreplace_cv_HAVE_GETADDRINFO=yes,libreplace_cv_HAVE_GETADDRINFO=no)])
+if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
+	AC_DEFINE(HAVE_GETADDRINFO,1,[Whether the system has getaddrinfo])
+	AC_DEFINE(HAVE_GETNAMEINFO,1,[Whether the system has getnameinfo])
+	AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo])
+	AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
+else
+	LIBREPLACEOBJ="${LIBREPLACEOBJ} getaddrinfo.o"
+fi

Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2007-10-25 06:56:27 UTC (rev 25725)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4	2007-10-25 08:43:00 UTC (rev 25726)
@@ -152,36 +152,6 @@
 #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(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])])



More information about the samba-cvs mailing list