diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2008-07-18 14:57:36 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2008-07-18 14:57:36 +0000 |
commit | d1e80dc431815df3ac6eeed654eeccaf8d6beea7 (patch) | |
tree | cc8b20e9558f81920c490fe4ec1384c8b7a0662b /m4/cflags.m4 | |
download | libmpeg2-tarball-master.tar.gz |
libmpeg2-0.5.1HEADlibmpeg2-0.5.1master
Diffstat (limited to 'm4/cflags.m4')
-rw-r--r-- | m4/cflags.m4 | 14 |
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]) |