summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-01-10 18:06:22 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-01-10 18:12:20 +0000
commit0e59dc9d63ad7391863c4e81d06bbfe556984890 (patch)
treec6f2c6a8ffb69066c49ce63b28649f1832e5cd59 /m4
parent371dfac9776b66cb04c449f4f3e5b5a6ddfa4a5e (diff)
downloadtelepathy-glib-0e59dc9d63ad7391863c4e81d06bbfe556984890.tar.gz
Add TP_ADD_COMPILER_FLAG, analogous to TP_ADD_LINKER_FLAG
Diffstat (limited to 'm4')
-rw-r--r--m4/tp-compiler-flag.m47
1 files changed, 7 insertions, 0 deletions
diff --git a/m4/tp-compiler-flag.m4 b/m4/tp-compiler-flag.m4
index fc05e9e17..06deaba05 100644
--- a/m4/tp-compiler-flag.m4
+++ b/m4/tp-compiler-flag.m4
@@ -34,3 +34,10 @@ AC_DEFUN([TP_COMPILER_FLAG],
fi
AC_MSG_RESULT([$flag_ok])
])
+
+dnl TP_ADD_COMPILER_FLAG(VARIABLE, CFLAGS)
+dnl Append CFLAGS to VARIABLE if the compiler supports them.
+AC_DEFUN([TP_ADD_COMPILER_FLAG],
+[
+ TP_COMPILER_FLAG([$2], [$1="[$]$1 $2"])
+])