summaryrefslogtreecommitdiff
path: root/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
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')
-rw-r--r--m4/ax_append_compile_flags.m46
-rw-r--r--m4/ax_append_link_flags.m46
-rw-r--r--m4/ax_cflags_force_c89.m43
-rw-r--r--m4/ax_cflags_no_writable_strings.m43
-rw-r--r--m4/ax_cflags_strict_prototypes.m43
-rw-r--r--m4/ax_cflags_warn_all.m43
6 files changed, 16 insertions, 8 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
diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4
index 4fc4337..48cbd4b 100644
--- a/m4/ax_append_link_flags.m4
+++ b/m4/ax_append_link_flags.m4
@@ -52,10 +52,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_LINK_FLAGS],
-[for flag in $1; do
+[AC_REQUIRE([AX_CHECK_LINK_FLAG])
+AC_REQUIRE([AX_APPEND_FLAG])
+for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3])
done
])dnl AX_APPEND_LINK_FLAGS
diff --git a/m4/ax_cflags_force_c89.m4 b/m4/ax_cflags_force_c89.m4
index 993b965..19ada7f 100644
--- a/m4/ax_cflags_force_c89.m4
+++ b/m4/ax_cflags_force_c89.m4
@@ -55,7 +55,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 7
+#serial 8
AC_DEFUN([AX_CFLAGS_FORCE_C89],[dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
@@ -83,6 +83,7 @@ done
AC_LANG_RESTORE
])
AS_VAR_POPDEF([FLAGS])dnl
+AC_REQUIRE([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
diff --git a/m4/ax_cflags_no_writable_strings.m4 b/m4/ax_cflags_no_writable_strings.m4
index d19381f..2fb6f12 100644
--- a/m4/ax_cflags_no_writable_strings.m4
+++ b/m4/ax_cflags_no_writable_strings.m4
@@ -56,7 +56,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 12
+#serial 13
AC_DEFUN([AX_FLAGS_NO_WRITABLE_STRINGS],[dnl
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
@@ -99,6 +99,7 @@ esac
FLAGS="$ac_save_[]FLAGS"
])
AS_VAR_POPDEF([FLAGS])dnl
+AC_REQUIRE([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
diff --git a/m4/ax_cflags_strict_prototypes.m4 b/m4/ax_cflags_strict_prototypes.m4
index 755491d..2ac34be 100644
--- a/m4/ax_cflags_strict_prototypes.m4
+++ b/m4/ax_cflags_strict_prototypes.m4
@@ -58,7 +58,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 11
+#serial 12
AC_DEFUN([AX_FLAGS_STRICT_PROTOTYPES],[dnl
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
@@ -96,6 +96,7 @@ esac
FLAGS="$ac_save_[]FLAGS"
])
AS_VAR_POPDEF([FLAGS])dnl
+AC_REQUIRE([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4
index c22e37f..0fa3e18 100644
--- a/m4/ax_cflags_warn_all.m4
+++ b/m4/ax_cflags_warn_all.m4
@@ -58,7 +58,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 13
+#serial 14
AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
@@ -84,6 +84,7 @@ done
FLAGS="$ac_save_[]FLAGS"
])
AS_VAR_POPDEF([FLAGS])dnl
+AC_REQUIRE([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;