aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt5
-rw-r--r--OpenAL32/Include/alMain.h4
-rw-r--r--config.h.in9
3 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ed1f898..8e22ad27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,10 +109,13 @@ ELSE()
ENDIF()
ENDIF()
+CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_SQRTF)
CHECK_LIBRARY_EXISTS(m acosf "" HAVE_ACOSF)
-CHECK_LIBRARY_EXISTS(m fesetround "" HAVE_FESETROUND)
+IF(HAVE_FENV_H)
+ CHECK_LIBRARY_EXISTS(m fesetround "" HAVE_FESETROUND)
+ENDIF()
IF(HAVE_SQRTF OR HAVE_ACOSF OR HAVE_FESETROUND)
SET(EXTRA_LIBS m ${EXTRA_LIBS})
ENDIF()
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index af261da6..aadb71ba 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -6,6 +6,10 @@
#include "alu.h"
+#ifdef HAVE_FENV_H
+#include <fenv.h>
+#endif
+
#ifdef _WIN32
#ifndef _WIN32_WINNT
diff --git a/config.h.in b/config.h.in
index f40ca8a9..7b310f3b 100644
--- a/config.h.in
+++ b/config.h.in
@@ -49,4 +49,13 @@
/* Define if we have pthread_np.h */
#cmakedefine HAVE_PTHREAD_NP_H
+/* Define if we have fenv.h */
+#cmakedefine HAVE_FENV_H
+
+/* Define if we have fesetround() */
+#cmakedefine HAVE_FESETROUND
+
+/* Define if we have _controlfp() */
+#cmakedefine HAVE__CONTROLFP
+
#endif