From d067ee2105ac1d64c2b106869fbf93b991f52e11 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 10 Oct 2006 09:32:02 +0000 Subject: r19227: - add a AC_CACHE_CHECK() around the net/if.h test to see (we now get some output that this test happens at all...). - make use of AC_INCLUDES_DEFAULT metze (This used to be commit 7e399e607c8e9bf7365de7d492d29377177cdc1f) --- source4/lib/replace/libreplace.m4 | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'source4/lib/replace/libreplace.m4') diff --git a/source4/lib/replace/libreplace.m4 b/source4/lib/replace/libreplace.m4 index 804f998b9e..662993cb79 100644 --- a/source4/lib/replace/libreplace.m4 +++ b/source4/lib/replace/libreplace.m4 @@ -102,22 +102,21 @@ AC_CHECK_HEADERS(sys/sockio.h sys/un.h) dnl we need to check that net/if.h really can be used, to cope with hpux dnl where including it always fails -AC_TRY_COMPILE([ - #include - #if STDC_HEADERS - # include - # include - #else - # if HAVE_STDLIB_H - # include - # endif - #endif - #if HAVE_SYS_SOCKET_H - # include - #endif], - [#include ], - AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h)) - +AC_CACHE_CHECK([for usable net/if.h],libreplace_cv_USABLE_NET_IF_H,[ + AC_COMPILE_IFELSE([ + AC_INCLUDES_DEFAULT + #if HAVE_SYS_SOCKET_H + # include + #endif + #include + int main(void) {return 0;}], + [libreplace_cv_USABLE_NET_IF_H=yes], + [libreplace_cv_USABLE_NET_IF_H=no] + ) +]) +if test x"$libreplace_cv_USABLE_NET_IF_H" = x"yes";then + AC_DEFINE(HAVE_NET_IF_H, 1, usability of net/if.h) +fi AC_CACHE_CHECK([for broken inet_ntoa],samba_cv_REPLACE_INET_NTOA,[ AC_TRY_RUN([ -- cgit