autoconf
[Top][All Lists]
Advanced

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

Re: Help with path expansion


From: John Calcote
Subject: Re: Help with path expansion
Date: Wed, 19 Jan 2011 23:54:18 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

Mike,

On 01/19/2011 11:43 PM, Ralf Wildenhues wrote:
> * Mike Gran wrote on Wed, Jan 19, 2011 at 06:26:24PM CET:
>>     pkgsitedir="$datadir/$PACKAGE_NAME"
>>     AC_MSG_WARN([]
>>        [The modules will be installed in ${pkgsitedir}.])
>>
>> When I run it, I get the text
>>
>>     configure: WARNING:
>>        The modules will be installed in ${datarootdir}/blammo.
>>
>> Is there a way to have this warning output the full path, e.g.
>> for it to say something like
>>
>>        The modules will be installed in /usr/local/share/blammo
> Try
>
> pkgsitedir="$datadir/$PACKAGE_NAME"
> eval "expanded_pkgsitedir=\"$pkgsitedir\""
> eval "expanded_pkgsitedir=\"$expanded_pkgsitedir\""
> AC_MSG_NOTICE([]
>    [The modules will be installed in ${expanded_pkgsitedir}.])
>
> but please don't use the expanded value elsewhere; see the FAQ
>   info Autoconf "Defining Directories"
>
> and references therein.  Hope that helps.
>

I was answering when Ralf's answer came though, so I thought I'd comment
on his solution (which was pretty close to mine anyway). While this
method works, it does have it's problems.

First of all, you need to know how many levels to expand as you're
writing the code in configure.ac.

Second, you should consider that you're being more accurate when you
tell the user they're installing into ${datarootdir}/blammo. The reason
is that the user still has the option of changing the value of
${datarootdir} on the make install command line, which would override
the hard-coded path you want to display from configure:

  $ make datarootdir=/usr/share install

Perhaps a better message would be:

configure: WARNING:
  The modules will be installed by default in /usr/local/share/blammo
(${datarootdir}/blammo).

Regards,
John




reply via email to

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