[Glade-users] Include others libraries in a Glade project



G'day Marc,

Your issue is really related to automake, another package that Glade
depends on, and so it isn't the responsibility of the Glade project to
provide and maintain documentation for this.  Of course, I'm a mere user
myself and don't set policy.  Gladly.  ;-)

Marc Billaud wrote:
_Are there any risks of libraries conflicts with the ones that are used
by Glade ?

Yes.  Always.  You must resolve the risk yourself.  However, it is
fairly likely that all globals defined by Glade are within their own
naming scheme, so therefore conflicts would be less than likely.  If you
create names, either as globals and as automake macros, you must ensure
they are unique.

_What is the easy way to do this ?

As you had surmised, add LDADD lines to the automake input file,
Makefile.am.

XLIBS=`/usr/local/bin/xml-config --libs`
XFLAGS=`/usr/local/bin/xml-config --cflags`

INCLUDES = \
        $(XFLAGS) \
        -I$(top_srcdir)/intl \
        $(GNOME_INCLUDEDIR)

bin_PROGRAMS = project2

project2_SOURCES = \
        main.c \
        support.c support.h \
        interface.c interface.h \
        callbacks.c callbacks.h

project2_LDADD = $(XLIBS) $(GNOME_LIBDIR) $(GNOMEUI_LIBS) $(INTLLIBS)

This configuration of file failed because both variables XLIBS and
XFLAGS are not recognised properly.

You didn't say _how_ it failed.

You are not using automake the way it is designed.  The resolution of
the XLIBS macro to find the XML library would normally be done within
configure.in rather than in Makefile.am.  See "info automake" and select
the node Examples then Hello.  See the method used at the end of the
text for referencing libraries using a macro expanded by configure.

     hello_LDADD = @INTLLIBS@ @ALLOCA@

Also, I'd worry about XLIBS as your chosen macro name, as it may
conflict with the libx (X-Library) macro names.  I'd suggest XMLLIBS.

-- 
James Cameron                                      (cameron stl dec com)

http://www.linux.org/ http://www.linux.org.au/ http://www.freshmeat.net/





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