Re: How to build pango-modules into libpango?



suzukis@flavor1.ipc.hiroshima-u.ac.jp writes:

> Is any configuration possible to built libpango including pango
> modules statically, instead of standard dynamically loading the
> modules? Although the pango is designed to use dynamic loading
> for the flexibility, the easiness-to-extend, etc, but building
> the module functions into libpango makes debugging easier, and
> enables porting GTK+ onto the systems without reliable dynamic loader.

I spent a bit of time getting this roughly working, since I needed it
for profiling. I did not try to make it really robust, and I have not
tested it for several months.

There are some limitations (you can't add modules later), and I really
consider it an option of last resort, but I'd like to have that option
there.

So, if you want to debug the current code, or have suggested
improvements, I'd appreciate it. :-)

> The configure script accompanied to pango-0.12 provides an option
> "--with-included-modules" - I supposed this can help me.
> Which documents I should read?

It's not documented anywhere. I think simply doing

 ./configure --with-included-modules 

should be enough.

(It should be noted that this definitely doesn't work for using
Pango with anything but X - it results in libpango having 
dependencies on symbols in libpangox.)
 
> When using this option, building process make archive libraries
> e.g. libpango-basic.a in modules/basic/.libs instead of the sharable
> objects of loadable module. And some symbols calling archived-modules
> are pushed into libpango.a. However, "make install" does not install
> archived-modules, they should be installed manually. Of course, to
> link pango statically, we have to add the options like "-lpango-basic"
> (pango-config does not tell which archived-modules should be linked).

Actually, the way it works is that the module files are linked
into the library libpangox.so at build time.

 libpangox_la_LIBADD = $(INCLUDED_MODULES)

(The reason that they are linked into libpangox, not libpango,
is that the modules included with Pango are X specific.) 

> Yet I've not tested the behaviour of the statically linked pango,
> but if my usage is correct, I hope a few points to be improved.
> 
> (a) the objects files for archived-modules are included into libpango.a
> 
> or, at least,
> 
> (a') archived-modules should be installed by "make install",
>      and pango-config should reflect it.

While installing them would be another option, it's not the
way it currently works.

Regards,
                                        Owen







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