AC_DEFUN([SXE_STACK_FLAGS], [dnl
## actually this belongs to error-checking stuff
- SXE_CHECK_COMPILER_FLAGS([-fstack-protector],
- [diagflags="${diagflags} -fstack-protector"])
+ SXE_CHECK_COMPILER_FLAGS([-fstack-protector])
+ ## check if ssp is actually working
if test "${sxe_cv_c_flags__fstack_protector}" = "yes"; then
## just check for ssp in this case
AC_CHECK_LIB([ssp], [__stack_chk_guard])
fi
+ ## final thing
+ if test "${sxe_cv_c_flags__fstack_protector}" = "yes" -a \
+ "${ac_cv_lib_ssp___stack_chk_guard}" = "yes"; then
+ ## only if ssp is guaranteed to work
+ diagflags="${diagflags} -fstack-protector"
+ fi
])dnl SXE_STACK_FLAGS
dnl recommended interface macros