autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_SUBST bug?


From: Etienne M. Gagnon
Subject: AC_SUBST bug?
Date: Sun, 19 Aug 2001 19:31:53 -0400

Hi.

I have nailed down a build problem to AC_SUBST calls in configure.ac.

My work-in-progress version of SableVM uses autoconf (2.52-1), automake
(1.4-p4-1) and libtool (1.4b-3) on Debian GNU/Linux (unstable, x86).

Here's the relevant part of configure.ac:

--- BEGIN ---
PACKAGE="sablevm"
VERSION="0.1.6"
LIBVERSION="0:6:0"

AC_INIT(${PACKAGE}, ${VERSION}, ${BUG-REPORT-ADDRESS})
AC_CONFIG_SRCDIR([src/sablevm/sablevm.c])

AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(LIBVERSION)
...
--- END ---

and the related part in src/libsablevm/Makefile.am:

--- BEGIN ---
lib_LTLIBRARIES = libsablevm.la
...
libsablevm_la_LIBADD = -lpthread -lm -ldl -lffi -lltdl
libsablevm_la_LDFLAGS = -version-info @LIBVERSION@
...
--- END ---

The problem is that "make" fails with the following error message:

$ make
... 
/bin/sh ../../libtool --mode=link gcc  -g -O2 -Wall -W -Wundef -Wshadow
... /* I am stripping lots of output text */
libsablevm.la -rpath /home/egagnon/work/lib -version-info  libsablevm.lo
...
libtool: link: CURRENT `libsablevm.lo' is not a nonnegative integer
libtool: link: `libsablevm.lo' is not valid version information
make[3]: *** [libsablevm.la] Error 1

What happens is that @LIBVERSION@ expands to nothing!  I've checked this
in both configure and src/libsablevm/Makefile.

The following does not work either:

--- BEGIN ---
PACKAGE="sablevm"
VERSION="0.1.6"
LIBVERSION="0:6:0"

AC_INIT(${PACKAGE}, ${VERSION}, ${BUG-REPORT-ADDRESS})
AC_CONFIG_SRCDIR([src/sablevm/sablevm.c])

AC_SUBST(PACKAGE, ${PACKAGE})
AC_SUBST(VERSION, ${VERSION})
AC_SUBST(LIBVERSION, ${LIBVERSION})
...
--- END ---

But, the following works:

--- BEGIN ---
PACKAGE="sablevm"
VERSION="0.1.6"
BUG-REPORT-ADDRESS="http://www.sablevm.org/";
LIBVERSION="0:6:0"

AC_INIT(${PACKAGE}, ${VERSION}, ${BUG-REPORT-ADDRESS})
AC_CONFIG_SRCDIR([src/sablevm/sablevm.c])

AC_SUBST(PACKAGE, [sablevm])
AC_SUBST(VERSION, [0.1.6])
AC_SUBST(LIBVERSION, [0:6:0])
...
--- END ---

The problem is that I do not like the duplication.  I thought using
AC_SUBST caused the evaluation of shell variables (and this used to work
with previous autoconf versions).  Maybe (or surely;-) I am missing an
important point.

Thanks for your help,

Etienne
-- 
Etienne M. Gagnon                                    address@hidden
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]