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.
 
 
 

48 rindas
1.6 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 -Werror"
  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 -Werror"
  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++)])
  31. dnl LOL_TRY_LDFLAGS (LDFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
  32. dnl check if $CC supports a given set of ldflags
  33. AC_DEFUN([LOL_TRY_LDFLAGS],
  34. [AC_MSG_CHECKING([if $CC supports $1 flags])
  35. save_LDFLAGS="$LDFLAGS"
  36. LDFLAGS="$1 -Werror"
  37. AC_TRY_LINK([],[],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no])
  38. LDFLAGS="$save_LDFLAGS"
  39. AC_MSG_RESULT([$ac_cv_try_ldflags_ok])
  40. if test x"$ac_cv_try_ldflags_ok" = x"yes"; then
  41. ifelse([$2],[],[:],[$2])
  42. else
  43. ifelse([$3],[],[:],[$3])
  44. fi])