ac_c_compile_flags.m4 292 B

12345678910111213141516
  1. AC_DEFUN([AC_C_COMPILE_FLAGS],[
  2. NEW_CFLAGS="$CFLAGS"
  3. for ac_flag in $1
  4. do
  5. AC_MSG_CHECKING(whether compiler supports $ac_flag)
  6. CFLAGS="$NEW_CFLAGS $ac_flag"
  7. AC_TRY_COMPILE(,[
  8. void f() {};
  9. ],[
  10. NEW_CFLAGS="$CFLAGS"
  11. AC_MSG_RESULT(yes)
  12. ],AC_MSG_RESULT(no))
  13. done
  14. CFLAGS="$NEW_CFLAGS"
  15. ])