source: branches/samba-3.5.x/source4/build/m4/env.m4

Last change on this file was 414, checked in by Herwig Bauernfeind, 16 years ago

Samba 3.5.0: Initial import

File size: 3.1 KB
Line 
1dnl SMB Build Environment Checks
2dnl -------------------------------------------------------
3dnl Copyright (C) Stefan (metze) Metzmacher 2004
4dnl Copyright (C) Jelmer Vernooij 2005,2008
5dnl Released under the GNU GPL
6dnl -------------------------------------------------------
7dnl
8
9AC_SUBST(srcdir)
10export srcdir;
11
12# we always set builddir to "." as that's nicer than
13# having the absolute path of the current work directory
14builddir=.
15AC_SUBST(builddir)
16export builddir;
17
18AC_SUBST(datarootdir)
19
20AC_SUBST(VPATH)
21VPATH="\$(builddir):\$(srcdir)"
22
23SMB_VERSION_STRING=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
24echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
25
26SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
27if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
28 echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
29fi
30SAMBA_VERSION_GIT_COMMIT_DATE=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
31if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
32 echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
33fi
34SAMBA_VERSION_GIT_COMMIT_TIME=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
35if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
36 echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
37
38 # just to keep the build-farm gui happy for now...
39 echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
40fi
41
42m4_include(build/m4/check_path.m4)
43m4_include(../m4/check_perl.m4)
44
45AC_SAMBA_PERL([], [AC_MSG_ERROR([Please install perl from http://www.perl.com/])])
46
47AC_PATH_PROG(YAPP, yapp, false)
48
49m4_include(build/m4/check_cc.m4)
50m4_include(build/m4/check_ld.m4)
51m4_include(../m4/check_make.m4)
52
53AC_SAMBA_GNU_MAKE([AC_MSG_RESULT(found)], [AC_MSG_ERROR([Unable to find GNU make])])
54AC_SAMBA_GNU_MAKE_VERSION()
55GNU_MAKE_VERSION=$samba_cv_gnu_make_version
56AC_SUBST(GNU_MAKE_VERSION)
57
58new_make=no
59AC_MSG_CHECKING([for GNU make >= 3.81])
60if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/@<:@^\d\.@:>@.*//g; exit (\$_ < 3.81);"; then
61 new_make=yes
62fi
63AC_MSG_RESULT($new_make)
64automatic_dependencies=no
65AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ automatic_dependencies=$new_make ], [])
66AC_MSG_CHECKING([Whether to use automatic dependencies])
67AC_ARG_ENABLE(automatic-dependencies,
68[ --enable-automatic-dependencies Enable automatic dependencies],
69[ automatic_dependencies=$enableval ],
70[ automatic_dependencies=no ])
71AC_MSG_RESULT($automatic_dependencies)
72AC_SUBST(automatic_dependencies)
73
74m4_include(build/m4/check_doc.m4)
75
76m4_include(../m4/check_python.m4)
77
78AC_SAMBA_PYTHON_DEVEL([
79SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
80SMB_ENABLE(EXT_LIB_PYTHON,YES)
81SMB_ENABLE(LIBPYTHON,YES)
82],[
83AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
84])
85
86AC_MSG_CHECKING(python library directory)
87pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
88AC_MSG_RESULT($pythondir)
89
90AC_SUBST(pythondir)
Note: See TracBrowser for help on using the repository browser.