On 08/29/2014 03:01 PM, Shawn H Corey wrote:
I'm new to all this but can this be done?
m4_define([MAJOR_VERSION], [1])
m4_define([MINOR_VERSION], [0])
m4_define([PATCH_VERSION], [0])
m4_define([VERSION],[MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION])
AC_INIT(foo,[VERSION])
AM_INIT_AUTOMAKE(foo,[VERSION])
That's odd. When I add the m4_define([VERSION],...) command to my
configure.in script and run make, the build process throws a bunch of
warning and error messages. The build process manages to stop due to an
error, whose error message is as follows:
configure: error: C compiler cannot create executables
After checking the output in config.log, I find this:
ze@debian:build$ tail config.log
#define PACKAGE_NAME "foo"
#define PACKAGE_TARNAME "foo"
#define PACKAGE_VERSION "1.0.0"
#define PACKAGE_STRING "foo 1.0.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "foo"
#define 0.0.0 "x.0.0"
So, it appears that defining the VERSION variable ends up replacing the
VERSION string in the output with the definition provided by the newly
added m4_define() line.
Zé
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf