autoconf
[Top][All Lists]
Advanced

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

configure.gnu script and nested packages


From: L. A. Pritchett-Sheats
Subject: configure.gnu script and nested packages
Date: Thu, 20 Mar 2008 10:41:06 -0600 (MDT)
User-agent: SquirrelMail/1.4.8-6.el3.2lanl

Hello -

I have some questions about nesting packages and configure.gnu

My project looks like

  foo/
     src/ <-- My source
     packageA/ <-- GSL package
     packageB/ <-- OOL package

PackageB depends on PackageA and my source depends on both. Each package
has a configure script. PackageB's configure.ac file threw an error if it
failed to find PackageA libraries. Not good since at configure time
PackageA has not been built. So I commented out the error call in
PackageB/configure.ac and wrote a configure.gnu which set CFLAGS and
LDFLAGS for the PackageA directory and then invoke the PackageB configure
script. But I've run into problems when the user calls the top directory
configure with ../configure CFLAGS="-g blah.." where CFLAGS has some white
space in the definition. My command line parser in configure.gnu isn't
working correctly, but after poking around on the net I'm not sure now if
this is the right approach at all. It looks like to me that configure.gnu
was intended for non-GNU build systems which isn't the case here.

So my questions are

(1) Is using a configure.gnu in PackageB a good idea? Or should I just set
AM_CFLAGS,AM_LDFLAGS in the top level Makefile.am to include PackageA. I
didn't do this at first because not all the code in my source needs
PackageA.

and the follow up to this question

(2) If creating a configure.gnu is the best approach, can someone send me
a link to a non-trivial example? I'm familar with csh and PERL shell
programming but I have not written anything complicated in sh and I'd like
to see how other developers have handled CFLAGS, LDFLAGS, etc. from the
command line.

Thanks.





-- 
Lori A. Pritchett-Sheats, PhD.
Technical Staff Member
HPC-5, Integration Systems
Phone: (505) 665-6675   Fax: (505) 664-0172
Snail Mail
Los Alamos National Laboratory
PO Box 1663
MS T080
Los Alamos, New Mexico 87544




reply via email to

[Prev in Thread] Current Thread [Next in Thread]