[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing an argument to configure script of subproject
From: |
Ralf Wildenhues |
Subject: |
Re: Passing an argument to configure script of subproject |
Date: |
Thu, 3 Jun 2010 12:51:44 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hello,
* Richard Ash wrote on Wed, Jun 02, 2010 at 10:14:42PM CEST:
> On Wed, 2010-05-26 at 23:43 +0200, ithilgore wrote:
> > The problem is that in order to share libfoo between the two projects (that
> > is both can fetch it as an external svn object), projectA needs to pass a
> > certain flag to the configure script of libfoo. This flag/argument would be
> > something like --disable-bar where bar is something that projectA doesn't
> > have (It's actually another library that can be optionally linked with
> > libfoo but is by default linked with and needed by projectB)
> >
> > The question is: How can you pass an optional argument to the configure
> > script of libfoo by projectA? This argument should be passed externally
> > only by projectA so the solution of using "configure.gnu" residing inside
> > libfoo wouldn't work because that way projectB would then call it too
> > (since libfoo should be a shared svn object between the two projects).
One solution which comes to mind is
projectA/configure.ac:
AC_CONFIG_SUBDIRS([foo-proxy])
projectA/foo-proxy/configure.ac:
ac_sub_configure_args="$ac_sub_configure_args --disable-bar"
...
AC_CONFIG_SUBDIRS([foo])
and projectA/foo-proxy/foo/ contains libfoo.
Another would be to add another, second argument (only from projectA,
but not from projectB) which distinguishes it, so a configure.gnu could
resolve that.
> > projectA uses a configure.ac with a AC_CONFIG_SUBDIRS directive to call the
> > configure script of libfoo. projectB does the same too.
Well, the essence is that if A and B differ in some respects, then you
can transport that difference down, no?
Hope that helps.
Cheers,
Ralf