Skip to content

Commit de69f18

Browse files
author
Erlend E. Aasland
committed
Use AS_VAR_APPEND in PY_CHECK_CC_WARNING
1 parent 77f4cad commit de69f18

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

configure

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7091,7 +7091,7 @@ if ${ac_cv_enable_extra_warning+:} false; then :
70917091
else
70927092

70937093
py_cflags=$CFLAGS
7094-
CFLAGS="$CFLAGS -Wextra -Werror"
7094+
as_fn_append CFLAGS "-Wextra -Werror"
70957095
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70967096
/* end confdefs.h. */
70977097

@@ -7202,7 +7202,7 @@ if ${ac_cv_disable_unused_result_warning+:} false; then :
72027202
else
72037203

72047204
py_cflags=$CFLAGS
7205-
CFLAGS="$CFLAGS -Wunused-result -Werror"
7205+
as_fn_append CFLAGS "-Wunused-result -Werror"
72067206
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72077207
/* end confdefs.h. */
72087208

@@ -7244,7 +7244,7 @@ if ${ac_cv_disable_unused_parameter_warning+:} false; then :
72447244
else
72457245

72467246
py_cflags=$CFLAGS
7247-
CFLAGS="$CFLAGS -Wunused-parameter -Werror"
7247+
as_fn_append CFLAGS "-Wunused-parameter -Werror"
72487248
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72497249
/* end confdefs.h. */
72507250

@@ -7282,7 +7282,7 @@ if ${ac_cv_disable_missing_field_initializers_warning+:} false; then :
72827282
else
72837283

72847284
py_cflags=$CFLAGS
7285-
CFLAGS="$CFLAGS -Wmissing-field-initializers -Werror"
7285+
as_fn_append CFLAGS "-Wmissing-field-initializers -Werror"
72867286
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72877287
/* end confdefs.h. */
72887288

@@ -7320,7 +7320,7 @@ if ${ac_cv_enable_sign_compare_warning+:} false; then :
73207320
else
73217321

73227322
py_cflags=$CFLAGS
7323-
CFLAGS="$CFLAGS -Wsign-compare -Werror"
7323+
as_fn_append CFLAGS "-Wsign-compare -Werror"
73247324
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73257325
/* end confdefs.h. */
73267326

@@ -7358,7 +7358,7 @@ if ${ac_cv_enable_unreachable_code_warning+:} false; then :
73587358
else
73597359

73607360
py_cflags=$CFLAGS
7361-
CFLAGS="$CFLAGS -Wunreachable-code -Werror"
7361+
as_fn_append CFLAGS "-Wunreachable-code -Werror"
73627362
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73637363
/* end confdefs.h. */
73647364

@@ -7408,7 +7408,7 @@ if ${ac_cv_enable_strict_prototypes_warning+:} false; then :
74087408
else
74097409

74107410
py_cflags=$CFLAGS
7411-
CFLAGS="$CFLAGS -Wstrict-prototypes -Werror"
7411+
as_fn_append CFLAGS "-Wstrict-prototypes -Werror"
74127412
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74137413
/* end confdefs.h. */
74147414

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ AC_DEFUN([PY_CHECK_CC_WARNING], [
16441644
AS_VAR_PUSHDEF([py_var], [ac_cv_$1_]m4_normalize($2)[_warning])
16451645
AC_CACHE_CHECK(m4_ifblank([$3], [if we can $1 $CC $2 warning], [$3]), [py_var], [
16461646
AS_VAR_COPY([py_cflags], [CFLAGS])
1647-
AS_VAR_SET([CFLAGS], ["$CFLAGS -W$2 -Werror"])
1647+
AS_VAR_APPEND([CFLAGS], ["-W$2 -Werror"])
16481648
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
16491649
[AS_VAR_SET([py_var], [yes])],
16501650
[AS_VAR_SET([py_var], [no])])

0 commit comments

Comments
 (0)