Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

33 rindas
1.1 KiB

  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++)])