autoconf
[Top][All Lists]
Advanced

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

Re: Autoheader variable resolution


From: Eric Blake
Subject: Re: Autoheader variable resolution
Date: Fri, 09 Jan 2009 18:56:10 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to ptriller on 1/9/2009 10:26 AM:
> Hello,
> 
> I have a little problem, I want to make my own authheader variable:
> 
> gladedir="${datadir}/myApp"
> gladefile="${gladedir}/client.glade"
> AC_DEFINE_UNQUOTED(GLADE_FILE, "${gladefile}", Glade file for client)

This topic came up last month:
http://lists.gnu.org/archive/html/autoconf/2008-12/msg00040.html

$datadir is intentionally unexpanded at configure-time, in order to meet
GNU Coding Standards that it can be changed at make-time.  The best
solution is to not expect AC_DEFINE_UNQUOTED to do the work, but rather to
use a Makefile snippet that expands the variable during make-time into a
helper file (but not config.h), which you then include in your sources.

For an example of how gnulib does this, see the configmake module:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=modules/configmake;h=5160128;hb=78f5fbf

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkloADoACgkQ84KuGfSFAYDj4ACeP4/XUpELkt5EiB5Nm6jWOiD5
B7MAnjTZvk+AUiUNjWMFyFluCMoYVULy
=Z955
-----END PGP SIGNATURE-----




reply via email to

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