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

Re: Howto Add a Library to the Build?




Michael B Allen <mba2000@ioplex.com> writes:

> What's the proper way to add a library to the build?
>
> For example, let's say I have a library "libplex" in
> /home/miallen/{include,lib}. It does not use autowhatever
> so I don't have a .la file. I would like to say ./configure
> --with-libplex=/home/miallen. Can someone give me a rough overview of
> what files to look at so I have an idea of what documentation to read.

If its just a temporary/local-patch thing its easiest to pass them in using

./configure CPPFLAGS="-I/home/miallen/include" LIBS="-L/home/miallen/lib -lplex"

If its a more permanent patch, you probably want to use the heimdal
extention rk_TEST_PACKAGE. See how its used for openldap in configure.in.
rk_TEST_PACKAGE will give you automake and autoconf symbols to do ifdef/if
on (grep for OPENLDAP in the source tree for examples). rk_TEST_PACKAGE
will also give you LIB_package and INCLUDE_package automake variables.

The documentation you want to read is autoconf and automake.

To rebuild all the configure-related files and makefile.in's you install
all the lastest version of automake, libtool, autoconf in the same prefix
(--prefix=$HOME/autotools) and then set path to
PATH="$HOME/autotools/bin:$PATH" and run "autoreconf -f -i".





PGP signature