Autoconf changes for more flexible versioning.
This commit is contained in:
parent
e5348b67a5
commit
a6458c2ed6
3 changed files with 34 additions and 2 deletions
32
configure.ac
32
configure.ac
|
@ -1,7 +1,11 @@
|
|||
dnl Process this file with autogen.sh to produce a working configure
|
||||
dnl script.
|
||||
|
||||
AC_INIT
|
||||
AC_INIT(FlightGear, m4_esyscmd([cat ./version]), [http://www.flightgear.org/])
|
||||
|
||||
dnl Ensure touching the version causes autoconf to re-run
|
||||
AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/version'])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/Airports/simple.cxx])
|
||||
|
||||
dnl Require at least automake 2.52
|
||||
|
@ -10,7 +14,31 @@ AC_PREREQ(2.52)
|
|||
dnl Initialize the automake stuff
|
||||
dnl set the $host variable based on local machine/os
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE(FlightGear, 2.0.0)
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
|
||||
# variables for version.h
|
||||
AC_DEFINE([HAVE_VERSION_H], 1, [Set if version.h is generated])
|
||||
|
||||
# are we running under Hudson? (defines BUILD_ID, BUILD_NUMBER in the environment)
|
||||
if test "x$BUILD_ID" != "x" ; then
|
||||
AC_SUBST([HUDSON_BUILD_ID], $BUILD_ID)
|
||||
AC_SUBST([HUDSON_BUILD_NUMBER], $BUILD_NUMBER)
|
||||
else
|
||||
AC_SUBST([HUDSON_BUILD_ID], [none])
|
||||
AC_SUBST([HUDSON_BUILD_NUMBER], [none])
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG([HAVE_GIT], git, 1)
|
||||
if test "x$HAVE_GIT" != "x" ; then
|
||||
# git might be installed, but we might be building from a tarball
|
||||
if git rev-parse ; then
|
||||
AC_SUBST([REVISION], `git rev-parse HEAD`)
|
||||
else
|
||||
AC_SUBST([REVISION], [none])
|
||||
fi
|
||||
else
|
||||
AC_SUBST([REVISION], [none])
|
||||
fi
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_MAKE_SET
|
||||
|
|
|
@ -28,5 +28,8 @@
|
|||
|
||||
#define FLIGHTGEAR_VERSION "@VERSION@"
|
||||
|
||||
#define HUDSON_BUILD_NUMBER "@HUDSON_BUILD_NUMBER@"
|
||||
#define HUDSON_BUILD_ID "@HUDSON_BUILD_ID@"
|
||||
#define REVISION "@REVISION@"
|
||||
|
||||
#endif // _FLIGHTGEAR_VERSION_H
|
||||
|
|
1
version
Normal file
1
version
Normal file
|
@ -0,0 +1 @@
|
|||
2.2.0
|
Loading…
Reference in a new issue