mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-29 06:40:10 +01:00
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>
This commit is contained in:
parent
7fe24aacd2
commit
dbc7637f13
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue