automake
[Top][All Lists]
Advanced

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

Re: How to revise automake.am


From: Zhi Qing Wu
Subject: Re: How to revise automake.am
Date: Fri, 10 Sep 2004 19:31:51 +0100 (BST)

Thanks for your quick reply. By following your advice,
 I did some changes to Makefile.am:

The original Makefile.am:
...
modpermisdir = $(libexecdir)
modpermis_LTLIBRARIES = mod_permis.la
mod_permis_la_SOURCES = mod_permis.cpp
mod_permis_la_CXXFLAGS = $(APXS_CFLAGS)
-I$(APXS_INCLUDE) $(RPC_CFLAGS) $(LIBGCJ_CXXFLAGS)
mod_permis_la_LDFLAGS = -module -avoid-version
...

The revised Makefile.am:
...
modpermisdir = $(libexecdir)
modpermis_LTLIBRARIES = mod_permis.la
mod_permis_la_SOURCES = mod_permis.cpp
mod_permis_la_CXXFLAGS = $(APXS_CFLAGS)
-I$(APXS_INCLUDE)
/home/zhiqing/tmp/shibboleth-1.2/apache $(RPC_CFLAGS)
$(LIBGCJ_CXXFLAGS)
mod_permis_la_LDFLAGS = -lgcj -module -avoid-version
mod_permis_la_LDADD =
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/libotherclass.so

"otherclass" is the class I need to add to the program
mod_permis.cpp (belong to the project)
Directory "/home/zhiqing/tmp/shibboleth-1.2/apache"
contains otherclass.h
and mod_permis_la_LDADD points to the shared library
"libotherclass.so"

Yes, the project uses Libtool.

The compilation result shows:
apache/Makefile.am:44: use `mod_permis_la_LIBADD', not
`mod_permis_la_LDADD'
/usr/share/automake-1.7/am/depend2.am: am__fastdepCXX
does not appear in AM_CONDITIONAL
....
and other errors.

I have read
info '(automake.info)Java Support'
Without much experience in customing Makefile.am, I am
not sure what to do next.

B. R.

Zhi Qing


 --- Ralf Wildenhues <address@hidden> wrote: 
> * Zhi Qing Wu wrote on Fri, Sep 10, 2004 at
> 02:48:38PM CEST:
> > 
> > I am not very familiar with automake. 
> 
> Its documentation has grown to be quite readable and
> understandable.
> 
> > I need to insert a class into an existing project
> > (programed by someone else). I only have the the
> > header file and compiled library of the class
> (say,
> > permis.h, permis.so). the class is written in Java
> and
> > compiled with gcj. 
> 
> If the project does not use java yet, you need to
> adapt
> configure.ac as well as the Makefile.am.  Best start
> reading
> around
>   info '(automake.info)Java Support'
> after you're done with the initial examples and the
> general 'Building'
> part.
> 
> > The project contains hundreds C/C++ programs,
> which
> > are compiled by using Makefile.am and configure.ac
> > (both have been provided by the project).
> >  
> > I did some revisions to one of the C/C++ programs.
> The
> > revised class will use some methods in
> > permis.h/permis.so, and have included "permis.h"
> at
> > the beginning. I am not sure how to insert the
> path of
> > "permis.so" into Makefile.am, configure.ac or some
> > configure files else in order to make the revised
> > class properly compiled?
> 
> If the program is called `foo', and the project
> already uses Automake
> stuff like
> 
> foo_SOURCES = foo1.cc bla.cc ...
> 
> then you could just add
> 
> foo_CPPFLAGS = -I$(srcdir)/rel/path
> 
> where rel/path is the relative path to the directory
> where permis.h is
> located (and the srcdir part is there to allow
> building outside the
> source directory).  Similarly, foo_LDADD can be used
> for adding
> libraries.  Using *shared* libraries is not at all
> that simple, however,
> especially doing it portably and worrying about
> installed/uninstalled
> libraries and versions.  There are lots of infos on
> that topic in the
> Automake as well as in the Libtool manual (you did
> not mention whether
> the project uses Libtool or not).
> 
> Regards,
> Ralf
> 
> 
>  


        
        
                
___________________________________________________________ALL-NEW Yahoo! 
Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]