Author: jelmer Date: 2006-03-20 15:34:01 +0000 (Mon, 20 Mar 2006) New Revision: 14583
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14583 Log: Enable automatic dependencies only if GNU make >= 3.81 is present. Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4 branches/SAMBA_4_0/source/build/smb_build/env.pm branches/SAMBA_4_0/source/build/smb_build/makefile.pm branches/SAMBA_4_0/source/build/smb_build/summary.pm Changeset: Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4 =================================================================== --- branches/SAMBA_4_0/source/build/m4/check_cc.m4 2006-03-20 13:54:19 UTC (rev 14582) +++ branches/SAMBA_4_0/source/build/m4/check_cc.m4 2006-03-20 15:34:01 UTC (rev 14583) @@ -193,3 +193,34 @@ 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) Modified: branches/SAMBA_4_0/source/build/smb_build/env.pm =================================================================== --- branches/SAMBA_4_0/source/build/smb_build/env.pm 2006-03-20 13:54:19 UTC (rev 14582) +++ branches/SAMBA_4_0/source/build/smb_build/env.pm 2006-03-20 15:34:01 UTC (rev 14583) @@ -47,11 +47,8 @@ $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($$$$$$$$) Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm =================================================================== --- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-20 13:54:19 UTC (rev 14582) +++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-20 15:34:01 UTC (rev 14583) @@ -18,7 +18,6 @@ bless($self, $myname); - $self->{automatic_deps} = 0; $self->{manpages} = []; $self->{sbin_progs} = []; $self->{bin_progs} = []; Modified: branches/SAMBA_4_0/source/build/smb_build/summary.pm =================================================================== --- branches/SAMBA_4_0/source/build/smb_build/summary.pm 2006-03-20 13:54:19 UTC (rev 14582) +++ branches/SAMBA_4_0/source/build/smb_build/summary.pm 2006-03-20 15:34:01 UTC (rev 14583) @@ -41,6 +41,15 @@ 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") {