|
0
|
1 |
dnl TRY_CXX_FLAG(FLAG,[ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
|
|
|
2 |
AC_DEFUN(TRY_CXX_FLAG,
|
|
|
3 |
[echo >conftest.cc
|
|
|
4 |
if ${CXX-g++} ${CXXFLAGS} -c [$1] conftest.cc >/dev/null 2>&1; then
|
|
|
5 |
ifelse([$2], , :, [rm -f conftest*
|
|
|
6 |
$2])
|
|
|
7 |
else
|
|
|
8 |
ifelse([$3], , :, [rm -f conftest*
|
|
|
9 |
$3])
|
|
|
10 |
fi
|
|
|
11 |
rm -f conftest*])
|
|
|
12 |
|
|
|
13 |
AC_DEFUN(CXX_NO_RTTI,
|
|
|
14 |
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-rtti,
|
|
|
15 |
local_cv_flag_NO_RTTI,
|
|
|
16 |
TRY_CXX_FLAG(-fno-rtti,
|
|
|
17 |
local_cv_flag_NO_RTTI=yes,
|
|
|
18 |
local_cv_flag_NO_RTTI=no))
|
|
|
19 |
test "$local_cv_flag_NO_RTTI" = yes && CXXFLAGS="$CXXFLAGS -fno-rtti"
|
|
|
20 |
])
|
|
|
21 |
|
|
|
22 |
AC_DEFUN(CXX_NO_EXCEPTIONS,
|
|
|
23 |
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-exceptions,
|
|
|
24 |
local_cv_flag_NO_EXCEPTIONS,
|
|
|
25 |
TRY_CXX_FLAG(-fno-exceptions,
|
|
|
26 |
local_cv_flag_NO_EXCEPTIONS=yes,
|
|
|
27 |
local_cv_flag_NO_EXCEPTIONS=no))
|
|
|
28 |
test "$local_cv_flag_NO_EXCEPTIONS" = yes && CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
|
|
29 |
])
|
|
|
30 |
|