summaryrefslogtreecommitdiff
path: root/source4/lib/replace/getifaddrs.m4
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace/getifaddrs.m4')
-rw-r--r--source4/lib/replace/getifaddrs.m411
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/replace/getifaddrs.m4 b/source4/lib/replace/getifaddrs.m4
index 6cca155de3..927bc677db 100644
--- a/source4/lib/replace/getifaddrs.m4
+++ b/source4/lib/replace/getifaddrs.m4
@@ -34,10 +34,12 @@ fi
##################
# look for a method of finding the list of network interfaces
#
-# This tests need LIBS="$NSL_LIBS $SOCKET_LIBS"
+# This tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
#
old_LIBS=$LIBS
-LIBS="$NSL_LIBS $SOCKET_LIBS"
+LIBS="${LIBREPLACE_NETWORK_LIBS}"
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -I$libreplacedir"
iface=no;
##################
# look for a method of finding the list of network interfaces
@@ -79,7 +81,6 @@ AC_TRY_RUN([
libreplace_cv_HAVE_IFACE_AIX=yes,libreplace_cv_HAVE_IFACE_AIX=no,libreplace_cv_HAVE_IFACE_AIX=cross)])
if test x"$libreplace_cv_HAVE_IFACE_AIX" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_AIX,1,[Whether iface AIX is available])
- old_LIBS="$old_LIBS $LIBS"
fi
fi
@@ -100,7 +101,6 @@ AC_TRY_RUN([
libreplace_cv_HAVE_IFACE_IFCONF=yes,libreplace_cv_HAVE_IFACE_IFCONF=no,libreplace_cv_HAVE_IFACE_IFCONF=cross)])
if test x"$libreplace_cv_HAVE_IFACE_IFCONF" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
- old_LIBS="$old_LIBS $LIBS"
fi
fi
@@ -120,8 +120,9 @@ AC_TRY_RUN([
libreplace_cv_HAVE_IFACE_IFREQ=yes,libreplace_cv_HAVE_IFACE_IFREQ=no,libreplace_cv_HAVE_IFACE_IFREQ=cross)])
if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_IFREQ,1,[Whether iface ifreq is available])
- old_LIBS="$old_LIBS $LIBS"
fi
fi
LIBS=$old_LIBS
+CPPFLAGS="$SAVE_CPPFLAGS"
+