summaryrefslogtreecommitdiff
path: root/m4/ax_append_compile_flags.m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-06-17 20:14:58 -0400
committerPeter Simons <simons@cryp.to>2012-06-18 19:37:14 +0200
commit7d5e9315f7b93843f7d65699eebfec742323a483 (patch)
tree96866e0acaf780f192bdf8d4d0116f39f62121d8 /m4/ax_append_compile_flags.m4
parentebd0d60970ec98ff1c0d50a81fbc354ab1034417 (diff)
downloadautoconf-archive-7d5e9315f7b93843f7d65699eebfec742323a483.tar.gz
AC_REQUIRE AX_APPEND_FLAG when appropriate.
A bunch of m4 files use AX_APPEND_FLAG, but don't AC_REQUIRE, which can lead to runtime errors instead of compile time errors when the macro is missing.
Diffstat (limited to 'm4/ax_append_compile_flags.m4')
-rw-r--r--m4/ax_append_compile_flags.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
index 4254170..1f8e708 100644
--- a/m4/ax_append_compile_flags.m4
+++ b/m4/ax_append_compile_flags.m4
@@ -54,10 +54,12 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 2
+#serial 3
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
-[for flag in $1; do
+[AC_REQUIRE([AX_CHECK_COMPILE_FLAG])
+AC_REQUIRE([AX_APPEND_FLAG])
+for flag in $1; do
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
done
])dnl AX_APPEND_COMPILE_FLAGS