update autotool macro deprecations

fix latest round of autotool complaints
This commit is contained in:
Brent Cook 2022-02-27 06:05:41 -06:00
parent 2336a535c6
commit 56bf8d4f41
3 changed files with 12 additions and 19 deletions

View File

@ -12,7 +12,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT([libressl], m4_esyscmd([tr -d '\n' < VERSION]))
AC_INIT([libressl], m4_esyscmd(tr -d '\n' < VERSION))
AC_SUBST([LIBCRYPTO_VERSION], m4_esyscmd([tr -d '\n' < crypto/VERSION]))
AC_SUBST([LIBSSL_VERSION], m4_esyscmd([tr -d '\n' < ssl/VERSION]))
AC_SUBST([LIBTLS_VERSION], m4_esyscmd([tr -d '\n' < tls/VERSION]))
@ -27,7 +27,6 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
USER_CFLAGS="$CFLAGS"
AC_PROG_CC([cc gcc])
AC_PROG_CC_STDC
AM_PROG_CC_C_O
LT_INIT([pic-only])

View File

@ -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], [

View File

@ -1,5 +1,5 @@
#! /bin/sh
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by