--+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi again, On Mon, May 20, 2002 at 10:55:39AM +0300, Tommi Hassinen wrote: > At the moment the version is temporarily set at the beginning of the > qm1e_mpqc.h file. As you can see there (and from old Makefiles as > well) the code expects an > > MPQC_VERSION > > A one way to get the version numver would be to run > > sc-config --version Actually, sc-config --version is already parsed by aclocal.m4, I just didn't AC_SUBST the versions. Patch attached. Maybe you want to adjust the minimal libsc-version in configure.in, I don't know. > which returns the full version number (like 2.1.0). However, the > #if() preprocessor statements seem to require int paramters (no floats or > strings) so someway this output should be converted to an int value and > then stored to the MPQC_VERSION macro. For portability, I kept with $SC_MAJOR_VERSION, it's no problem to do #define MPQC_VERSION = @SC_MAJOR_VERSION@ in src/common/qm1e_mpqc.h.in along adding qm1e_mpqc.h to AC_OUTPUT. This works nicely here (I did not yet try to compile stuff though) bye, Michael --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aclocal.diff" --- /home/mbanck/src/cvs/ghemical/aclocal.m4 Sun Jan 6 00:00:11 2002 +++ ghemical-test/aclocal.m4 Mon May 20 11:12:27 2002 @@ -586,7 +586,7 @@ exit(1); } - if (/*($sc_major_version > major) || * libsc is not backwards compatible ATM */ + if (($sc_major_version > major) || (($sc_major_version == major) && ($sc_minor_version > minor)) || (($sc_major_version == major) && ($sc_minor_version == minor) && ($sc_micro_version >= micro))) { @@ -666,6 +666,12 @@ SC_LIBS="" ifelse([$3], , :, [$3]) fi + SC_MAJOR_VERSION="$sc_major_version" + SC_MINOR_VERSION="$sc_minor_version" + SC_MICRO_VERSION="$sc_micro_version" + AC_SUBST(SC_MAJOR_VERSION) + AC_SUBST(SC_MINOR_VERSION) + AC_SUBST(SC_MICRO_VERSION) AC_SUBST(SC_CPPFLAGS) AC_SUBST(SC_LIBS) rm -f conf.sctest --+QahgC5+KEYLbs62--