Some troubles encounted in preparing an official package

Gerrit P. Haase gp@familiehaase.de
Fri Sep 10 09:39:00 GMT 2004


Hallo Yang,

Am Donnerstag, 9. September 2004 um 16:18 schriebst du:

> Hi, Gerrit 

> Thansk for your info. 
> But there's still some questions:

> On Wed, 8 Sep 2004 19:18:35 +0200, 
> Gerrit P. Haase <gp@familiehaase.de> wrote:

>> > 2. Need all patches be generated on .am files and use automake to
>> > re-generate the .in files(such as Makefile.in, etc)?  In the past when
>> > porting applications for cygnome and cygnome2, I used some workaround
>> > on .in files.  But seem that some 'tricks'  could not be applied on
>> > Makefile.am.
>> 
>> Since the new automake and libtool needs to be compatible, I always
>> change the .am files and then run
>> 'autoreconf --force --install --verbose' to get them updated and to
>> get the new libtool.

> For example, I used to use dlltool to generate an export library for
> sylpheed.exe, which is needed to build the plugins,
> | sylpheed$(EXEEXT): $(sylpheed_OBJECTS) $(sylpheed_DEPENDENCIES)
> |         @rm -f sylpheed$(EXEEXT)
> |        @rm -f sylpheed.def sylpheed.base sylpheed.exp libsylpheed.a
> .libs/libsylpheed.a
> |        $(LINK) -shared $(sylpheed_LDFLAGS)
> -Wl,--out-implib=libsylpheed.a -Wl,--export-all-symbols, \
> | --exclude-symbols,main $(sylpheed_OBJECTS) -Wl,--no-whole-archive
> $(sylpheed_LDADD) $(LIBS)
> |        dlltool --output-def sylpheed.def --dllname sylpheed$(EXEEXT)
> --export-all-symbols --exclude-symbols main $(sylpheed_OBJECTS)
> gtk/.libs/libsylpheedgtk.a
> |        $(LINK) $(sylpheed_LDFLAGS) -Wl,--base-file,sylpheed.base
> $(sylpheed_OBJECTS) $(sylpheed_LDADD) $(LIBS)
> |        dlltool --base-file sylpheed.base --input-def sylpheed.def
> --output-exp sylpheed.exp
> |        $(LINK) $(sylpheed_LDFLAGS) -Wl,sylpheed.exp
> $(sylpheed_OBJECTS) $(sylpheed_LDADD) $(LIBS)
> |       @cp libsylpheed.a .libs/libsylpheed.a

> but how this could be achieved on Makefile.am?  I'm really a fool for
> autoconf/automake.

Libtool does all this automatically.
The .am Makefile includes lines like this:

lib_LTLIBRARIES = libmatheval.la
libmatheval_la_SOURCES = xyz.y xyz.l xyz.c
libmatheval_la_LDFLAGS = -no-undefined -version-info 0:0:0
libmatheval_la_LIBADD = -lfl
include_HEADERS = zxy.h
noinst_HEADERS = xyz.h

Automake and libtool rules make all the rest (object files, importlib
and a DLL).  There are options to get a .def file as well, but it
isn't needed unless you want only few symbols exported, default is to
export all symbols from the DLL.

>> As long as the application works, all is allowed.  Is a shared library
>> installed and can you verfiy it is working?
>> 
> Yes, these two libraries (spamassassin.dll and spamassassin_gtk.dll)
> would be installed, and they're working.  libtool just doesn't allow
> one module depend on another (seems that it's affected by the option
> '-module' in LDFLAGS)

This is stupid.  As long as one dll is able to use symbols in another
dll and it is working, all is ok.  Which libtool version is used?
What is the effect if the -module flag is removed?

> The side effect of 'make -i'  is that other errors couldn't be
> detected during install. I'll try to find some other workarounds.


Gerrit
-- 
=^..^=




More information about the Cygwin-apps mailing list