aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCharles Karney <charles@karney.com>2018-03-17 18:32:26 -0400
committerCharles Karney <charles@karney.com>2018-03-17 18:32:26 -0400
commitca880f497aa9eeff9eccea7ab0168a4fed73d411 (patch)
treeab83bd97591e637c394bbffa889b6231f111ba31 /configure.ac
parentdb3e0ae30446498cec7e7f931d9be2ed65547691 (diff)
downloadPROJ-ca880f497aa9eeff9eccea7ab0168a4fed73d411.tar.gz
PROJ-ca880f497aa9eeff9eccea7ab0168a4fed73d411.zip
Patch 1.49.3 for geodesic package.
Set flags for Intel compiler to prevent incorrect optimization of arithmetic expressions #826. Guard against nans in sincosdx #834. Issue #831 is not addressed here (need more information...).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 898d8b3b..9e4fa3d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,12 @@ CFLAGS="$save_CFLAGS"
dnl We check for headers
AC_HEADER_STDC
+dnl Check flag for accurate arithmetic with Intel compiler. This is
+dnl needed to stop the compiler from ignoring parentheses in expressions
+dnl like (a + b) + c and from simplifying 0.0 + x to x (which is wrong if
+dnl x = -0.0).
+AX_CHECK_COMPILE_FLAG([-Werror -fprotect-parens -fsigned-zeros],
+ [CFLAGS="$CFLAGS -fprotect-parens -fsigned-zeros"])
dnl Check for C99 math functions
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Werror"