automake
[Top][All Lists]
Advanced

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

Re: ${prefix} expansion broken?


From: Ralf Wildenhues
Subject: Re: ${prefix} expansion broken?
Date: Wed, 30 Aug 2006 09:39:43 +0200
User-agent: Mutt/1.5.12 (2006-08-10)

Hello Pat,

* Pat Suwalski wrote on Wed, Aug 30, 2006 at 06:51:28AM CEST:
> 
> My configure.in has the following snippet:
> 
> -------------------------------------------------------
> PKGDATADIR=`eval echo "${datadir}/$PACKAGE"`
> 
> AC_SUBST(PKGDATADIR)
> 
> AC_DEFINE_UNQUOTED(CONFIG_DATA_DIR, "$PKGDATADIR",
>                    [The directory where our data will be installed])
> -------------------------------------------------------

This is broken; please read:
http://www.gnu.org/software/autoconf/manual/html_node/Defining-Directories.html
http://www.gnu.org/software/autoconf/manual/html_node/Installation-Directory-Variables.html

> With automake-1.7 it properly expanded. With automake-1.9, my config.h
> has the following in it:

This is likely caused by an upgrade to Autoconf-2.60, not the Automake
upgrade; this part of autoconf/NEWS explains it:

| ** Directory variables adjusted to recent changes in the GNU Coding Standards.
|   The following directory variables are new:
| 
|     datarootdir   read-only architecture-independent data root [PREFIX/share]
|     localedir     locale-specific message catalogs [DATAROOTDIR/locale]
|     docdir        documentation root [DATAROOTDIR/doc/PACKAGE]
|     htmldir       html documentation [DOCDIR]
|     dvidir        dvi documentation [DOCDIR]
|     pdfdir        pdf documentation [DOCDIR]
|     psdir         ps documentation [DOCDIR]
| 
|   The following variables have new default values:
| 
|     datadir       read-only architecture-independent data [DATAROOTDIR]
|     infodir       info documentation [DATAROOTDIR/info]
|     mandir        man documentation [DATAROOTDIR/man]


> I know the autoconf manual says:
> 
> "A corollary is that you should not use these variables except in
> Makefiles.
*snip*

> But is that really the best solution?

The links provided above point out several possible solutions.  Another
recent one is the Gnulib module `configmake':
http://lists.gnu.org/archive/html/bug-gnulib/2006-08/msg00252.html

Whatever suits you best, the one you've used so far is not supported and
will eventually break again when some other variable change is
necessary.

Hope that helps.

Cheers,
Ralf




reply via email to

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