I have an variable declared in configure.ac:
MY_VERSION="0:0:0"
AC_SUBST(MY_VERSION)
AC_MSG_NOTICE([$MY_VERSION])
The value of the variable is printed out correctly during ./configure phase.
In Makefile.am there's following line:
libmylib_la_LDFLAGS = -version-info @MY_VERSION@
In the linker command line it expands correctly to "-version-info 0:0:0" on all systems except Solaris. On solaris (SunOS 5.10 Generic_141414-10 sun4u sparc SUNW,Sun-Blade-100) I get "-version-info" with no version number.
Any idea what may have gone wrong?
(A bit of a shot in the dark here, but…)
My guess would be that either MY or VERSION get defined on Solaris for whatever reason. Try usign
AC_SUBST([MY_VERSION])
instead, this way you're telling M4 to explicitly define that.
Also as Igor said, use $(MY_VERSION)
(although it is unrelated to this.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With