build - How to deal with multiple versions of Automake in configure.ac -
i selectively omit flags in call am_init_automake in configure.ac depending on automake version. there way that?
the specific problem i'm dealing automake 1.12 introduced portability-related warnings (-wextra-portability , -wportability) i'd disable (since use -wall , -werror can't ignore irrelevant warnings):
am_init_automake([-wall -werror -wno-extra-portability -wno-portability gnu foreign]) this works fine automake 1.12, earlier versions of automake error out because don't know flags. there way include flags if we're running automake >= 1.12?
i tried using m4_version_compare didn't work (plus don't think makes sense use since checks autoconf version, not automake version...)
here's solution similar problem involves patching configure.ac in autogen.sh, avoid...
the short answer no, can't cleanly in automake. if want you'll have patch configure.ac in bootstrap script (autogen.sh).
easier still, require automake 1.12.
the problem automake version number want compare (written configure am__api_version) not provided in m4sugar layer. not having information there makes hard fix past versions of automake.
edit: thought of different way of way of doing same thing without patching configure.ac using autogen.sh, end result same. make dist tarball still have "baked in" version of automake options based on automake version of whoever built tarball. no different setting automake version options.
Comments
Post a Comment