[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Configure help
From: |
Ralf Wildenhues |
Subject: |
Re: Configure help |
Date: |
Wed, 6 Jul 2005 18:07:36 +0200 |
User-agent: |
Mutt/1.4.1i |
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?
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.
Regards,
Ralf
- Configure help, Bob Rossi, 2005/07/05
- Re: Configure help,
Ralf Wildenhues <=