summaryrefslogtreecommitdiff
path: root/m4/cflags.m4
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2008-07-18 14:57:36 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2008-07-18 14:57:36 +0000
commitd1e80dc431815df3ac6eeed654eeccaf8d6beea7 (patch)
treecc8b20e9558f81920c490fe4ec1384c8b7a0662b /m4/cflags.m4
downloadlibmpeg2-tarball-master.tar.gz
Diffstat (limited to 'm4/cflags.m4')
-rw-r--r--m4/cflags.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/cflags.m4 b/m4/cflags.m4
new file mode 100644
index 0000000..87d5143
--- /dev/null
+++ b/m4/cflags.m4
@@ -0,0 +1,14 @@
+dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
+dnl check if $CC supports a given set of cflags
+AC_DEFUN([AC_TRY_CFLAGS],
+ [AC_MSG_CHECKING([if $CC supports $1 flags])
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$1"
+ AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
+ CFLAGS="$SAVE_CFLAGS"
+ AC_MSG_RESULT([$ac_cv_try_cflags_ok])
+ if test x"$ac_cv_try_cflags_ok" = x"yes"; then
+ ifelse([$2],[],[:],[$2])
+ else
+ ifelse([$3],[],[:],[$3])
+ fi])