summaryrefslogtreecommitdiff
path: root/source4/lib/netif
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-08-04 16:49:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:13 -0500
commit56c112bbbc028bf7b74b47b22d41b74c7a3f9855 (patch)
tree821cb50bb21b77eb083370d11c3dd8eb93680ee5 /source4/lib/netif
parent2ba1fa7b593706bdd1ad5bae982ed51b16dc3a83 (diff)
downloadsamba-56c112bbbc028bf7b74b47b22d41b74c7a3f9855.tar.gz
samba-56c112bbbc028bf7b74b47b22d41b74c7a3f9855.tar.bz2
samba-56c112bbbc028bf7b74b47b22d41b74c7a3f9855.zip
r9063: - don't pollute the global $LIBS variable with -ldl
- -lresolve seems to not being needed any more (it's actually not used, and the build farm seem to happy with it) - move socket and netif configure test to seperate files - don't pollute the global $LIBS variable with -lsocket ... - actually make use of the -lsocket when needed (should fix the solaris build) metze (This used to be commit adebd56be6f62323d56b6666ca0e02f85a33438e)
Diffstat (limited to 'source4/lib/netif')
-rw-r--r--source4/lib/netif/config.m442
1 files changed, 42 insertions, 0 deletions
diff --git a/source4/lib/netif/config.m4 b/source4/lib/netif/config.m4
new file mode 100644
index 0000000000..76d1bfa9d5
--- /dev/null
+++ b/source4/lib/netif/config.m4
@@ -0,0 +1,42 @@
+AC_CHECK_HEADERS(arpa/inet.h net/if.h netdb.h netinet/in.h)
+AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
+
+##################
+# look for a method of finding the list of network interfaces
+iface=no;
+AC_CACHE_CHECK([for iface AIX],samba_cv_HAVE_IFACE_AIX,[
+AC_TRY_RUN([
+#define HAVE_IFACE_AIX 1
+#define AUTOCONF_TEST 1
+#include "confdefs.h"
+#include "${srcdir-.}/lib/netif/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
+
+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 "confdefs.h"
+#include "${srcdir-.}/lib/netif/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 "confdefs.h"
+#include "${srcdir-.}/lib/netif/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