You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
411B

  1. dnl @synopsis AC_ADD_CFLAGS
  2. dnl
  3. dnl Add the given option to CFLAGS, if it doesn't break the compiler
  4. AC_DEFUN([AC_ADD_CFLAGS],
  5. [AC_MSG_CHECKING([if $CC accepts $1])
  6. ac_add_cflags__old_cflags="$CFLAGS"
  7. CFLAGS="$CFLAGS $1"
  8. AC_TRY_LINK([
  9. #include <stdio.h>
  10. ],
  11. [puts("Hello, World!"); return 0;],
  12. AC_MSG_RESULT([yes]),
  13. AC_MSG_RESULT([no])
  14. CFLAGS="$ac_add_cflags__old_cflags"
  15. )
  16. ])# AC_ADD_CFLAGS