From 87340dcccf97c3e1f0ab918bb6740abf47d65558 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 1 Dec 2011 13:12:59 -0800 Subject: XORG_TESTSET_CFLAG: Try to both compile & link with the flags Catches build problems caused by compilers that ignore unknown flags at compile time and pass them to the linker at link time, when the linker considers unknown flags to be fatal errors. Reviewed-by: Gaetan Nadon Signed-off-by: Alan Coopersmith --- xorg-macros.m4.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xorg-macros.m4.in') diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index ed908e2..3fd5348 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1492,7 +1492,7 @@ m4_foreach([flag], m4_cdr($@), [ CFLAGS="$CFLAGS ]flag[" AC_MSG_CHECKING([if $CC supports ]flag[]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], [supported=yes], [supported=no]) AC_MSG_RESULT([$supported]) CFLAGS="$xorg_testset_save_CFLAGS" -- cgit v1.2.3