Fix summary.
[jelmer/samba4-debian.git] / source / build / smb_build / summary.pm
index c3edb094f39b276b229966b5dee59fb03010c2ca..4ea1ad525e3e0cec2f77ff8000e54db626b44edf 100644 (file)
@@ -5,8 +5,16 @@
 #  Released under the GNU GPL
 
 package summary;
+use smb_build::config;
 use strict;
 
+sub enabled($)
+{
+    my ($val) = @_;
+
+    return (defined($val) && $val =~ m/yes|true/i);
+}
+
 sub showitem($$$)
 {
        my ($output,$desc,$items) = @_;
@@ -14,37 +22,57 @@ sub showitem($$$)
        my @need = ();
 
        foreach (@$items) {
-               if ($output->{"EXT_LIB_$_"}->{ENABLE} ne "YES") {
-                       push (@need, $_);
-               }
+               push (@need, $_) if (enabled($config::enable{$_}));
        }
 
        print "Support for $desc: ";
-       if ($#need > 0) {
+       if ($#need >= 0) {
                print "no (install " . join(',',@need) . ")\n";
        } else {
                print "yes\n";
        }
 }
 
+sub showisexternal($$$)
+{
+       my ($output, $desc, $name) = @_;
+       print "Using external $desc: ".
+           (($output->{$name}->{TYPE} eq "EXT_LIB")?"yes":"no")."\n";
+}
+
 sub show($$)
 {
        my ($output,$config) = @_;
+
        print "Summary:\n\n";
-       showitem($output, "GTK+ frontends", ["gtk","gconf"]);
-       showitem($output, "SSL in SWAT", ["GNUTLS"]);
-       showitem($output, "threads in smbd", ["PTHREAD"]);
+       showitem($output, "SSL in SWAT and LDAP", ["GNUTLS"]);
+       showitem($output, "threads in smbd (see --with-pthread)", ["PTHREAD"]);
        showitem($output, "intelligent command line editing", ["READLINE"]);
-       showitem($output, "changing process titles", ["SETPROCTITLE"]);
-       print "Using external popt: $output->{EXT_LIB_POPT}->{ENABLE}\n";
-       print "Using shared libraries internally (experimental): ";
-
-       if ($config->{BLDSHARED} eq "true") {
-               print "yes\n";
-       } else {
-               print "no (try --enable-dso)\n";
+       showitem($output, "changing process titles (see --with-setproctitle)", ["SETPROCTITLE"]);
+       showitem($output, "using extended attributes", ["XATTR"]);
+       showitem($output, "using libblkid", ["BLKID"]);
+       showitem($output, "using iconv", ["ICONV"]);
+       showitem($output, "using pam", ["PAM"]);
+       showitem($output, "python bindings", ["LIBPYTHON"]);
+       showisexternal($output, "popt", "LIBPOPT");
+       showisexternal($output, "talloc", "LIBTALLOC");
+       showisexternal($output, "tdb", "LIBTDB");
+       showisexternal($output, "ldb", "LIBLDB");
+       print "Developer mode: ".(enabled($config->{developer})?"yes":"no")."\n";
+       print "Automatic dependencies: ".
+           (enabled($config->{automatic_dependencies})
+                   ? "yes" : "no (install GNU make >= 3.81 and see --enable-automatic-dependencies)") .
+            "\n";
+       
+       print "Building shared libraries: " .
+           (enabled($config->{BLDSHARED})
+                   ? "yes" : "no (not supported on this system)") .
+           "\n";
+       print "Using shared libraries internally: " .
+           (enabled($config->{USESHARED})
+                   ? "yes" : "no (specify --enable-dso)") .
+           "\n";
 
-       }
        print "\n";
 }