commit a7197f579c25eab5d0841a83f4a32a3856a7584e from: Florian Westphal date: Tue Aug 30 20:59:30 2005 UTC check if gcc supports -fstack-protector commit - 30c11b23133e98e95303423d44193e4835a3c676 commit + a7197f579c25eab5d0841a83f4a32a3856a7584e blob - 9bda36e6cb7af236a433400dd10f0aa37dadbed5 blob + 204d4529817d792ae13fade6f4b0e7b06a0ec476 --- configure.in +++ configure.in @@ -8,7 +8,7 @@ # (at your option) any later version. # Please read the file COPYING, README and AUTHORS for more information. # -# $Id: configure.in,v 1.115 2005/07/22 21:02:22 alex Exp $ +# $Id: configure.in,v 1.116 2005/08/30 20:59:30 fw Exp $ # # -- Initialisation -- @@ -60,6 +60,25 @@ if test "$GCC" = "yes"; then # We are using the GNU C compiler. Good! CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes" fi + + +AC_DEFUN([GCC_STACK_PROTECT_CC],[ + ssp_cc=yes + if test "X$CC" != "X"; then + AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector]) + ssp_old_cflags="$CFLAGS" + CFLAGS="$CFLAGS -fstack-protector" + AC_TRY_COMPILE(,,, ssp_cc=no) + echo $ssp_cc + if test "X$ssp_cc" = "Xno"; then + CFLAGS="$ssp_old_cflags" + else + AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) + fi + fi +]) + +GCC_STACK_PROTECT_CC case "$target_os" in hpux*) @@ -105,6 +124,7 @@ AC_TRY_COMPILE([ AC_TYPE_SIGNAL AC_TYPE_SIZE_T + # -- Libraries -- AC_CHECK_LIB(UTIL,memmove)