[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting the 'sysconfdir'
From: |
Jason Curl |
Subject: |
Getting the 'sysconfdir' |
Date: |
Mon, 04 Jun 2007 22:04:04 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (Windows/20070326) |
From previous posts to automake, it appears the best way to manage my
configuration files is using $(sysconfdir)
So in my configure.ac I have the following that my program can use to
find out where the configuration directory was configured to pull in the
default when the user doesn't provide an alternative.
AC_DEFINE_UNQUOTE(SYSCONFDIR, [$sysconfdir], [Configuration directory])
What doesn't work, $sysconfdir = ${prefix}/etc as default. This means I
need to recursively substitute until I have a complete path. How can I
do this?
So I need to figure out how to generate a full path name. It doesn't
seem desirable to use the path of the program as a base, as
--sysconfdir= can be independent of --prefix. Further, printing the
contents of $prefix returns "NONE" instead of what I would have expected
'/usr/local'. If one is provided then it shows what I expect.
Thanks,
Jason.
- Getting the 'sysconfdir',
Jason Curl <=