diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-11 14:07:59 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-11 14:07:59 +0000 |
commit | 9b89b7f2c0dcfa76f0cb6f17dd1d56dd299fa32e (patch) | |
tree | 83414913875933ae71f2c5ed03ff13d6d2f93c22 /configure.ac | |
parent | 173ee40cbcdf685d841dd9827199f9eba7364395 (diff) |
check for compiler support for -fno-strict-overflow before using it (tested with Debian's gcc 4.3, 4.1 and 3.4)
(closes issue #12179)
Reported by: Netview
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107408 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 49cd0ff0d..1662fbe4a 100644 --- a/configure.ac +++ b/configure.ac @@ -354,6 +354,16 @@ else fi AC_SUBST(AST_DECLARATION_AFTER_STATEMENT) +AC_MSG_CHECKING(for -fno-strict-overflow) +if $(${CC} -O2 -fno-strict-overflow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then + AC_MSG_RESULT(yes) + AST_NO_STRICT_OVERFLOW=-fno-strict-overflow +else + AC_MSG_RESULT(no) + AST_NO_STRICT_OVERFLOW= +fi +AC_SUBST(AST_NO_STRICT_OVERFLOW) + AC_MSG_CHECKING(for res_ninit) AC_LINK_IFELSE( AC_LANG_PROGRAM([#include <resolv.h>], |