parent
3df5a6e2b6
commit
d085f76c7f
|
@ -564,8 +564,13 @@ if (NOT WIN32 AND NOT APPLE)
|
|||
CHECK_INCLUDE_FILE(linux/input.h LINUX_INPUT_FOUND)
|
||||
CHECK_INCLUDE_FILE(linux/kd.h LINUX_KD_FOUND)
|
||||
if (SYS_IO_FOUND)
|
||||
list(APPEND DEPENDENCIES_DEFINES HAVE_SYS_IO)
|
||||
message(STATUS "PC speaker output: outb()")
|
||||
try_compile(HAVE_INOUTB ${CMAKE_BINARY_DIR}/check SOURCES ${CMAKE_SOURCE_DIR}/src/check/check_sysIO.c)
|
||||
if (HAVE_INOUTB)
|
||||
list(APPEND DEPENDENCIES_DEFINES HAVE_SYS_IO)
|
||||
message(STATUS "PC speaker output: outb()")
|
||||
else()
|
||||
message(STATUS "sys/io.h found but inb()/outb() not present")
|
||||
endif()
|
||||
endif()
|
||||
if (LINUX_INPUT_FOUND)
|
||||
list(APPEND DEPENDENCIES_DEFINES HAVE_LINUX_INPUT)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#include <sys/io.h>
|
||||
|
||||
int main(int, char**) {
|
||||
inb(0x61);
|
||||
outb(0x00,0x61);
|
||||
}
|
Loading…
Reference in New Issue