Unexpanded placeholders in gdlib-config; same placeholder used for two different purposes

Issue #140 resolved
ryandesign
created an issue

Hello, I am the maintainer of gd2 in the MacPorts package management system. I noticed this problem:

$ port -v installed gd2
The following ports are currently installed:
  gd2 @2.1.1_0+universal+x11 (active) platform='darwin 14' archs='i386 x86_64'
$ gdlib-config --version
2.1.1
$ gdlib-config --majorversion
@GDLIB_MAJOR@
$ gdlib-config --minorversion
@GDLIB_MINOR@
$ gdlib-config --revision
0

The placeholders @GDLIB_MAJOR@ and @GDLIB_MINOR@ are not expanded in gdlib-config, and the placeholder @GDLIB_REVISION@ was expanded to the wrong value.

The responsible code from configure.ac:

# This is not used anywhere.  However, Makefile.netware searches
# through configure for these definitions to find the version numbers.
# (Assuming anyone still uses Netware, that should be changed to use
# gd.h via getver.pl instead.)
GDLIB_MAJOR=gd_MAJOR
GDLIB_MINOR=gd_MINOR
GDLIB_REVISION=gd_REVISION
GDLIB_EXTRA=gd_EXTRA
GDLIB_VERSION=gd_PKG_VERSION

# Dynamic library version information
# See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info

GDLIB_CURRENT=3
GDLIB_REVISION=0
GDLIB_AGE=0
AC_SUBST(GDLIB_CURRENT)
AC_SUBST(GDLIB_REVISION)
AC_SUBST(GDLIB_AGE)

Note that:

  • the comment that "This is not used anywhere" is false (it is used in gdlib-config.in)
  • AC_SUBST has not been used to expand GDLIB_MAJOR and GDLIB_MINOR
  • GDLIB_REVISION is being set to two different values

Also, this issue tracker is missing the value "2.1.1" in the Version drop-down menu; please add it.

Comments (3)

  1. Log in to comment