diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-20 15:34:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:58:53 -0500 |
commit | 61ec62fb2757253a509b57b3e7815c1fb6d0a94b (patch) | |
tree | 83a91f5ff0d9cb9e1d0c1a530fe942cf9950bc25 /source4/build | |
parent | 9ef4e90539c6d262a5fbc36bdde2c8355be3aa56 (diff) | |
download | samba-61ec62fb2757253a509b57b3e7815c1fb6d0a94b.tar.gz samba-61ec62fb2757253a509b57b3e7815c1fb6d0a94b.tar.bz2 samba-61ec62fb2757253a509b57b3e7815c1fb6d0a94b.zip |
r14583: Enable automatic dependencies only if GNU make >= 3.81 is present.
(This used to be commit 2b22f1853306625a4c59763ef11965ac8900d4ff)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/m4/check_cc.m4 | 31 | ||||
-rw-r--r-- | source4/build/smb_build/env.pm | 7 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 1 | ||||
-rw-r--r-- | source4/build/smb_build/summary.pm | 9 |
4 files changed, 42 insertions, 6 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4 index bdee2b99c3..277afc18c6 100644 --- a/source4/build/m4/check_cc.m4 +++ b/source4/build/m4/check_cc.m4 @@ -193,3 +193,34 @@ if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then AC_DEFINE(HAVE_FUNCTION_MACRO,1,[Whether there is a __FUNCTION__ macro]) fi +AC_PATH_PROG(MAKE,make) + +AC_CACHE_CHECK([whether we have GNU make], samba_cv_gnu_make, [ +if $ac_cv_path_MAKE --version | head -1 | grep GNU 2>/dev/null >/dev/null +then + samba_cv_gnu_make=yes +else + samba_cv_gnu_make=no +fi +]) + +GNU_MAKE=$samba_cv_gnu_make +AC_SUBST(GNU_MAKE) + +if test "x$GNU_MAKE" = x"yes"; then + AC_CACHE_CHECK([GNU make version], samba_cv_gnu_make_version,[ + samba_cv_gnu_make_version=`$ac_cv_path_MAKE --version | head -1 | cut -d " " -f 3 2>/dev/null` + ]) + GNU_MAKE_VERSION=$samba_cv_gnu_make_version + AC_SUBST(GNU_MAKE_VERSION) +fi + +automatic_dependencies=no +AC_MSG_CHECKING([for GNU make >= 3.81]) +if test x$GNU_MAKE = x"yes"; then + if $PERL -e " \$_ = '$GNU_MAKE_VERSION'; s/@<:@^\d\.@:>@.*//g; exit (\$_ < 3.81);"; then + automatic_dependencies=yes + fi +fi +AC_MSG_RESULT($automatic_dependencies) +AC_SUBST(automatic_dependencies) diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm index c090fb83eb..70c4d7e968 100644 --- a/source4/build/smb_build/env.pm +++ b/source4/build/smb_build/env.pm @@ -47,11 +47,8 @@ sub _set_config($$) $self->{config}->{exec_prefix} = $self->{config}->{prefix}; } - if ($self->{config}->{developer} eq "yes") { - $self->{developer} = 1; - } else { - $self->{developer} = 0; - } + $self->{developer} = ($self->{config}->{developer} eq "yes"); + $self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes"); } sub PkgConfig($$$$$$$$) diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index a7dc4ff3e5..a6d6d2b741 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -18,7 +18,6 @@ sub new($$$) bless($self, $myname); - $self->{automatic_deps} = 0; $self->{manpages} = []; $self->{sbin_progs} = []; $self->{bin_progs} = []; diff --git a/source4/build/smb_build/summary.pm b/source4/build/smb_build/summary.pm index 95a342e2f9..b9ba1e96be 100644 --- a/source4/build/smb_build/summary.pm +++ b/source4/build/smb_build/summary.pm @@ -41,6 +41,15 @@ sub show($$) showitem($output, "using libblkid", ["BLKID"]); showitem($output, "using pam", ["PAM"]); print "Using external popt: ".lc($output->{EXT_LIB_POPT}->{ENABLE})."\n"; + print "Developer mode: ".lc($config->{developer})."\n"; + print "Automatic dependencies: "; + + if ($config->{automatic_dependencies} eq "yes") { + print "yes\n"; + } else { + print "no (install GNU make >= 3.81)\n"; + } + print "Using shared libraries internally (experimental): "; if ($config->{BLDSHARED} eq "true") { |