autoconf
[Top][All Lists]
Advanced

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

Re: $sysconfdir substitution


From: Gavin Smith
Subject: Re: $sysconfdir substitution
Date: Fri, 10 Jun 2016 19:33:22 +0100

On 10 June 2016 at 07:10, Kip Warner <address@hidden> wrote:
> I'd like to make the fully expanded $sysconfdir shell variable
> available within a file processed via AC_CONFIG_FILES. I am currently
> trying AC_SUBST([SYSCONFDIR], [$sysconfdir]), but it is not fully
> evaluated at ${prefix}/etc which is useless for me. Any ideas?
>
> Regards,

It's possible to communicate shell variables with AM_CPPFLAGS. I wrote
about this method at
http://buildsystem-manual.sourceforge.net/Adding-a-data-file-to-be-installed.html#Adding-a-data-file-to-be-installed.
For convenience, I've attached a small project that uses this method.

There are very likely other methods as well. For example, you could
use AC_DEFINE or AC_DEFINE_UNQUOTED with AC_CONFIG_HEADER.

Your question reminds me of this:
http://lists.gnu.org/archive/html/autoconf/2015-09/msg00015.html It
seems to be hard to get ahold of the values of the shell variables
with directories in them from within the configure script.

Attachment: helloprog-1.0.tar.xz
Description: application/xz


reply via email to

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