diff --git a/configure.in b/configure.in index e77b1991ab..df61ba073b 100644 --- a/configure.in +++ b/configure.in @@ -8,12 +8,23 @@ AC_CONFIG_SRCDIR([src/switch.c]) AC_CONFIG_HEADER([src/include/config.h]) AC_PREFIX_DEFAULT(/usr/local/freeswitch) + # 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_MAKE_SET AC_PROG_LIBTOOL 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. AC_HEADER_DIRENT AC_HEADER_STDC @@ -33,6 +44,9 @@ AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_CHECK_FUNCS([gethostname vasprintf]) + + + AC_CONFIG_FILES([Makefile]) 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]) diff --git a/src/include/switch_version.h.in b/src/include/switch_version.h.in index ff7e3b49c1..158095a96d 100644 --- a/src/include/switch_version.h.in +++ b/src/include/switch_version.h.in @@ -39,7 +39,7 @@ extern "C" { #define FREESWITCH_VERSION_MAJOR 1 #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 #ifdef __cplusplus diff --git a/w32/vsnet/GetLibs.vbs b/w32/vsnet/GetLibs.vbs index 2878a0728d..7c1974a99a 100644 --- a/w32/vsnet/GetLibs.vbs +++ b/w32/vsnet/GetLibs.vbs @@ -112,7 +112,7 @@ If BuildCore Then VERSION=strFromProc 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 FSO.CreateFolder(LibDestDir & "include")