summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-01 13:12:59 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-01 14:51:22 -0800
commit87340dcccf97c3e1f0ab918bb6740abf47d65558 (patch)
tree046a5a7e9d16e9d7b5f9edd2b0deb97f62d80dde
parent2d4a7a4cf645c9cb586cf2f77f8d3f61d6c71883 (diff)
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 <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xorg-macros.m4.in2
1 files changed, 1 insertions, 1 deletions
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"