deckrider wrote:
On 6/4/07, Jason Curl <[EMAIL PROTECTED]> wrote:
Hello,

I have a project where the program expects the configuration files to be
stored in '/etc/lx2005'. Appropriately, I've got such a Makefile.am:

   # Makefile.am for installing configuration data
   etcdir=/etc/lx2005

I often struggle with this, and have to refer to this FAQ:

http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths

Very useful, thankyou Sir.

Sounds like my best solution would be to use the "sysconf_DATA" option. Any ideas how to take 'sysconfdir' and somehow import it into my program so it knows where the default configuration files are?

I might have to change my policy to not bother looking in various directories for configuration files (see my post reply to Noah), which depends on an answer to above. Or does somebody else have an algorithm to calculate where the configuration files are based on the location of the executable (relatively system portable).

I'm also concerned about overwriting a users old configuration file. So any ideas how I can operate on any existing files before they're overwritten? For example, I might try a merge, or just copy the files as a backup before overwriting them.

Thanks,
Jason.


Reply via email to