diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 80dffb87..1b33e28c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -267,6 +267,40 @@ fi | |||
267 | AC_SUBST(GLADE_CFLAGS) | 267 | AC_SUBST(GLADE_CFLAGS) |
268 | AC_SUBST(GLADE_LIBS) | 268 | AC_SUBST(GLADE_LIBS) |
269 | 269 | ||
270 | |||
271 | # Adam shostack suggests the following for Windows: | ||
272 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all | ||
273 | AC_ARG_ENABLE(gcc-hardening, | ||
274 | AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks), | ||
275 | [if test x$enableval = xyes; then | ||
276 | CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all" | ||
277 | CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector" | ||
278 | CFLAGS="$CFLAGS --param ssp-buffer-size=1" | ||
279 | LDFLAGS="$LDFLAGS -pie" | ||
280 | fi]) | ||
281 | |||
282 | |||
283 | # Linker hardening options | ||
284 | # Currently these options are ELF specific - you can't use this with MacOSX | ||
285 | AC_ARG_ENABLE(linker-hardening, | ||
286 | AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups), | ||
287 | [if test x$enableval = xyes; then | ||
288 | LDFLAGS="$LDFLAGS -z relro -z now" | ||
289 | fi]) | ||
290 | |||
291 | |||
292 | extra_logging=GNUNET_NO | ||
293 | AC_ARG_ENABLE([logging], | ||
294 | AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]), | ||
295 | [AS_IF([test "x$enableval" = "xyes"], [], | ||
296 | [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])], | ||
297 | [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES] | ||
298 | [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)]) | ||
299 | ], []) | ||
300 | AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise]) | ||
301 | |||
302 | |||
303 | |||
270 | # test for GNUnet core | 304 | # test for GNUnet core |
271 | gnunet=0 | 305 | gnunet=0 |
272 | lookin=${prefix} | 306 | lookin=${prefix} |