GNOME Bugzilla – Bug 780601
aalib-config prefix argument is not forwarded correctly
Last modified: 2017-03-28 08:45:31 UTC
When '--with-aalib-prefix' is sets 'aalib_args' with '--prefix' as so: if test x$aalib_prefix != x ; then aalib_args="$aalib_args --prefix=$aalib_prefix" if test x${AALIB_CONFIG+set} != xset ; then AALIB_CONFIG=$aalib_prefix/bin/aalib-config fi fi This is then used to invoke 'aalib-config' with the correct prefix. However, the use of 'aalib_args' is inconsistent. It is used as 'aalibconf_args' and 'aalib_config_args' rather than 'aalib_args' AALIB_CFLAGS=`$AALIB_CONFIG $aalibconf_args --cflags` AALIB_LIBS=`$AALIB_CONFIG $aalibconf_args --libs` aalib_major_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` aalib_minor_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` aalib_micro_version=`$AALIB_CONFIG $aalib_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` This results in host flags being returned because the '--prefix' is not forwarded on correctly. The fix is to use 'aalib_args' for all of the invocations of 'aalib-config' as so: AALIB_CFLAGS=`$AALIB_CONFIG $aalib_args --cflags` AALIB_LIBS=`$AALIB_CONFIG $aalib_args --libs` aalib_major_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` aalib_minor_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` aalib_micro_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
Thanks for the bug report, Matt. Do you want to propose a patch? If so, could you attach it to this bug report in 'git format-patch' format please?
Ah, my autotools is a bit rusty. Had a look at the configure.ac and it's actually the aalib.m4 that is incorrect (http://aa-project.cvs.sourceforge.net/viewvc/aa-project/aalib/aalib.m4?revision=1.2&view=markup). Will push the patch upstream. That project seems pretty dead though. Will notify the various package maintainers.
If upstream is not entirely dead, it might be better to add a pkg-config .pc file for aalib. These foo-config scripts have gone out of style about 20 years ago :)
Upstream patch: https://sourceforge.net/p/aa-project/patches/9/ Arch Linux package bug: https://bugs.archlinux.org/task/53482 If this patch gets accepted I'll work with the merge master to get a .pc file added.