r15321: Reduce the size of rewrite.m4 a bit more
[ira/wip.git] / source4 / lib / netif / config.m4
1 AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h sys/time.h)
2 AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
3
4 ##################
5 # look for a method of finding the list of network interfaces
6 iface=no;
7 AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
8 AC_TRY_RUN([
9 #define HAVE_IFACE_AIX 1
10 #define AUTOCONF_TEST 1
11 #include "confdefs.h"
12 #include "${srcdir-.}/lib/netif/netif.c"],
13            samba_cv_HAVE_IFACE_AIX=yes,samba_cv_HAVE_IFACE_AIX=no,samba_cv_HAVE_IFACE_AIX=cross)])
14 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
15     iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
16 fi
17
18 if test $iface = no; then
19 AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
20 AC_TRY_RUN([
21 #define HAVE_IFACE_IFCONF 1
22 #define AUTOCONF_TEST 1
23 #include "confdefs.h"
24 #include "${srcdir-.}/lib/netif/netif.c"],
25            samba_cv_HAVE_IFACE_IFCONF=yes,samba_cv_HAVE_IFACE_IFCONF=no,samba_cv_HAVE_IFACE_IFCONF=cross)])
26 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
27     iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
28 fi
29 fi
30
31 if test $iface = no; then
32 AC_CACHE_CHECK([for iface ifreq],samba_cv_HAVE_IFACE_IFREQ,[
33 AC_TRY_RUN([
34 #define HAVE_IFACE_IFREQ 1
35 #define AUTOCONF_TEST 1
36 #include "confdefs.h"
37 #include "${srcdir-.}/lib/netif/netif.c"],
38            samba_cv_HAVE_IFACE_IFREQ=yes,samba_cv_HAVE_IFACE_IFREQ=no,samba_cv_HAVE_IFACE_IFREQ=cross)])
39 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
40     iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
41 fi
42 fi