summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <[email protected]>2020-01-19 18:33:37 +0900
committerTDE Gitea <[email protected]>2020-01-31 12:50:50 +0000
commit482eea48c70a29b908053263176318f75b96a173 (patch)
treea64bbd235cfabd81cd9891c9afcc8478ab6f9e27
parent9d57e3ae1b71f4f21f56b7a45cb92b64250e2b04 (diff)
downloadarts-482eea48c70a29b908053263176318f75b96a173.tar.gz
arts-482eea48c70a29b908053263176318f75b96a173.zip
Port ioctl prototype check to CMake
Signed-off-by: OBATA Akio <[email protected]>
-rw-r--r--CMakeLists.txt4
-rw-r--r--config.h.cmake4
2 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d224113..5b138b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,7 @@ cmake_minimum_required( VERSION 2.8 )
include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckSymbolExists )
+include( CheckPrototypeDefinition )
include( CheckIncludeFile )
include( CheckLibraryExists )
include( FindPkgConfig )
@@ -114,6 +115,9 @@ check_function_exists( memcpy HAVE_MEMCPY )
check_function_exists( bcopy HAVE_BCOPY )
set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
unset( bak_CMAKE_REQUIRED_LIBRARIES )
+check_prototype_definition( ioctl "int ioctl(int d, int request, ...)" "-1" "unistd.h;sys/ioctl.h" HAVE_IOCTL_INT_INT_DOTS )
+check_prototype_definition( ioctl "int ioctl(int d, unsigned long request, ...)" "-1" "unistd.h;sys/ioctl.h" HAVE_IOCTL_INT_ULONG_DOTS )
+check_prototype_definition( ioctl "int ioctl(int d, unsigned long int request, ...)" "-1" "unistd.h;sys/ioctl.h" HAVE_IOCTL_INT_ULONGINT_DOTS )
##### check for audiofile #######################
diff --git a/config.h.cmake b/config.h.cmake
index efd9b36..f16dda7 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -40,7 +40,9 @@
#cmakedefine HAVE_SYS_SOUNDCARD_H 1
#cmakedefine HAVE_LIBPTHREAD 1
-#define HAVE_IOCTL_INT_ULONGINT_DOTS 3
+#cmakedefine HAVE_IOCTL_INT_INT_DOTS 1
+#cmakedefine HAVE_IOCTL_INT_ULONG_DOTS 2
+#cmakedefine HAVE_IOCTL_INT_ULONGINT_DOTS 3
#cmakedefine HAVE_LIBJACK 1
#cmakedefine HAVE_LIBSNDIO 1