diff options
author | James Peach <jpeach@samba.org> | 2006-04-05 23:54:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:18 -0500 |
commit | c5792dbbb5998368d18330add4143ca44e24e203 (patch) | |
tree | 021cecc57f782c107baf05c630fbce030ebd2a91 /source4 | |
parent | c35f146d661889b84c032f7866266d8a23e2e28a (diff) | |
download | samba-c5792dbbb5998368d18330add4143ca44e24e203.tar.gz samba-c5792dbbb5998368d18330add4143ca44e24e203.tar.bz2 samba-c5792dbbb5998368d18330add4143ca44e24e203.zip |
r14930: Coalesce the "feature enabled" tests so that the config summary always
emits a yes or a no.
(This used to be commit c31e233a09c34fceee99193ef6f39ff3fabd543e)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/smb_build/summary.pm | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/source4/build/smb_build/summary.pm b/source4/build/smb_build/summary.pm index b9ba1e96be..b0dfbb5a16 100644 --- a/source4/build/smb_build/summary.pm +++ b/source4/build/smb_build/summary.pm @@ -7,6 +7,13 @@ package summary; use strict; +sub enabled($) +{ + my ($val) = @_; + + return (defined($val) && $val =~ m/yes|true/i); +} + sub showitem($$$) { my ($output,$desc,$items) = @_; @@ -14,7 +21,7 @@ sub showitem($$$) my @need = (); foreach (@$items) { - if ($output->{"EXT_LIB_$_"}->{ENABLE} ne "YES") { + if (!enabled($output->{"EXT_LIB_$_"}->{ENABLE})) { push (@need, $_); } } @@ -40,24 +47,19 @@ sub show($$) showitem($output, "using extended attributes", ["XATTR"]); 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 external popt: ". + (enabled($output->{EXT_LIB_POPT}->{ENABLE})?"yes":"no")."\n"; + print "Developer mode: ".(enabled($config->{developer})?"yes":"no")."\n"; + print "Automatic dependencies: ". + (enabled($config->{automatic_dependencies}) + ? "yes" : "no (install GNU make >= 3.81)") . + "\n"; - print "Using shared libraries internally (experimental): "; - - if ($config->{BLDSHARED} eq "true") { - print "yes\n"; - } else { - print "no (try --enable-dso)\n"; + print "Using shared libraries internally (experimental): " . + (enabled($config->{BLDSHARED}) + ? "yes" : "no (try --enable-dso)") . + "\n"; - } print "\n"; } |