您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

lol-misc.m4 1.1 KiB

1234567891011121314151617181920212223242526272829303132
  1. dnl LOL_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
  2. dnl check if $CC supports a given set of cflags
  3. AC_DEFUN([LOL_TRY_CFLAGS],
  4. [AC_MSG_CHECKING([if $CC supports $1 flags])
  5. save_CFLAGS="$CFLAGS"
  6. CFLAGS="$1"
  7. AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no])
  8. CFLAGS="$save_CFLAGS"
  9. AC_MSG_RESULT([$ac_cv_try_cflags_ok])
  10. if test x"$ac_cv_try_cflags_ok" = x"yes"; then
  11. ifelse([$2],[],[:],[$2])
  12. else
  13. ifelse([$3],[],[:],[$3])
  14. fi])
  15. dnl LOL_TRY_CXXFLAGS (CXXFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
  16. dnl check if $CXX supports a given set of cxxflags
  17. AC_DEFUN([LOL_TRY_CXXFLAGS],
  18. [AC_MSG_CHECKING([if $CXX supports $1 flags])
  19. AC_LANG_PUSH(C++)
  20. save_CXXFLAGS="$CXXFLAGS"
  21. CXXFLAGS="$1"
  22. AC_TRY_COMPILE([],[],[ac_cv_try_cxxflags_ok=yes],[ac_cv_try_cxxflags_ok=no])
  23. CXXFLAGS="$save_CXXFLAGS"
  24. AC_MSG_RESULT([$ac_cv_try_cxxflags_ok])
  25. if test x"$ac_cv_try_cxxflags_ok" = x"yes"; then
  26. ifelse([$2],[],[:],[$2])
  27. else
  28. ifelse([$3],[],[:],[$3])
  29. fi
  30. AC_LANG_POP(C++)])