AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
Check whether the given FLAG works with the linker or gives an error. (Warnings, however, are ignored)
ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on success/failure.
If EXTRA-FLAGS is defined, it is added to the linker’s default flags when the check is done. The check is thus made with the flags: "LDFLAGS EXTRA-FLAGS FLAG". This can for example be used to force the linker to issue an error when a bad flag is given.
INPUT gives an alternative input source to AC_LINK_IFELSE.
NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
Download the latest version of ax_check_link_flag.m4 or browse the macro’s revision history.
Copyright © 2008 Guido U. Draheim guidod@gmx.de
Copyright © 2011 Maarten Bosmans mkbosmans@gmail.com
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.