add -fno-exceptions to CXXFLAGS if compiler supports it

This commit is contained in:
Andrzej Rybczak
2009-09-21 17:37:06 +02:00
parent 70910b77ed
commit 0a1d2e37ae

View File

@@ -28,6 +28,21 @@ if test "$clock" = "yes"; then
AC_DEFINE([ENABLE_CLOCK], [1], [enables clock screen]) AC_DEFINE([ENABLE_CLOCK], [1], [enables clock screen])
fi fi
dnl =====================================
dnl = checking for -fno-exceptions flag =
dnl =====================================
AC_MSG_CHECKING([whether compiler supports -fno-exceptions])
old_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-fno-exceptions"
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ ]]),
AC_MSG_RESULT([yes])
no_exceptions="-fno-exceptions"
,
AC_MSG_RESULT([no])
)
CXXFLAGS="$old_CXXFLAGS $no_exceptions"
dnl ==================================== dnl ====================================
dnl = checking for win32 related stuff = dnl = checking for win32 related stuff =
dnl ==================================== dnl ====================================