diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-05-08 10:06:39 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-05-13 09:07:12 +0200 |
commit | 108443ace5ca4198a319c0b3619b530afd337594 (patch) | |
tree | 82fa0d4bb502daf5b6d0be6bcd53d9658f359a5e | |
parent | 254641d3f21d54927e46304c3fb091909f2c5ba3 (diff) | |
download | samba-108443ace5ca4198a319c0b3619b530afd337594.tar.gz samba-108443ace5ca4198a319c0b3619b530afd337594.tar.bz2 samba-108443ace5ca4198a319c0b3619b530afd337594.zip |
libreplace: merge getaddrinfo.m4 into libreplace_network.m4
metze
(This used to be commit 64591d064dc3da6074f0f7539911a6e433d9cc43)
-rw-r--r-- | source4/lib/replace/getaddrinfo.m4 | 32 | ||||
-rw-r--r-- | source4/lib/replace/libreplace_network.m4 | 34 |
2 files changed, 33 insertions, 33 deletions
diff --git a/source4/lib/replace/getaddrinfo.m4 b/source4/lib/replace/getaddrinfo.m4 deleted file mode 100644 index bc6e69ea56..0000000000 --- a/source4/lib/replace/getaddrinfo.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl test for getaddrinfo/getnameinfo -AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[ -AC_TRY_LINK([ -#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 diff --git a/source4/lib/replace/libreplace_network.m4 b/source4/lib/replace/libreplace_network.m4 index 87f6153e90..ff41056891 100644 --- a/source4/lib/replace/libreplace_network.m4 +++ b/source4/lib/replace/libreplace_network.m4 @@ -126,7 +126,39 @@ AC_CHECK_FUNCS(inet_ntop,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntop.o"]) AC_CHECK_FUNCS(inet_pton,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_pton.o"]) -m4_include(getaddrinfo.m4) +dnl test for getaddrinfo/getnameinfo +AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[ +AC_TRY_LINK([ +#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 + m4_include(getifaddrs.m4) echo "LIBREPLACE_NETWORK_CHECKS: END" |