[Top][All Lists]

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

Re: make distcheck and the /etc dir

From: deckrider
Subject: Re: make distcheck and the /etc dir
Date: Mon, 4 Jun 2007 13:55:28 -0600

On 6/4/07, Jason Curl <address@hidden> wrote:
Daniel Leidert wrote:
> BTW: If you use
> etcdir=${sysconfdir}
> you can set
> DISTCHECK_CONFIGURE_FLAGS = --sysconfdir=/etc
> And if you want to make this the default, set it in your configure
> script:
> AC_SUBST([sysconfdir],[/etc])
> However, you should carefully think about this. I personally would leave
> it up to the user to choose a directory.

After comments from previous posts I'm thinking how I can then take the
prefix the user provided and put that in "config.h" that the program can
then read to know where the configuration files are. I'll now have to
learn how to extend the installation to make backups of any old
configurations that might be there.

Doing AC_SUBST([sysconfdir],[/etc]) brings back the original problem and
doesn't help.

When you use automake, you get all these nice user-controlled things
like --prefix and --sysconfdir (even if you don't want them).  I
generally advise to use them instead of working to not use them,
thereby confusing the user who might be running './configure --help'
and seeing that they exist and finding later that your packages is
working to ignore them.

You may find some additional interesting information here (automake
uses autoconf):

In short, assuming that the you are working
on controls the installation of the c/c++ compiled software that wants
to look for this configuration file, I would recommend against any stuff and instead do something like this in your

AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)"\

This works because automake will supply you with a sysconfdir value
(either a default one, or one provided by the user).

reply via email to

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