generate switch_version.h in autotools builds.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@290 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e9a22439d8
commit
49a0eb2955
16
configure.in
16
configure.in
|
@ -8,12 +8,23 @@ AC_CONFIG_SRCDIR([src/switch.c])
|
||||||
AC_CONFIG_HEADER([src/include/config.h])
|
AC_CONFIG_HEADER([src/include/config.h])
|
||||||
|
|
||||||
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
|
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
|
AC_PATH_PROGS(SVNVERSION, svnversion, [echo Missing subversion so some stuff will be borked],${PATH}:/opt/csw/bin)
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
# SVN Revision number, needed for FREESWITCH_VERSION
|
||||||
|
if test -n "$SVNVERSION" ; then
|
||||||
|
AC_DEFINE_UNQUOTED([SVN_VERSION],"`${SVNVERSION} . -n",[Which Subversion revision are we building here ?] )
|
||||||
|
AC_SUBST([SVN_VERSION])
|
||||||
|
else
|
||||||
|
AC_DEFINE_UNQUOTED([SVN_VERSION],"UNKNOWN",[Unknown Subversion because it's not on this machine.] )
|
||||||
|
AC_SUBST([SVN_VERSION])
|
||||||
|
fi
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
@ -33,6 +44,9 @@ AC_TYPE_SIGNAL
|
||||||
AC_FUNC_STRFTIME
|
AC_FUNC_STRFTIME
|
||||||
AC_CHECK_FUNCS([gethostname vasprintf])
|
AC_CHECK_FUNCS([gethostname vasprintf])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
|
||||||
AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
|
AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
|
||||||
|
@ -40,4 +54,4 @@ AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT([src/include/switch_version.h])
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
||||||
|
|
||||||
#define FREESWITCH_VERSION_MAJOR 1
|
#define FREESWITCH_VERSION_MAJOR 1
|
||||||
#define FREESWITCH_VERSION_MINOR 0
|
#define FREESWITCH_VERSION_MINOR 0
|
||||||
#define FREESWITCH_VERSION_REVISION
|
#define FREESWITCH_VERSION_REVISION @SVN_VERSION@
|
||||||
#define FREESWITCH_VERSION_FULL FREESWITCH_VERSION_MAJOR.FREESWITCH_VERSION_MINOR.FREESWITCH_VERSION_REVISION
|
#define FREESWITCH_VERSION_FULL FREESWITCH_VERSION_MAJOR.FREESWITCH_VERSION_MINOR.FREESWITCH_VERSION_REVISION
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -112,7 +112,7 @@ If BuildCore Then
|
||||||
VERSION=strFromProc
|
VERSION=strFromProc
|
||||||
Loop While Not OExec.StdOut.atEndOfStream
|
Loop While Not OExec.StdOut.atEndOfStream
|
||||||
|
|
||||||
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "#define FREESWITCH_VERSION_REVISION", "#define FREESWITCH_VERSION_REVISION " & VERSION
|
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "@SVN_VERSION@", VERSION
|
||||||
|
|
||||||
If Not FSO.FolderExists(LibDestDir & "include") Then
|
If Not FSO.FolderExists(LibDestDir & "include") Then
|
||||||
FSO.CreateFolder(LibDestDir & "include")
|
FSO.CreateFolder(LibDestDir & "include")
|
||||||
|
|
Loading…
Reference in New Issue