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