diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/_xine.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 60baed8c1..8ff2d67ca 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -175,6 +175,20 @@ AC_DEFUN([AC_TRY_CFLAGS], ifelse([$3],[],[:],[$3]) fi]) +dnl AC_TRY_LDFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) +dnl check if $CC supports a given set of ldflags +AC_DEFUN([AC_TRY_LDFLAGS], + [AC_MSG_CHECKING([if $CC supports $1 flags]) + SAVE_LDFLAGS="$LDFLAGS" + LDFLAGS="$1" + AC_TRY_LINK([],[],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) + LDFLAGS="$SAVE_LDFLAGS" + AC_MSG_RESULT([$ac_cv_try_ldflags_ok]) + if test x"$ac_cv_try_ldflags_ok" = x"yes"; then + ifelse([$2],[],[:],[$2]) + else + ifelse([$3],[],[:],[$3]) + fi]) dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY) dnl generate a default inttypes.h if the header file does not exist already |