Permalink
Browse files

Handle -minline-all-stringops properly

  • Loading branch information...
1 parent 53ee972 commit 86855f03945d3bad90da0b28311bece484cbfce7 Stephane Marchesin committed Oct 17, 2007
Showing with 8 additions and 1 deletion.
  1. +8 −1 configure.ac
View
@@ -85,7 +85,14 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
AC_HEADER_STDC
# Use -Wall all the time
-CFLAGS="$CFLAGS -Wall -minline-all-stringops"
+CFLAGS="$CFLAGS -Wall"
+
+# Check for -minline-all-stringops availabtility
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -minline-all-stringops"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ ]])],
+[ CFLAGS="$OLD_CFLAGS -minline-all-stringops"],[CFLAGS="$OLD_CFLAGS"])
+
AC_SUBST([CFLAGS])
AC_SUBST([XORG_CFLAGS])

0 comments on commit 86855f0

Please sign in to comment.