r13241: Work around missing AS_HELP_STRING definition in autoconf 2.57. Fix
[amitay/samba.git] / source4 / 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_CANONICAL_HOST
9
10 AC_SUBST(srcdir)
11 export srcdir;
12
13 dnl AS_HELP_STRING is not available in autoconf 2.57, and AC_HELP_STRING is deprecated
14 dnl in autoconf 2.59, so define AS_HELP_STRING to be AC_HELP_STRING unless it is already
15 dnl defined.
16 m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
17
18 # we always set builddir to "." as that's nicer than
19 # having the absolute path of the current work directory
20 builddir=.
21 AC_SUBST(builddir)
22 export builddir;
23
24 SMB_VERSION_STRING=`cat ${srcdir}/include/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
25 echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
26
27 SAMBA_VERSION_SVN_REVISION=`cat ${srcdir}/include/version.h | grep 'SAMBA_VERSION_SVN_REVISION' | cut -d ' ' -f3-`
28 if test -n "${SAMBA_VERSION_SVN_REVISION}";then
29         echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}"
30 fi
31
32 sinclude(build/m4/check_path.m4)
33 sinclude(build/m4/check_perl.m4)
34 sinclude(build/m4/check_cc.m4)
35 sinclude(build/m4/check_ld.m4)
36 sinclude(build/m4/check_types.m4)
37 sinclude(build/m4/check_doc.m4)