aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/aclocal.m4
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-01-15 17:32:19 +0100
committerBjörn-Egil Dahlberg <[email protected]>2013-01-15 17:32:19 +0100
commitdc60870eb02edb6b0163a77cc9ca523d692bc385 (patch)
treed3c018b4f259c74c85a2cf9bb33d7ca42002e27a /lib/erl_interface/aclocal.m4
parentfa6771380931c7ded0ad4d36e6cd2554bb932dfc (diff)
downloadotp-dc60870eb02edb6b0163a77cc9ca523d692bc385.tar.gz
otp-dc60870eb02edb6b0163a77cc9ca523d692bc385.tar.bz2
otp-dc60870eb02edb6b0163a77cc9ca523d692bc385.zip
Fix LM_TRY_ENABLE_CFLAG to use correct environment
LM_TRY_ENABLE_CFLAG takes which environment variable should be updated but only CFLAGS was updated. Though CFLAGS is the normally the intended variable, others may be used. For instance CXXFLAGS.
Diffstat (limited to 'lib/erl_interface/aclocal.m4')
-rw-r--r--lib/erl_interface/aclocal.m47
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/erl_interface/aclocal.m4 b/lib/erl_interface/aclocal.m4
index 5d555a5123..918e30a886 100644
--- a/lib/erl_interface/aclocal.m4
+++ b/lib/erl_interface/aclocal.m4
@@ -1861,17 +1861,16 @@ dnl Usage example LM_TRY_ENABLE_CFLAG([-Werror=return-type], [CFLAGS])
dnl
dnl
AC_DEFUN([LM_TRY_ENABLE_CFLAG], [
- AC_MSG_CHECKING([if we can add $1 to CFLAGS])
+ AC_MSG_CHECKING([if we can add $1 to $2 (via CFLAGS)])
saved_CFLAGS=$CFLAGS;
- CFLAGS="$1 $CFLAGS";
+ CFLAGS="$1 $$2";
AC_TRY_COMPILE([],[return 0;],can_enable_flag=true,can_enable_flag=false)
CFLAGS=$saved_CFLAGS;
if test "X$can_enable_flag" = "Xtrue"; then
AC_MSG_RESULT([yes])
- AS_VAR_SET($2, "$1 $CFLAGS")
+ AS_VAR_SET($2, "$1 $$2")
else
AC_MSG_RESULT([no])
- AS_VAR_SET($2, "$CFLAGS")
fi
])