build: AC_SUBST for AM_CFLAGS (#3551)

Using autoconf 2.71 and automake 1.16.5 the CFLAGS from
CC_CHECK_CFLAGS_APPEND does not get set in the Makefile without AC_SUBST
causing compilation to fail on Solaris due to missing -std=gnu89
This commit is contained in:
Claes Nästén 2022-03-15 13:51:00 +01:00 committed by GitHub
parent 442e471cfc
commit 739e441d4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,8 @@ AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
[AM_CFLAGS="$AM_CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3])
AC_SUBST([AM_CFLAGS])
])
dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])