prepare the mkversion.sh infrastructure for git branches in the build-farm
[ira/wip.git] / source / build / m4 / env.m4
1 dnl SMB Build Environment Checks
2 dnl -------------------------------------------------------
3 dnl  Copyright (C) Stefan (metze) Metzmacher 2004
4 dnl  Released under the GNU GPL
5 dnl -------------------------------------------------------
6 dnl
7
8 AC_SUBST(srcdir)
9 export srcdir;
10
11 # we always set builddir to "." as that's nicer than
12 # having the absolute path of the current work directory
13 builddir=.
14 AC_SUBST(builddir)
15 export builddir;
16
17 AC_SUBST(datarootdir)
18
19 SMB_VERSION_STRING=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
20 echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
21
22 SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
23 if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
24         echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
25 fi
26 SAMBA_VERSION_GIT_COMMIT_DATE=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
27 if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
28         echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
29 fi
30 SAMBA_VERSION_GIT_COMMIT_TIME=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
31 if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
32         echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
33
34         # just to keep the build-farm gui happy for now...
35         echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
36 fi
37
38 m4_include(build/m4/check_path.m4)
39 m4_include(build/m4/check_perl.m4)
40 m4_include(build/m4/check_cc.m4)
41 m4_include(build/m4/check_ld.m4)
42 m4_include(build/m4/check_make.m4)
43 m4_include(build/m4/check_doc.m4)