summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <[email protected]>2020-01-19 18:33:37 +0900
committerMichele Calgaro <[email protected]>2020-01-31 21:52:22 +0900
commit35cbe8d714c864e1e8f3fbb43fe4b92bda509759 (patch)
treef0850a1346ec484633091d4146f158e265f8b96d
parent1d42e0d84243713d77387215a966412ad9e3bece (diff)
downloadarts-35cbe8d714c864e1e8f3fbb43fe4b92bda509759.tar.gz
arts-35cbe8d714c864e1e8f3fbb43fe4b92bda509759.zip
Port ioctl prototype check to CMake
Signed-off-by: OBATA Akio <[email protected]> (cherry picked from commit 482eea48c70a29b908053263176318f75b96a173)
-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