Automake, and #defines...



Hi all,

I was wondering if you could help me out here.  I've run into a bit of
a problem with GnomeHack.  I've been working on the install proceedure,
and run into the following problem.  If you run ./autogen.sh and then 
compile and install, you get the following error:

    andersen:/home/andersen/gnome/nethack % nethack
    ${exec_prefix}/lib/gnomehack: No such file or directory
    Cannot chdir to ${exec_prefix}/lib/gnomehack.

This comes as a result of the "else" in the following section of configure.in:

    HACKLIBDIR=""
    dnl Check for cmd line arg for alternate hackdir
    AC_MSG_CHECKING(for alternate NetHack data directory)
    if eval "test x$alt_hackdir != xno"
    then        AC_MSG_RESULT($alt_hackdir)
	    AC_DEFINE_UNQUOTED(HACKDIR, "$alt_hackdir")
	    HACKLIBDIR="$alt_hackdir"
    else
	    AC_MSG_RESULT(no)
	    HACKLIBDIR='${libdir}/${PACKAGE}'
	    AC_DEFINE_UNQUOTED(HACKDIR, "$libdir/$PACKAGE")
					 ^^^^^^^^^^^^^^^^^
    fi

The marked up part is setting up a #define that is used when compiling.
Unfortunatly, it looks like what is going into include/config.h is:
    #define HACKDIR "${exec_prefix}/lib/gnomehack"
instead of what I would expect, which would be something like:
    #define HACKDIR "/usr/local/lib/gnomehack"

Does anyone know how to tell automake and friends to fully expand the
variables being set into #defines?

Thanks!

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--



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