summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-02-24 15:48:14 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-02-24 15:48:14 +0000
commitdbc7637f13fa4bdff8873f213466fe170f6eaaf2 (patch)
tree07eff66a0e8a3931fed7c46ba37aaeeaf746082f
parent7fe24aacd23a1e2bf4b8f89457f4c18baceef198 (diff)
Modernize checks in ld_supports_flag
Part of a patch by Javier Jardón. (This will conflict with changes from my gc-sections branch -smcv) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 23d4f2c0..5e330308 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1106,10 +1106,12 @@ cc_supports_flag() {
ld_supports_flag() {
AC_MSG_CHECKING([whether $LD supports "$@"])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
int one(void) { return 1; }
int two(void) { return 2; }
- ], [ two(); ] , [_ac_ld_flag_supported=yes], [_ac_ld_flag_supported=no])
+ ]], [[ two(); ]])],
+ [_ac_ld_flag_supported=yes],
+ [_ac_ld_flag_supported=no])
if test "$_ac_ld_flag_supported" = "yes"; then
rm -f conftest.c