diff --git a/configure.ac b/configure.ac index f584d442..95f5c617 100644 --- a/configure.ac +++ b/configure.ac @@ -95,6 +95,19 @@ AC_MSG_RESULT([$os_freebsd]) AM_CONDITIONAL([OS_FREEBSD], [test "x$os_freebsd" = "xyes"]) +# ==================== DETECT LINUX ==================== +AC_MSG_CHECKING([for Linux]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifndef __linux__ +#error "Not Linux" +#endif +]], [[ return 0; ]])], + [os_linux=yes], + [os_linux=no]) +AC_MSG_RESULT([$os_linux]) + +AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"]) + # Set TUN libs based on platform if test "x$os_windows" = "xyes"; then TUN_LIBS="-liphlpapi -lws2_32 -ladvapi32 -lbcrypt -ldbghelp" @@ -197,4 +210,4 @@ Configuration summary: Prefix: ${prefix} Compiler: ${CC} CFLAGS: ${CFLAGS} -" \ No newline at end of file +" diff --git a/tests/Makefile.am b/tests/Makefile.am index 06468b3a..48aa567e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -101,8 +101,7 @@ check_PROGRAMS = \ bench_uasync_timeouts # Linux-only тест: требует root + dummy-интерфейсы + iproute2/netlink -if OS_WINDOWS -else +if OS_LINUX check_PROGRAMS += test_auto_socket_dynamic endif