/src/FreeImage/README.solaris

https://bitbucket.org/cabalistic/ogredeps/ · Unknown · 67 lines · 48 code · 19 blank · 0 comment · 0 complexity · bfe9f3b77295b96157a18aa9c1f16b2e MD5 · raw file

  1. Release Notes
  2. --------------
  3. Hey folks,
  4. I just went through the process of building and using the freeimage library
  5. on Solaris 9. Things don't work out of the box so I thought I would share my
  6. experiences in case someone else wants to do the same.
  7. I'm using Solaris 9, and I have installed all the development libraries, make,
  8. and the gcc 3.3.2 found on sunfreeware.com.
  9. You have to use the make from sunfreeware because the Solaris 9 make program
  10. chokes hard on FreeImages makefiles.
  11. First thing I had to do was modify the main FreeImage makefile:
  12. 1. go to the $(SHAREDLIB): line and replace the $(CC) line with the following.
  13. (there are 2 corrections)
  14. $(CC) -s -G -Wl,-soname=$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
  15. The two changes are -G instead of -shared, and the = sign instead of a comma
  16. after the -soname.
  17. 2. change INSTALLDIR = /usr/lib to INSTALLDIR = /usr/local/lib
  18. This is because the sunfreeware tools assume the libs being built will reside
  19. in /usr/local/lib and thus set the default linker search paths to that. Another
  20. solution for this would be to use the -R and -L linker options, but I chose
  21. the easy way :)
  22. That's it! You can now use freeimage.
  23. Also, if you have an autoconf/automake project that links against FreeImage,
  24. you can use the following in your configure.in, it works rather well for me:
  25. AC_CHECK_LIB(freeimage-3.5.0, FreeImage_Initialise, [],
  26. [AC_MSG_ERROR([libfreeimage-3.5.0.so required and missing. See
  27. http://freeimage.sourceforge.net.]) ])
  28. the AC_CHECK_LIB macro will not only find the library, it will automatically
  29. link against it as well so you dont have to add it to your Makefile.am.
  30. I hope this helps someone!
  31. ---
  32. ogtharox at users.sourceforge.net
  33. Installation
  34. ------------
  35. Note: You will need to have root privileges in order to install the library in the /usr/local/lib directory.
  36. The installation process is as simple as this :
  37. 1) Enter the FreeImage directory
  38. 2) Build the distribution :
  39. make -f Makefile.solaris
  40. make -f Makefile.solaris install
  41. 3) Clean all files produced during the build process
  42. make -f Makefile.solaris clean
  43. Release Notes for Solaris/Sparc
  44. --------------------------------
  45. Under Solaris/Sparc, you will need to modify the following line :
  46. COMPILERFLAGS = -O3
  47. modified into
  48. COMPILERFLAGS = -O3 -DBYTE_ORDER=BIG_ENDIAN -D__BIG_ENDIAN__