| 1 |
INSTALLATION: |
| 2 |
|
| 3 |
Unix/Linux |
| 4 |
========== |
| 5 |
|
| 6 |
Installation on Unix/Linux should be simple. Simply execute the following |
| 7 |
sequence of commands: |
| 8 |
|
| 9 |
./configure ; make ; su -c 'make install' |
| 10 |
|
| 11 |
Note that this assumes that you have development versions of glib (>= |
| 12 |
2.0.0) and libgsf (>= 1.6.0). |
| 13 |
|
| 14 |
LINKS: |
| 15 |
|
| 16 |
glib is available at ftp://ftp.gnome.org/pub/gnome/sources/glib/ |
| 17 |
libgsf is available at ftp://ftp.gnome.org/pub/gnome/sources/libgsf/ |
| 18 |
|
| 19 |
Extensive installation instructions can be found in the INSTALL file. |
| 20 |
|
| 21 |
|
| 22 |
Windows - Microsoft(tm) Visual Studio/C++ |
| 23 |
========================================= |
| 24 |
|
| 25 |
A workspace for MSVC6 can be found in the ./build/win32/ directory. |
| 26 |
This workspace contains a projects file to compile a release version or |
| 27 |
a debug version of libabw. |
| 28 |
|
| 29 |
NOTE: Using the MSVC build system will result in a static library only. |
| 30 |
No dll can be created yet using this build system. If you want to create |
| 31 |
a dll, please use the MingW build system (see below for details). |
| 32 |
|
| 33 |
|
| 34 |
Windows - MinGW |
| 35 |
=============== |
| 36 |
|
| 37 |
First of all, in order to use libabw in your application, you do not need |
| 38 |
to build it yourself. If you have access to a binary distribution, you |
| 39 |
are encouraged to use it. If for whatever reason you still want to build |
| 40 |
libabw using MinGW, read following instructions. |
| 41 |
|
| 42 |
|
| 43 |
* Build environment and dependencies |
| 44 |
|
| 45 |
In order to build libabw, you have to have installed MinGW distribution from |
| 46 |
http://www.mingw.org. Because the build system of libabw uses autotools, you |
| 47 |
must install also the MSys packages. It is advisable to install all recent |
| 48 |
packages into a path that does not contain spaces. Besides the MinGW |
| 49 |
distribution, you have to install the _runtime_ and _development_ packages of |
| 50 |
_ALL_ dependencies, namely: GNU libiconv, GNU gettext, zlib, glib2, pkg-config, |
| 51 |
libxml2 and libgsf. All these packages are linked to from Tor Lillqvist's |
| 52 |
"GTK+ and GIMP for Windows" web-site. Go directly to the download section |
| 53 |
(http://www.gimp.org/~tml/gimp/win32/downloads.html). |
| 54 |
|
| 55 |
You will have to create libtool import libraries for every DLL that you have to |
| 56 |
link with. To do this, generate from the DLL a *.def file using "pexports.exe" |
| 57 |
tool -- included in one of the packages of MinGW distribution -- and create |
| 58 |
a libtool import library using the DLL, the *.def file and "dlltool.exe". |
| 59 |
Put the result in the ../lib/ directory relative to the DLL file. |
| 60 |
For more details, check the documentation part of the MinGW web-site. |
| 61 |
Typically, in order to make libtool's work easier, call the import libraries |
| 62 |
"lib"$(dllname)".dll.a", unless the library has already the "lib" in the name. |
| 63 |
Example: iconv.dll -> libiconv.dll.a; intl.dll -> libintl.dll.a; |
| 64 |
BUT: libxml2.dll -> libxml2.dll.a |
| 65 |
|
| 66 |
|
| 67 |
* Build procedure |
| 68 |
|
| 69 |
1. Unpack the source code by running: |
| 70 |
|
| 71 |
gunzip -dc libabw-{version}.tar.gz | tar xpf |
| 72 |
|
| 73 |
You can also use WinZip or any other GUI compression tool. |
| 74 |
|
| 75 |
2. Next, run: |
| 76 |
|
| 77 |
export ACLOCAL_FLAGS='-I <pkg-config installation prefix>/share/aclocal'; \ |
| 78 |
./autogen.sh |
| 79 |
|
| 80 |
Some versions of libtool have bug that prevents MinGW from creating shared |
| 81 |
libraries. The autogen.sh script "libtoolizes" the package using the libtool |
| 82 |
included with MinGW distribution. Like that you are sure that your libtool is |
| 83 |
able to create DLLs. |
| 84 |
The ACLOCAL_FLAGS variable is there in order to allow the auto* scripts to find |
| 85 |
the pkg.m4 macro that is part of the pkg-config distribution. If this macro is |
| 86 |
not found, the generated configure script will be ending with an error. |
| 87 |
|
| 88 |
3. Time to configure libabw; run: |
| 89 |
|
| 90 |
./configure [--prefix=<target>] [--enable-static] [--disable-shared] |
| 91 |
|
| 92 |
By default, the configure script uses as prefix "/usr/local" and configures to |
| 93 |
create only shared libraries. Myself, I build using following options: |
| 94 |
"./configure --prefix=/target --enable-static --enable-shared" |
| 95 |
|
| 96 |
4. In the "libtool" created by the configure script, replace any occurrence of |
| 97 |
|
| 98 |
deplibs_check_method="file_magic ^x86 archive import|^x86 DLL" |
| 99 |
|
| 100 |
by |
| 101 |
|
| 102 |
deplibs_check_method="pass_all" |
| 103 |
|
| 104 |
For some reasons, libtool is not able to distinguish the libtool import |
| 105 |
libraries libXXX.dll.a from static libraries libXXX.a. This ugly hack makes it |
| 106 |
link with the first libXXX.dll.a that it meets. |
| 107 |
|
| 108 |
5. Nearly done. Make sure you have a clean build by running: |
| 109 |
|
| 110 |
make clean all |
| 111 |
|
| 112 |
6. And last but not least, compile and install libabw by running: |
| 113 |
|
| 114 |
make install [-i] |
| 115 |
|
| 116 |
If you configure using "--enable-static --disable-shared" (pure static library |
| 117 |
creation), the libtool import libraries are not created. Make will try to install |
| 118 |
them and will stop with error. The "-i" option makes it to report the error, but |
| 119 |
not to stop. Like that the installation will succeed. |
| 120 |
|
| 121 |
That's all folks! For more information, ask questions at the mailing list |
| 122 |
[email protected]. Remember that Uncle Google can also be of big |
| 123 |
help especially when the problem is not with libabw, but with one of its |
| 124 |
dependencies. |
| 125 |
|
| 126 |
Mac OSX |
| 127 |
======= |
| 128 |
|
| 129 |
Compilation on Mac OSX requires following fix in order not to have errors concerning |
| 130 |
unresolved symbols at runtime |
| 131 |
|
| 132 |
1. perl -pi -e 's,need_relink=yes,need_relink=no,g' ltmain.sh |
| 133 |
|
| 134 |
2. ALL IN ONE LINE !!! |
| 135 |
|
| 136 |
perl -pi -e 's,\$CC -r -keep_private_externs -nostdlib -o \$\{lib\}-master.o |
| 137 |
\$libobjs \&\& \$CC,\$nonopt -r -keep_private_externs -nostdlib -o |
| 138 |
\$\{lib\}-master.o \$libobjs \&\& \$nonopt,g' configure |
| 139 |
|
| 140 |
3. ./configure --with-pic [all other options] |
| 141 |
|
| 142 |
make ; sudo make install |
| 143 |
|
| 144 |
The above-mentioned fix is from the libabw-1.info file of Justin F. Hallet who |
| 145 |
maintains the libabw-1* packages for Fink project (http://fink.sourceforge.net). |