Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automake: variable not expanded on Solaris

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?

like image 847
Martin Sustrik Avatar asked Nov 11 '22 23:11

Martin Sustrik


1 Answers

(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.)

like image 57
Diego Elio Pettenò Avatar answered Dec 16 '22 18:12

Diego Elio Pettenò