autoconf
[Top][All Lists]
Advanced

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

Re: Configure help


From: Bob Rossi
Subject: Re: Configure help
Date: Wed, 13 Jul 2005 16:55:20 -0400
User-agent: Mutt/1.3.28i

> > Thanks for the general philosophy on how to accomplish this task, it's
> > much needed. I have several questions though,
> > 
> > I understand how to set the libs flag,
> >    LIBS="$LIBS -lreadline -lhistory"
> 
> Nope.  Most likely, you want
>    LIBS="-lreadline -lhistory $LIBS"
> instead.  New libraries go in front, as they might depend on libraries
> already put in LIBS.

Thanks, this works great.

> > BTW, what's the appropriate way to set the CFLAGS, CPPFLAGS and LDFLAGS?
> > This is what I have been doing,
> > 
> > LDFLAGS="-L$opt_with_readline_prefix/lib $LDFLAGS"
> > CFLAGS="-I$opt_with_readline_prefix/include
> > -I$opt_with_readline_prefix/include/readline $CFLAGS"
> > CPPFLAGS="-I$opt_with_readline_prefix/include
> > -I$opt_with_readline_prefix/include/readline $CPPFLAGS"
> 
> Don't set any of these at all -- they are supposed to be reserved for
> the user.  If you use Automake, read
>   info Automake 'Flag Variables Ordering'
> 
> (also be sure to have a look at
>   info Autoconf 'Preset Output Variables'
> 
> anyway) for the supposed names you should use.  (Note there is a
> difference here for the flags you might have to set for some of the
> Autoconf tests and which are supposed for users to be set in the
> resulting Makefile -- that's what snippets like
>   save_CPPFLAGS=$CPPFLAGS
>   CPPFLAGS="$CPPFLAGS -I..."
>   # ... test
>   CPPFLAGS=$save_CPPFLAGS
> 
> in the configure script are for.)  And preprocessor flags should go
> in *CPPFLAGS only, not *CFLAGS.
> 
> I believe *CPPFLAGS and *LDFLAGS should be appended to.

OK, I'll work on this.

I think I have things working nicely. Here is the general order of
things done, 
   - configure CGDB then readline
   - compile readline, compile CGDB
     CGDB use's headers from $top_srcdir/readline-5.0 and libraries from
     $top_builddir/readline-5.0
   - install readline/CGDB

I was wondering if this is OK?

Finally, is there a way to not have readline install anything? Since I
linked statically to it, I don't need anything else from it.

Thanks,
Bob Rossi




reply via email to

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