Hello Jason, On Mon, Jun 04, 2007 at 07:25:16PM +0200, Jason Curl wrote: > Sounds like my best solution would be to use the "sysconf_DATA" option.
this was also the fist solution which came to my mind. > Any ideas how to take 'sysconfdir' and somehow import it into my program > so it knows where the default configuration files are? See `info Autoconf FAQ defining' for general instructions. A correction, though: I'd use AM_CPPFLAGS = -DDATADIR='"$(datadir)"' instead of modifying CPPFLAGS. I think it is OK to use the default value of sysconfdir and let the user configure with --sysconfdir=/etc if that is what they want. (GNU/Linux distributions often set that in their build scripts.) It is possible to do some hacks in configure.ac so that the default is /etc. (And you can then use DISTCHECK_CONFIGURE_FLAGS to revert that change for distcheck, so that it passes.) > 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. I guess that in that case it might be best to foget about sysconf_DATA, and use install-exec-local for the installation of the config file. (You would use EXTRA_DIST to distribute your default config file, of course.) This thread got quite a big quickly; if a particular question remained unansewered, feel free to post it again, under a new subject. Have a nice day, Stepan Kasal