diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-16 02:39:01 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:50:31 +0100 |
commit | be4decb2b73e3431155663c2dae3a8452ecde28a (patch) | |
tree | 41cff60fa2fb327fdb6e42b60b9d4ee246542fb3 /source4/lib/socket/config.m4 | |
parent | 1786af425bfcd156c8880a72e947197c0218841e (diff) | |
download | samba-be4decb2b73e3431155663c2dae3a8452ecde28a.tar.gz samba-be4decb2b73e3431155663c2dae3a8452ecde28a.tar.bz2 samba-be4decb2b73e3431155663c2dae3a8452ecde28a.zip |
r26467: Use getifaddrs() for interface enumeration and provide replacements for platforms that don't have it in lib/replace.
(This used to be commit 9b4924fbd8619033c55b4c6e2589da247332e7db)
Diffstat (limited to 'source4/lib/socket/config.m4')
-rw-r--r-- | source4/lib/socket/config.m4 | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4 index f8a4915adb..a713090c6d 100644 --- a/source4/lib/socket/config.m4 +++ b/source4/lib/socket/config.m4 @@ -96,96 +96,6 @@ fi dnl don't build ipv6 by default, unless the above test enables it, or dnl the configure uses --with-static-modules=socket_ipv6 -AC_CHECK_HEADERS([ifaddrs.h]) - -dnl test for getifaddrs and freeifaddrs -AC_CACHE_CHECK([for getifaddrs and freeifaddrs],samba_cv_HAVE_GETIFADDRS,[ -AC_TRY_COMPILE([ -#include <sys/socket.h> -#include <sys/types.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <ifaddrs.h> -#include <netdb.h>], -[ -struct ifaddrs *ifp = NULL; -int ret = getifaddrs (&ifp); -freeifaddrs(ifp); -], -samba_cv_HAVE_GETIFADDRS=yes,samba_cv_HAVE_GETIFADDRS=no)]) -if test x"$samba_cv_HAVE_GETIFADDRS" = x"yes"; then - AC_DEFINE(HAVE_GETIFADDRS,1,[Whether the system has getifaddrs]) - AC_DEFINE(HAVE_FREEIFADDRS,1,[Whether the system has freeifaddrs]) -fi - - - -################## -# look for a method of finding the list of network interfaces -# -# This tests need LIBS="$NSL_LIBS $SOCKET_LIBS" -# -old_CFLAGS=$CFLAGS -old_LIBS=$LIBS -LIBS="$NSL_LIBS $SOCKET_LIBS" -CFLAGS="$CFLAGS -Ilib/replace" -iface=no; -################## -# look for a method of finding the list of network interfaces -iface=no; -AC_CACHE_CHECK([for iface getifaddrs],samba_cv_HAVE_IFACE_GETIFADDRS,[ -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}" -AC_TRY_RUN([ -#define NO_CONFIG_H 1 -#define HAVE_IFACE_GETIFADDRS 1 -#define AUTOCONF_TEST 1 -#include "${srcdir-.}/lib/replace/replace.c" -#include "${srcdir-.}/lib/socket/netif.c"], - samba_cv_HAVE_IFACE_GETIFADDRS=yes,samba_cv_HAVE_IFACE_GETIFADDRS=no,samba_cv_HAVE_IFACE_GETIFADDRS=cross)]) -CPPFLAGS="$SAVE_CPPFLAGS" -if test x"$samba_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then - iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available]) -fi -if test $iface = no; then -AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[ -AC_TRY_RUN([ -#define HAVE_IFACE_AIX 1 -#define AUTOCONF_TEST 1 -#undef _XOPEN_SOURCE_EXTENDED -#include "${srcdir-.}/lib/socket/netif.c"], - samba_cv_HAVE_IFACE_AIX=yes,samba_cv_HAVE_IFACE_AIX=no,samba_cv_HAVE_IFACE_AIX=cross)]) -if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then - iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available]) -fi -fi - - -if test $iface = no; then -AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[ -AC_TRY_RUN([ -#define HAVE_IFACE_IFCONF 1 -#define AUTOCONF_TEST 1 -#include "${srcdir-.}/lib/socket/netif.c"], - samba_cv_HAVE_IFACE_IFCONF=yes,samba_cv_HAVE_IFACE_IFCONF=no,samba_cv_HAVE_IFACE_IFCONF=cross)]) -if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then - iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available]) -fi -fi - -if test $iface = no; then -AC_CACHE_CHECK([for iface ifreq],samba_cv_HAVE_IFACE_IFREQ,[ -AC_TRY_RUN([ -#define HAVE_IFACE_IFREQ 1 -#define AUTOCONF_TEST 1 -#include "${srcdir-.}/lib/socket/netif.c"], - samba_cv_HAVE_IFACE_IFREQ=yes,samba_cv_HAVE_IFACE_IFREQ=no,samba_cv_HAVE_IFACE_IFREQ=cross)]) -if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then - iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available]) -fi -fi -CFLAGS=$old_CFLAGS -LIBS=$old_LIBS |