diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-12-25 18:45:15 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2006-12-25 18:45:15 +0000 |
commit | f8285ecbb874d9bd167a38640b3d264b3569a427 (patch) | |
tree | 939178573bd7d881f26b9c39ba5e806c5f046e4a /m4 | |
parent | ef9e52f5031dc0042f30d368f707926aeaa2b4a9 (diff) | |
download | xine-lib-f8285ecbb874d9bd167a38640b3d264b3569a427.tar.gz xine-lib-f8285ecbb874d9bd167a38640b3d264b3569a427.tar.bz2 |
Add AC_TRY_LDFLAGS macro similarly to AC_TRY_CFLAGS.
CVS patchset: 8453
CVS date: 2006/12/25 18:45:15
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 |