Re: static linking with gtk



>
>Does anyone know some decent examples of how to do this with autotools?
>

1. Assure you have the GTK static libraries compiled and installed:

cd libgtk-1.2.x
./configure --enable-static
make
make install

2. Tune the configure.in in your own package, so it will add all GTK
static libraries to compilation. In the example followed it will be
@gtk_libs@:

gtklib_prefix=`gtk-config --prefix`/lib

gtk_libs=$gtklib_prefix/libgtk.a \
  $gtklib_prefix/libgdk.a \
  $gtklib_prefix/libgmodule.a \
  $gtklib_prefix/libglib.a

AC_SUBST(gtk_libs)

Note, you still have to deduce which X11 libraries required with the
use of standard autoconf macros (see AC_PATH_XTRA)

Regards,
Vladimir V. Tsichevski
senior expert

-----------------------------------------------------
                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
-----------------------------------------------------
Any opinions or recommendations herein are those of
the author and not of his computer.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]