|
|
|
@ -55,15 +55,6 @@ AC_INIT(configure.in)
|
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
|
AC_CHECK_FUNCS([gettimeofday memset strcasecmp strchr strdup strerror strncasecmp strtol strtoul])
|
|
|
|
|
|
|
|
|
|
#Enable support for gcc compile time security options. There is no great way to do detection of valid cflags that I have found
|
|
|
|
|
#AX_CFLAGS_GCC_OPTION don't seem to do a better job than the code below and are a pain because of extra m4 files etc.
|
|
|
|
|
#These flags seem to be supported on CentOS 5+, Ubuntu 8.04+, and FedoreCore 11+
|
|
|
|
|
#Options are taken from https://wiki.ubuntu.com/CompilerFlags
|
|
|
|
|
AC_ARG_ENABLE(gccprotect,
|
|
|
|
|
[ --enable-gccprotect Detect and use gcc hardening options],
|
|
|
|
|
[ enable_gccprotect=yes
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
#check for os
|
|
|
|
|
AC_MSG_CHECKING([host os])
|
|
|
|
|
|
|
|
|
@ -93,6 +84,15 @@ AC_INIT(configure.in)
|
|
|
|
|
esac
|
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
|
|
|
|
|
|
#Enable support for gcc compile time security options. There is no great way to do detection of valid cflags that I have found
|
|
|
|
|
#AX_CFLAGS_GCC_OPTION don't seem to do a better job than the code below and are a pain because of extra m4 files etc.
|
|
|
|
|
#These flags seem to be supported on CentOS 5+, Ubuntu 8.04+, and FedoreCore 11+
|
|
|
|
|
#Options are taken from https://wiki.ubuntu.com/CompilerFlags
|
|
|
|
|
AC_ARG_ENABLE(gccprotect,
|
|
|
|
|
[ --enable-gccprotect Detect and use gcc hardening options],
|
|
|
|
|
[ enable_gccprotect=yes
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
if test "$enable_gccprotect" = "yes"; then
|
|
|
|
|
#buffer overflow protection
|
|
|
|
|
AC_MSG_CHECKING(for -fstack-protector)
|
|
|
|
|