[Top][All Lists]

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

Re: AC_DEFINE_DIR in autoconf (was: Re: SYSCONFDIR: config.h vs. AM_CFLA

From: Stepan Kasal
Subject: Re: AC_DEFINE_DIR in autoconf (was: Re: SYSCONFDIR: config.h vs. AM_CFLAGS)
Date: Fri, 11 Mar 2005 17:54:32 +0100
User-agent: Mutt/1.4.1i

On Wed, Mar 09, 2005 at 08:06:18PM +0100, Baurjan Ismagulov wrote:
> What I don't understand is why the manual states that AC_DEFINE_DIR does
> not conform with GNU codings standards.
> If I define DATADIR in CPPFLAGS, it is hard-coded into the binary, and
> the user can override the prefix during make install. This behaviour is
> not declared non-conforming.

If you set
        CPPFLAGS="$CPPFLAGS -DDATADIR='\$(datadir)'"
        CPPFLAGS="$CPPFLAGS "'-DDATADIR="$(datadir)"'

in your, then the $(datadir) part is expanded by make.

So you can do

./configure --prefix=oneprefix

make prefix=anotherprefix

make prefix=yetanother install

Your config.h approach doesn't allow the user to redifine prefix for
"make all", even though it allows them to redefine it for "make install".

(Not that I know what is this requirment good for.  I don't advocate the
standard, I just explain what conforms to it and what doesn't.)

Have a nice day,

reply via email to

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