14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomidnl Check for support for D_FORTIFY_SOURCE=2
14a7cd46677cc0052319f2cd84a7b720efa60499Aki TuomiAC_DEFUN([AC_CC_D_FORTIFY_SOURCE],[
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
fdf3e1e28e824a562b895c8c6b5d77d70146d357Josef 'Jeff' Sipek if test $enable_hardening = yes; then
14a7cd46677cc0052319f2cd84a7b720efa60499Aki Tuomi case "$host" in
bc2c2ef8fc5bd1124a794b0de612b1f12321374bAki Tuomi gl_COMPILER_OPTION_IF([-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2], [
ed97ec6905f3d024058a7c3643358a1b807be243Timo Sirainen CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
7e86d6308f3f4226c3ed42052cbeb11749821bc2Aki Tuomi [AC_LANG_PROGRAM()]