autoconf
[Top][All Lists]
Advanced

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

How to substitute variables in script files? (Why is $prefix set to NONE


From: Stefano Sabatini
Subject: How to substitute variables in script files? (Why is $prefix set to NONE?)
Date: Thu, 1 Mar 2007 13:15:13 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

I'm working on a project when I have a Perl script, call it "script",
which contains some installation dependant paths.

Since I don't want to hardcode them, I created a "script.in" file, which
contains a line with:

my $system_config_file= "@SYSCONF_DIR@/script.conf";

and placed this snippet in configure.ac:

dnl $sysconfdir contains "${prefix}/etc, so I have to
dnl eval it another time
eval "eval SYSCONF_DIR=$sysconfdir"

AC_SUBST(SYSCONF_DIR)

AC_CONFIG_FILES(script)

This works mainly as expected, but in the script file I get:

my $system_config_file= "NONE/etc/pac.conf";
                         ^^^^

What am I missing?

Another question: in the case it's possible to get this working, is it
a standard/recommended technique (I see examples using simply sed
translations in the Makefile to achieve the same effect)?

Any help will be highly appreciated.
Thanks in advance
-- 
Stefano Sabatini
Linux user number 337176 (see http://counter.li.org)




reply via email to

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