diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-10-09 22:45:43 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-10-09 22:45:43 +0000 |
commit | c8d9c22613a80a77150f65ac6bdc753d5a1a3e68 (patch) | |
tree | c3d37d9dd34a6f58a04755e60886bd684273f259 | |
parent | 1cc1c3615786c2f871044eaa471c7554bb2df3d2 (diff) |
Add compile time buffer checks (FORTIFY SOURCE)
-rw-r--r-- | acinclude.m4 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 43b2d8b2..0d41c225 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -290,6 +290,7 @@ AC_DEFUN([AC_PATH_USB], [ ]) AC_DEFUN([AC_ARG_BLUEZ], [ + fortify_enable=yes debug_enable=no pie_enable=no dbus_enable=${dbus_found} @@ -307,6 +308,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ bcm203x_enable=no bluepin_enable=yes + AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [ + fortify_enable=${enableval} + ]) + AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [ debug_enable=${enableval} ]) @@ -388,6 +393,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ bluepin_enable=${enableval} ]) + if (test "${fortify_enable}" = "yes"); then + CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" + fi + if (test "${debug_enable}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then CFLAGS="$CFLAGS -g" fi |