s48_pic_option_name.m4 700 B

123456789101112131415161718192021222324252627282930313233
  1. ### s48_pic_option_name.m4 --- S48_PIC_OPTION_NAME macro -*- Autoconf -*-
  2. # serial 1
  3. dnl
  4. dnl
  5. dnl Determine the name of compiler option for generating position
  6. dnl independent code.
  7. AC_DEFUN([S48_PIC_OPTION_NAME], [dnl
  8. AC_MSG_CHECKING([how to compile position independent code])
  9. case "$host_os" in
  10. solaris* )
  11. if test "$GCC" = "yes"; then
  12. PIC="-fPIC"
  13. else
  14. # for SUN's compiler
  15. PIC="-KPIC"
  16. fi
  17. ;;
  18. darwin*|macosx* )
  19. # Code on this platform is PIC by default
  20. PIC=""
  21. ;;
  22. *)
  23. PIC="-fPIC"
  24. ;;
  25. esac
  26. if test "$PIC" = ""; then
  27. AC_MSG_RESULT(no extra option necessary)
  28. else
  29. AC_MSG_RESULT($PIC)
  30. fi
  31. ])dnl
  32. ### s48_pic_option_name.m4 ends here