Now configure will *allways* fail to locate (GNU)libraries and -tools
located in /pro/local/lib, /pro/local/bin and /pro/local/include.
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
This should be done BEFORE checking for available libraries and/or
include files.
Do people agree with me?
--
H.Merijn Brand
using perl5.005.03 on HP-UX 10.20, HP-UX 11.00, AIX 4.2.1, AIX 4.3.0, DEC
OSF/1 4.0 and WinNT 4.0 SP-6a, often with Tk800.019 and/or DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
Member of Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
|> 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.
2) Others might deliberatly want to install stuff into a $prefix
different from where other GNU stuff lives. For example, they might
want new (beta) releases installed in /usr/test but still compiled
using stuff in /usr/local.
So I think it might become an optional feature at most, but the
probability is very low.
--
"I'm a doctor, not a mechanic." Dr Leonard McCoy <mc...@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert <b...@teknon.de>
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
>In article <8F05CF8...@192.0.1.90>, h.m....@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.
Which is exactly what I want to prevent, but I guess you know that.
I KNOW how to do it, I want it to be the default behaviour. If
/usr/local happens to be the target, I get this behaviour for free.
BTW, I use tcsh, no bash
>2) Others might deliberatly want to install stuff into a $prefix
>different from where other GNU stuff lives. For example, they might
>want new (beta) releases installed in /usr/test but still compiled
>using stuff in /usr/local.
I think this is the exception to the default behaviour of almost all
configure scripts. You already have to explicitly tell configure that you
wanna do that. I'm aiming at the default behaviour, which still holds for
my original quest
>So I think it might become an optional feature at most, but the
>probability is very low.
Can anyone say if it is breaking with backward compatibility if my request
would be the default behaviour?
>
>In article <8bskgg$6ad$1...@Uranos.teknon.de>,
>Volker Borchert <b...@teknon.de> wrote:
>> In article <8F05CF8...@192.0.1.90>, h.m....@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
Now this is EXACTLY what I was looking for!
I've named the file policy.sh