From f8285ecbb874d9bd167a38640b3d264b3569a427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 25 Dec 2006 18:45:15 +0000 Subject: Add AC_TRY_LDFLAGS macro similarly to AC_TRY_CFLAGS. CVS patchset: 8453 CVS date: 2006/12/25 18:45:15 --- m4/_xine.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'm4') 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 -- cgit v1.2.3