Hello,

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])
-------------------------------------------------------

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

#define CONFIG_DATA_DIR "${prefix}/share/celestia"

I know the autoconf manual says:

"A corollary is that you should not use these variables except in
Makefiles. For instance, instead of trying to evaluate datadir in
`configure' and hard-coding it in Makefiles using e.g.,
`AC_DEFINE_UNQUOTED(DATADIR, "$datadir")', you should add
`-DDATADIR="$(datadir)"' to your CPPFLAGS."

But is that really the best solution?

Also, is the following still in any way relevant?:

if (test "$prefix" = "NONE"); then
        prefix=$ac_default_prefix
fi

It seems the $prefix is generally set to a sane default value.

Thanks!
--Pat


Reply via email to