[Define this if you do pings with a `struct icmphdr' and an
`un.echo.id' slot.])
+AH_TEMPLATE([HAVE_GETIFADDRS],
+ [Define this if you have the getifaddrs() function.])
+
AH_TEMPLATE([HAVE_FORKPTY],
[Define this if you have the 'forkpty' function:
This allows 'phosphor' and 'apple2' to run curses-based
;;
esac])
+AC_DEFUN(AC_CHECK_GETIFADDRS,
+ [AC_CACHE_CHECK([for getifaddrs], ac_cv_have_getifaddrs,
+ [AC_TRY_COMPILE([#include <stdlib.h>
+ #include <unistd.h>
+ #include <arpa/inet.h>
+ #include <ifaddrs.h>],
+ [struct ifaddrs *ifa;
+ getifaddrs (&ifa);
+ ifa->ifa_next = 0;
+ ifa->ifa_addr->sa_family = 0;],
+ [ac_cv_have_getifaddrs=yes],
+ [ac_cv_have_getifaddrs=no])])
+ if test "$ac_cv_have_getifaddrs" = yes ; then
+ AC_DEFINE(HAVE_GETIFADDRS)
+ fi])
###############################################################################
AC_CHECK_FUNCS(setlocale)
AC_CHECK_ICMP
AC_CHECK_ICMPHDR
+AC_CHECK_GETIFADDRS
AC_CHECK_HEADERS(crypt.h sys/select.h)
AC_PROG_PERL