Check for sys/uio.h, net/if_tun.h and net/if_tap.h

This commit is contained in:
Guus Sliepen 2004-11-01 17:04:28 +00:00
parent 1f00810da3
commit dced64c5c3
3 changed files with 24 additions and 7 deletions

View file

@ -6,7 +6,7 @@ SUBDIRS = m4 lib src doc po
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = config.rpath mkinstalldirs system.h COPYING.README depcomp
EXTRA_DIST = config.rpath mkinstalldirs have.h system.h COPYING.README depcomp
ChangeLog:
svn log > ChangeLog

View file

@ -46,11 +46,11 @@ case $host_os in
;;
*freebsd*)
AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
[ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*darwin*)
AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
[ rm -f src/device.c; ln -sf darwin/device.c src/device.c ]
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*solaris*)
AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
@ -58,11 +58,16 @@ case $host_os in
;;
*openbsd*)
AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
[ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*netbsd*)
AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
[ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*bsd*)
AC_MSG_WARN("Unknown BSD variant, tinc might not compile or work!")
AC_DEFINE(HAVE_BSD, 1, [Unknown BSD variant])
[ rm -f src/device.c; ln -sf bsd/device.c src/device.c ]
;;
*cygwin*)
AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
@ -93,7 +98,7 @@ dnl Checks for header files.
dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/param.h sys/time.h sys/socket.h sys/wait.h sys/mman.h netdb.h arpa/inet.h])
AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h sys/uio.h sys/wait.h netdb.h arpa/inet.h])
AC_CHECK_HEADERS([net/if.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h],
[], [], [#include "have.h"]
)
@ -122,7 +127,7 @@ dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system unsetenv vsyslog],
AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random select strdup strerror strsignal strtol system unsetenv vsyslog writev],
[], [], [#include "have.h"]
)
jm_FUNC_MALLOC

12
have.h
View file

@ -77,6 +77,10 @@
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
/* SunOS really wants sys/socket.h BEFORE net/if.h,
and FreeBSD wants these lines below the rest. */
@ -92,6 +96,14 @@
#include <net/if.h>
#endif
#ifdef HAVE_NET_IF_TUN_H
#include <net/if_tun.h>
#endif
#ifdef HAVE_NET_IF_TAP_H
#include <net/if_tap.h>
#endif
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif