[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Configure help
From: |
Bob Rossi |
Subject: |
Re: Configure help |
Date: |
Wed, 6 Jul 2005 13:30:35 -0400 |
User-agent: |
Mutt/1.3.28i |
On Wed, Jul 06, 2005 at 06:07:36PM +0200, Ralf Wildenhues wrote:
> Hi Bob,
>
> * Bob Rossi wrote on Tue, Jul 05, 2005 at 05:25:21PM CEST:
> >
> > I am having a little trouble using autoconf to configure my package.
> > Currently, I am tring to build a package that depends on another
> > package. Basically CGDB (main package) depends on Readline (second
> > package).
> >
> > I am using
> > AC_CONFIG_SUBDIRS(readline-5.0)
> > to configure readline. This works well.
> >
> > There is 2 problems I need to solve. The first is, since readline is
> > installed in cgdb/readline-5.0, I need a way of telling
> >
> > AC_CHECK_HEADERS(readline.h history.h)
> > AC_CHECK_LIB(readline, readline,
> > [AC_DEFINE(HAVE_LIBREADLINE, 1, readline library)],
> > AC_MSG_ERROR([Packaged readline failed to build.
> > Please submit a bug report.]))
> >
> > the above 2 commands how to find the installed readline. For instance,
> > AC_CHECK_LIB does not know to look in cgdb/readline-5.0 for readline.h.
> > What is the best way to accomplish this?
This is exactly what I did, thanks for the advice.
> Well, I would give the user the choice to
> - either use your shipped readline library
> - or use a previously installed readline library
> - or (if appropriate) disable readline functionality.
>
> Something like a
> --with-readline[=included]
> might be useful, although I don't know of an established convention for
> the optional `=included' part.
>
> > Also, AC_CHECK_LIB can not even look for libreadline.a until after the
> > "make" is done. Is there a way to ./configure && make && make install
> > the readline package, and then continue with CGDB's configure?
>
> Well, if you use your prepackaged readline, there is no need to check
> for either the headers nor the library -- you know they _will_ be there.
> (Of course, in that case your configure.ac should set appropriate flags
> for preprocessor and linker/libs.) So, the AC_CHECK_HEADERS/
> AC_CHECK_LIB tests should not be invoked then. Use ordering in toplevel
> Makefile.am variable SUBDIRS to ensure readline gets built before its
> users.
Thanks you, I will look into this.
Bob Rossi