summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-03-12 10:59:55 -0700
committerChase Douglas <chase.douglas@canonical.com>2012-03-12 15:17:37 -0700
commita1fec11ca3de6774fb70052f5f5ab167bf658690 (patch)
tree46d1a90eb4a6992e0297a0566bc655f0f6bbfade
parenta02a9048a1b831d13d32413e2af429ac8d7a5c2b (diff)
Fix cflag test compiler message and cache ids
When the language is C++, the flag checking message references $CC instead of $CXX. The cache id is also xorg_cv_cc_* instead of xorg_cv_cxx_*. This change fixes both issues. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Gaetan Nadon<memsize@videotron.ca>
-rw-r--r--xorg-macros.m4.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 099825f..863513e 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1503,9 +1503,13 @@ AC_LANG_CASE(
[C], [
AC_REQUIRE([AC_PROG_CC_C99])
define([PREFIX], [C])
+ define([CACHE_PREFIX], [cc])
+ define([COMPILER], [$CC])
],
[C++], [
define([PREFIX], [CXX])
+ define([CACHE_PREFIX], [cxx])
+ define([COMPILER], [$CXX])
]
)
@@ -1550,8 +1554,8 @@ m4_foreach([flag], m4_cdr($@), [
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
- AC_MSG_CHECKING([if $CC supports ]flag[])
- cacheid=AS_TR_SH([xorg_cv_cc_flag_]flag[])
+ AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
+ cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
AC_CACHE_VAL($cacheid,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
[eval $cacheid=yes],