Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2004 10:46:18 -0800
From:      Allan Bowhill <abowhill@blarg.net>
To:        freebsd-ports@freebsd.org
Subject:   using libtool with "convenience libraries"
Message-ID:  <20040220184618.GA93808@kosmos.my.net>

next in thread | raw e-mail | index | archive | help

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I am trying to build libtool support into a C++ project, and was
wondering if anyone could shed some light on how to do this properly.

My project is divided by class modules. Modules reside in project
subdirectories, accompanied by unit test code for each class:

project/
 main.cc
 main.h
  class1/
    class1.cc=20
    class1.h=20
    test_class1.cc
  class2/
    class2.cc=20
    class2.h=20
    test_class2.cc
  class3/
    class3.cc=20
    class3.h=20
    test_class3.cc

What I need to do is to create a build environment using the GNU
Autotools (autoconf, automake, libtool) so that .la files ("convenience
libraries") are built in each subdir, making it possible to build both
the main executable and all the test executables from the same binaries.

There is a pretty close example of what I want to do in
ports/devel/libtool15/work/libtool-1.5/depdemo:

> cd  /usr/ports/devel/libtool15
> make clean extract
> cd work/libtool-1.5/depdemo
>./configure=20
> gmake
[everything compiles fine...]

But there are problems if I try to use the depdemo directory=20
outside the libtool-1.5 build tree:

> cd  /usr/ports/devel/libtool15
> make clean extract
> cd work/libtool-1.5
> cp -R depdemo /tmp
>./configure=20
configure: error: cannot find install-sh or install.sh in . ./.. ./../..

install-sh is not the only missing file, there are a bunch of them.
Simply copying-in what I think is missing doesn't work. Neither do
do various incantations of autoreconf.

What files should I copy into this example to make it work?

As an aside, without libtool, autoreconf and the associated tools work
as they are documented in rolling a release. But things become
uncooperative when I try to integrate libtool in my project.

Any advice from an experienced autoconf user would be appreciated.
Thanks!

--=20
Allan Bowhill
abowhill@blarg.net
2745984aa0cc144df996eef515e9fbe2
A budget is just a method of worrying before you spend money, as well
as afterward.

--MGYHOYXEY6WxJCY8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFANlX5BC/kSIeFE54RAjIlAKCbTlD2Boza6HxwoAXY5YE4a2Gp9wCgu6Jl
FQjyk146C7dhcgO8KYs/RyI=
=ssc6
-----END PGP SIGNATURE-----

--MGYHOYXEY6WxJCY8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040220184618.GA93808>