Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion General, maybe config, automake or autoconf
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steve Robbins  
View profile  
 More options Mar 29 2000, 3:00 am
Newsgroups: gnu.utils.bug
From: st...@riemann.nyongwa.montreal.qc.ca (Steve Robbins)
Date: 2000/03/29
Subject: Re: General, maybe config, automake or autoconf

In article <8bskgg$6a...@Uranos.teknon.de>,

Volker Borchert <b...@teknon.de> wrote:
> In article <8F05CF892Mer...@192.0.1.90>, h.m.br...@hccnet.nl (H. Merijn Brand) writes:

> |> I do really like to see that, if configure is called with --prefix=<dir>,
> |> that 'LDFLAGS' is extended with -L<dir>/lib and CFLAGS is automatically
> |> extended with -I<dir>/include if <dir> does not equal /usr/local

> Well...

> 1) Nothing prevents you from typing

> LDFLAGS=-L/path/to/libs CFLAGS=-ggdb\ -O2\ -I/path/to/incs \
>    ./configure --prefix=/path/to

> or putting a similar shell function/alias into your .bashrc.

Perhaps more convenient is $CONFIG_SITE.  

It is a little-known feature that any modern autoconf script (I don't
know what version of autoconf introduced this feature, but it has been
several years now) that if the environment variable CONFIG_SITE
exists, and names a readable file, that file will be sourced near the
beginning of the configure script.

In $CONFIG_SITE, you can do things like

    test x$CPPFLAGS = x && CPPFLAGS='-I/bla/bla/include'
    test x$LDFALGS = x && LDFLAGS='-L/bla/bla/lib'

But even better, you can do things conditionally on whether or not
you've set --prefix to something other than /usr/local:

    if test x$prefix != xNONE -a x$prefix != x/usr/local; then
        test -d $prefix/include && CPPFLAGS="$CPPFLAGS -I$prefix/include"
        test -d $prefix/lib && LDFLAGS="$LDFLAGS -L$prefix/lib"
    fi

-S


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google