[PATCH:macros] XORG_TESTSET_CFLAG: Try to both compile & link with the flags
Alan Coopersmith
alan.coopersmith at oracle.com
Thu Dec 1 13:14:36 PST 2011
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.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
xorg-macros.m4.in | 2 +-
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"
--
1.7.3.2
More information about the xorg-devel
mailing list