Re: [[email protected]: problem with hdup 2.0.8-1]
"Francesco P. Lovergine" <[email protected]> Thu, 30 Jun 2005 12:37:30 +0200
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 30, 2005 at 12:14:24PM +0200, Miek Gieben wrote:
> [On 30 Jun, @12:00, Francesco Paolo Lovergine wrote in "[hdup-user] [torsten@torsten-s ..."]
> > 2.0.8 hdup.h.in fucks configure directive for sysconfdir, I'm using
> > currently
> >
> > --- hdup.h.in 2005-03-18 11:10:17.000000000 +0100
> > +++ /tmp/hdup.h.in 2005-06-30 11:41:51.000000000 +0200
> > @@ -22,7 +22,7 @@
> > #define LZOP_PROG "@lzop@"
> > #define SPLIT_PROG "@split@"
> > #define UNSPLIT_PROG "@cat@"
> > -#define ETCFILE "@prefix@/etc/hdup/hdup.conf"
> > +#define ETCFILE "@sysconfdir@/hdup.conf"
> > /* /usr/local/etc#"/etc/hdup/hdup.conf") */
> > #define REMOTE_HDUP "@prefix@/sbin/hdup"
> > #define REMOTE_HDUP_OPT "" /* default is empty */
> >
> > Probably sysconfdir=/etc is better to be coherent with install target, anyway.
> > So,
> >
> > #define ETCFILE "@sysconfdir@/hdup/hdup.conf"
> >
> > else it will break installation under different roots.
>
> ever since I start using autoconf for compiling hdup this has been a
> problem. If I apply this patch, the following situation occurs:
>
> % autoconf;./configure
> % grep ETCFILE src/hdup.h
> #define ETCFILE "${prefix}/etc/hdup/hdup.conf"
>
> ugly ${prefix} is left in the source...
>
> % autoconf;./configure --sysconfdir=/etc/
> % grep ETCFILE src/hdup.h
> #define ETCFILE "/etc//hdup/hdup.conf"
>
> Which looks okay, but requires the --sysconfdir switch. Any ideas how
> to make the plain configure work correctly?
>
> Thanks,
>
> grtz Miek
There are many variants you can use. I would suggest to use your own
variable $hdupconfdir which will be set and exported within configure.ac
on the basis of values assigned to prefix and/or sysconfdir, for
instance. You could also generate pathname files by AC_OUTPUT_COMMANDS.
Check my radius server build scripts for instance (yardradius.org)
to see an example of possible solutions...
1.1 version uses the most recente autoconf, so hacks used there
work for sure with your own ones too.
cheers
--
Francesco P. Lovergine