summary refs log tree commit diff
path: root/m4/check-hardening-options.m4
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-03-21 17:14:22 -0400
committerJune McEnroe <june@causal.agency>2022-03-21 17:14:22 -0400
commit36e3e016edf8b8068aa7c5e9f188159ee4d4e2fb (patch)
treeabf6a8eda1231cf996ced611c8840384c0b03b81 /m4/check-hardening-options.m4
parentdoc: Note OpenSSL 3.0.0 compatibility in README (diff)
parentImport LibreSSL 3.5.1 (diff)
downloadlibretls-3.5.1.tar.gz
libretls-3.5.1.zip
Merge LibreSSL 3.5.1 3.5.1
Diffstat (limited to '')
-rw-r--r--m4/check-hardening-options.m426
1 files changed, 10 insertions, 16 deletions
diff --git a/m4/check-hardening-options.m4 b/m4/check-hardening-options.m4
index c8ab12e..4b5784b 100644
--- a/m4/check-hardening-options.m4
+++ b/m4/check-hardening-options.m4
@@ -4,16 +4,13 @@ AC_DEFUN([CHECK_CFLAG], [
 	 AC_MSG_CHECKING([if $saved_CC supports "$1"])
 	 old_cflags="$CFLAGS"
 	 CFLAGS="$1 -Wall -Werror"
-	 AC_TRY_LINK([
-		      #include <stdio.h>
-		      ],
-		     [printf("Hello")],
-		     AC_MSG_RESULT([yes])
+	 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("Hello")]])],
+		     [AC_MSG_RESULT([yes])
 		     CFLAGS=$old_cflags
-		     HARDEN_CFLAGS="$HARDEN_CFLAGS $1",
-		     AC_MSG_RESULT([no])
+		     HARDEN_CFLAGS="$HARDEN_CFLAGS $1"],
+		     [AC_MSG_RESULT([no])
 		     CFLAGS=$old_cflags
-		     [$2])
+		     [$2]])
 ])
 
 AC_DEFUN([CHECK_LDFLAG], [
@@ -21,16 +18,13 @@ AC_DEFUN([CHECK_LDFLAG], [
 	 AC_MSG_CHECKING([if $saved_LD supports "$1"])
 	 old_ldflags="$LDFLAGS"
 	 LDFLAGS="$1 -Wall -Werror"
-	 AC_TRY_LINK([
-		      #include <stdio.h>
-		      ],
-		     [printf("Hello")],
-		     AC_MSG_RESULT([yes])
+	 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[printf("Hello")]])],
+		     [AC_MSG_RESULT([yes])
 		     LDFLAGS=$old_ldflags
-		     HARDEN_LDFLAGS="$HARDEN_LDFLAGS $1",
-		     AC_MSG_RESULT([no])
+		     HARDEN_LDFLAGS="$HARDEN_LDFLAGS $1"],
+		     [AC_MSG_RESULT([no])
 		     LDFLAGS=$old_ldflags
-		     [$2])
+		     [$2]])
 ])
 
 AC_DEFUN([DISABLE_AS_EXECUTABLE_STACK], [
g?id=428cad12d33cc95d313f7c0165e60f22177cca66&follow=1'>Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe