On 12/14/2010 02:10 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> I just ran into an issue where libvirt failed to compile when autotooled
>> with automake 1.9.6, because automake failed to define $(localedir) and
>> therefore gnulib's configmake module did not define LOCALEDIR. Any
>> suggestions on how to make gnulib guarantee $(localedir) will be defined
>> even when using older automake, such as an extra snippet of code to
>> include in Makefile.am, and which will not interfere when using newer
>> automake?
>
> In Makefile.am add:
>
> localedir = @localedir@
>
> In configure.ac add:
>
> dnl Installation directories.
> dnl Remove this when you can assume autoconf >= 2.60.
> AC_SUBST([localedir], ['${datadir}/locale'])But the Makefile.am in question is generated by gnulib. Adding it to the top level won't affect the generation of configmake.h. I'm going for a different approach, I'm in the middle of testing this (well, expanding it further for fallbacks for all of the variables, including LOCALEDIR): diff --git i/ChangeLog w/ChangeLog index c9c467c..bf7f17b 100644 --- i/ChangeLog +++ w/ChangeLog @@ -1,3 +1,9 @@ +2010-12-14 Eric Blake <[email protected]> + + configmake: support more values with older automake + * modules/configmake (Makefile.am): Provide fallbacks for older + automake. + 2010-12-13 Eric Blake <[email protected]> cloexec, fcntl: relax license diff --git i/modules/configmake w/modules/configmake index d826c13..a19f3da 100644 --- i/modules/configmake +++ w/modules/configmake @@ -25,6 +25,7 @@ Makefile.am: # Listed in the same order as the GNU makefile conventions. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. +# Support newer definitions even when using older automake 1.9.6 configmake.h: Makefile $(AM_V_GEN)rm -f $...@-t && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -35,6 +36,9 @@ configmake.h: Makefile echo '#define LIBEXECDIR "$(libexecdir)"'; \ echo '#define DATAROOTDIR "$(datarootdir)"'; \ echo '#define DATADIR "$(datadir)"'; \ + echo '#ifndef DATAROOTDIR'; \ + echo '# define DATAROOTDIR DATADIR'; \ + echo '#endif; \ echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
