1
This commit is contained in:
1 parent
f682413306
commit
7dd81d6155
2 files changed
+16
-26
No files matched your search
@@ -81,6 +81,20 @@ AC_MSG_RESULT([$os_freebsd])
|
||||
|
||||
AM_CONDITIONAL([OS_FREEBSD], [test "x$os_freebsd" = "xyes"])
|
||||
|
||||
# Set TUN source file based on platform
|
||||
if test "x$os_freebsd" = "xyes"; then
|
||||
TUN_SOURCE="tun_freebsd.c"
|
||||
TUN_LIBS=""
|
||||
elif test "x$os_windows" = "xyes"; then
|
||||
TUN_SOURCE="tun_windows.c"
|
||||
TUN_LIBS="-liphlpapi -lws2_32 -ladvapi32 -lbcrypt -ldbghelp"
|
||||
else
|
||||
TUN_SOURCE="tun_linux.c"
|
||||
TUN_LIBS=""
|
||||
fi
|
||||
AC_SUBST([TUN_SOURCE])
|
||||
AC_SUBST([TUN_LIBS])
|
||||
|
||||
# Checks for header files, typedefs, functions...
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
+2
-26
@@ -23,32 +23,8 @@ utun_CORE_SOURCES = \
|
||||
control_server.c
|
||||
|
||||
# Platform-specific TUN sources
|
||||
# Use AM_CONDITIONAL to select the right source file
|
||||
|
||||
if OS_WINDOWS
|
||||
utun_TUN_SOURCES = tun_windows.c
|
||||
utun_TUN_LIBS = -liphlpapi -lws2_32 -ladvapi32 -lbcrypt -ldbghelp
|
||||
AM_CONDITIONAL(TUN_FREEBSD, [false])
|
||||
AM_CONDITIONAL(TUN_LINUX, [false])
|
||||
endif
|
||||
|
||||
if OS_FREEBSD
|
||||
utun_TUN_SOURCES = tun_freebsd.c
|
||||
utun_TUN_LIBS =
|
||||
AM_CONDITIONAL(TUN_FREEBSD, [true])
|
||||
AM_CONDITIONAL(TUN_LINUX, [false])
|
||||
endif
|
||||
|
||||
if OS_WINDOWS
|
||||
else
|
||||
if OS_FREEBSD
|
||||
else
|
||||
utun_TUN_SOURCES = tun_linux.c
|
||||
utun_TUN_LIBS =
|
||||
AM_CONDITIONAL(TUN_FREEBSD, [false])
|
||||
AM_CONDITIONAL(TUN_LINUX, [true])
|
||||
endif
|
||||
endif
|
||||
utun_TUN_SOURCES = $(TUN_SOURCE)
|
||||
utun_TUN_LIBS = $(TUN_LIBS)
|
||||
|
||||
# TinyCrypt sources (only used without OpenSSL)
|
||||
utun_TINYCRYPT_SOURCES = \
|
||||
|
||||
Reference in new issue
Block a user