diff mbox series

[v1,2/6] configure: move ODP_CHECK_CFLAG to separate file

Message ID 1517403609-12603-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/6] configure: set ODP_ABI_COMPAT before descending into platform | expand

Commit Message

Github ODP bot Jan. 31, 2018, 1 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 440 (lumag:build-fixes)
 ** https://github.com/Linaro/odp/pull/440
 ** Patch: https://github.com/Linaro/odp/pull/440.patch
 ** Base sha: b95ccd3db6eeb7358a877541747e06354429acdd
 ** Merge commit sha: 6f20299f993632a4dda987a31b37160d80c25279
 **/
 configure.ac         |  8 --------
 m4/odp_check_flag.m4 | 12 ++++++++++++
 2 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 m4/odp_check_flag.m4
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 1edc01f4e..03a233d17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,14 +315,6 @@  AC_SUBST(ODP_DEPRECATED_API)
 ##########################################################################
 ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror"
 
-dnl Use -Werror in the checks below since Clang emits a warning instead of
-dnl an error when it encounters an unknown warning option.
-AC_DEFUN([ODP_CHECK_CFLAG],
-	 [AX_CHECK_COMPILE_FLAG([$1],
-				[ODP_CFLAGS="$ODP_CFLAGS $1"],
-				[], [-W -Wall -Werror],
-				[AC_LANG_SOURCE([int main(void)
-						{return 0;}])])])
 ODP_CHECK_CFLAG([-Wstrict-prototypes])
 ODP_CHECK_CFLAG([-Wmissing-prototypes])
 ODP_CHECK_CFLAG([-Wmissing-declarations])
diff --git a/m4/odp_check_flag.m4 b/m4/odp_check_flag.m4
new file mode 100644
index 000000000..e3c8ef714
--- /dev/null
+++ b/m4/odp_check_flag.m4
@@ -0,0 +1,12 @@ 
+dnl Use -Werror in the checks below since Clang emits a warning instead of
+dnl an error when it encounters an unknown warning option.
+
+# ODP_CHECK_CFLAG(FLAG)
+# ---------------------
+# Add FLAG to ODP_CFLAGS if compiler supports that option
+AC_DEFUN([ODP_CHECK_CFLAG],
+	 [AX_CHECK_COMPILE_FLAG([$1],
+				[ODP_CFLAGS="$ODP_CFLAGS $1"],
+				[], [-W -Wall -Werror],
+				[AC_LANG_SOURCE([int main(void)
+						{return 0;}])])])