diff options
author | Thomas Habets <thomas@habets.se> | 2011-11-01 00:22:25 +0000 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2011-11-01 00:22:25 +0000 |
commit | a03413aa161cace9733a0a3c3c98420c761484ee (patch) | |
tree | f663b25e3bcf27885786c54baa43d1ed0c5168b6 /configure.ac | |
parent | 2183af6365b58288830f8ce99d9661ae4cc4e8e2 (diff) | |
download | arping-a03413aa161cace9733a0a3c3c98420c761484ee.tar.gz |
Added getifaddrs() and native BSD versions of findif.
Native BSD version based off of:
http://www.freebsd.org/cgi/query-pr.cgi?pr=122333
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 97e9397..a30c45a 100644 --- a/configure.ac +++ b/configure.ac @@ -60,19 +60,27 @@ AC_PROG_GCC_TRADITIONAL AC_FUNC_SELECT_ARGTYPES AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL -AC_CHECK_FUNCS([gettimeofday memset select strchr strdup strerror strstr]) +AC_CHECK_FUNCS([gettimeofday memset select strchr strdup strerror strstr \ +getifaddrs]) -case "$target_os" in - *linux*) - AC_LIBOBJ([findif_linux]) - ;; - *freebsd*|*openbsd*|*solaris*|*darwin*) - AC_LIBOBJ([findif_bsd]) - ;; - *) - AC_LIBOBJ([findif_other]) - ;; -esac +if test x$ac_cv_func_getifaddrs = xyes; then + AC_LIBOBJ([findif_getifaddrs]) +else + case "$target_os" in + *linux*) + AC_LIBOBJ([findif_linux]) + ;; + *freebsd*|*openbsd*|*darwin*) + AC_LIBOBJ([findif_sysctl]) + ;; + *solaris*) + AC_LIBOBJ([findif_bsdroute]) + ;; + *) + AC_LIBOBJ([findif_other]) + ;; + esac +fi |