build: Purge CAIRO_CC_TRY_LINK_FLAG.

Use CAIRO_CC_TRY_FLAG instead in the one place where we used
CAIRO_CC_TRY_LINK_FLAG and make the build system one macro
smaller.
This commit is contained in:
M Joonas Pihlaja 2010-06-27 01:14:03 +03:00
parent d2f5592e0e
commit 47c35e5e86
2 changed files with 1 additions and 22 deletions

View file

@ -153,27 +153,6 @@ AC_DEFUN([CAIRO_CC_TRY_FLAG],
AC_MSG_RESULT([$cairo_cc_flag])
])
dnl check compiler/ld flags
AC_DEFUN([CAIRO_CC_TRY_LINK_FLAG],
[dnl
CAIRO_CC_CHECK_WERROR
AC_MSG_CHECKING([whether $CC supports $1])
_save_cflags="$CFLAGS"
CFLAGS="$CFLAGS $WERROR $1"
AC_LINK_IFELSE([int main(void){ return 0;} ],
[cairo_cc_flag=yes],
[cairo_cc_flag=no])
CFLAGS="$_save_cflags"
if test "x$cairo_cc_flag" = "xyes"; then
ifelse([$2], , :, [$2])
else
ifelse([$3], , :, [$3])
fi
AC_MSG_RESULT([$cairo_cc_flag])
])
dnl Usage:
dnl CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES
AC_DEFUN([CAIRO_CHECK_NATIVE_ATOMIC_PRIMITIVES],

View file

@ -81,7 +81,7 @@ AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
dnl check linker flags
AC_CACHE_CHECK([how to allow undefined symbols in shared libraries used by test suite], cairo_cv_test_undefined_ldflags,
[CAIRO_CC_TRY_LINK_FLAG([-Wl,--allow-shlib-undefined],
[CAIRO_CC_TRY_FLAG([-Wl,--allow-shlib-undefined], [],
[cairo_cv_test_undefined_ldflags="-Wl,--allow-shlib-undefined]")])
CAIRO_TEST_UNDEFINED_LDFLAGS="$cairo_cv_test_undefined_ldflags"
AC_SUBST(CAIRO_TEST_UNDEFINED_LDFLAGS)