Author: jelmer
Date: 2006-03-10 14:13:04 +0000 (Fri, 10 Mar 2006)
New Revision: 14151

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14151

Log:
Add simple script that writes a summary to show what libraries the user 
(might) be missing.

Added:
   branches/SAMBA_4_0/source/build/smb_build/summary.pm
Modified:
   branches/SAMBA_4_0/source/build/smb_build/TODO
   branches/SAMBA_4_0/source/build/smb_build/header.pm
   branches/SAMBA_4_0/source/build/smb_build/input.pm
   branches/SAMBA_4_0/source/build/smb_build/main.pl


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/TODO
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/TODO      2006-03-10 14:09:34 UTC 
(rev 14150)
+++ branches/SAMBA_4_0/source/build/smb_build/TODO      2006-03-10 14:13:04 UTC 
(rev 14151)
@@ -1,3 +1,4 @@
+- subdir handler for install headers into a specific directory
 - sonames
 - hack for loading modules locally
  - create 

Modified: branches/SAMBA_4_0/source/build/smb_build/header.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-10 14:09:34 UTC 
(rev 14150)
+++ branches/SAMBA_4_0/source/build/smb_build/header.pm 2006-03-10 14:13:04 UTC 
(rev 14151)
@@ -2,6 +2,7 @@
 # - create output for build.h
 #
 #  Copyright (C) Stefan (metze) Metzmacher 2004
+#  Copyright (C) Jelmer Vernooij 2005
 #  Released under the GNU GPL
 
 package header;

Modified: branches/SAMBA_4_0/source/build/smb_build/input.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/input.pm  2006-03-10 14:09:34 UTC 
(rev 14150)
+++ branches/SAMBA_4_0/source/build/smb_build/input.pm  2006-03-10 14:13:04 UTC 
(rev 14151)
@@ -33,10 +33,7 @@
 sub check_subsystem($$$)
 {
        my ($INPUT, $subsys, $default_ot) = @_;
-       if ($subsys->{ENABLE} ne "YES") {
-               printf("Subsystem `%s' disabled\n",$subsys->{NAME});
-               return;
-       }
+       return if ($subsys->{ENABLE} ne "YES");
        
        unless(defined($subsys->{OUTPUT_TYPE})) {
                $subsys->{OUTPUT_TYPE} = $default_ot;
@@ -60,11 +57,7 @@
                return;
        }
 
-       if ($mod->{ENABLE} ne "YES")
-       {
-               printf("Module `%s' disabled\n",$mod->{NAME});
-               return;
-       }
+       return if ($mod->{ENABLE} ne "YES");
 
        if (exists($INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE})) {
                $mod->{INIT_FUNCTION_TYPE} = 
$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE};
@@ -91,10 +84,7 @@
 {
        my ($INPUT, $lib, $default_ot) = @_;
 
-       if ($lib->{ENABLE} ne "YES") {
-               printf("Library `%s' disabled\n",$lib->{NAME});
-               return;
-       }
+       return if ($lib->{ENABLE} ne "YES");
 
        $lib->{OUTPUT_TYPE} = $default_ot;
 
@@ -114,10 +104,7 @@
 {
        my ($INPUT, $bin) = @_;
 
-       if ($bin->{ENABLE} ne "YES") {
-               printf("Binary `%s' disabled\n",$bin->{NAME});
-               return;
-       }
+       return if ($bin->{ENABLE} ne "YES");
 
        ($bin->{BINARY} = (lc $bin->{NAME})) if not defined($bin->{BINARY});
 

Modified: branches/SAMBA_4_0/source/build/smb_build/main.pl
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/main.pl   2006-03-10 14:09:34 UTC 
(rev 14150)
+++ branches/SAMBA_4_0/source/build/smb_build/main.pl   2006-03-10 14:13:04 UTC 
(rev 14151)
@@ -12,6 +12,7 @@
 use smb_build::output;
 use smb_build::env;
 use smb_build::cflags;
+use smb_build::summary;
 use config;
 use strict;
 
@@ -81,4 +82,6 @@
 
 cflags::create_cflags($OUTPUT, "extra_cflags.txt");
 
+summary::show($OUTPUT, \%config::config);
+
 1;

Added: branches/SAMBA_4_0/source/build/smb_build/summary.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/summary.pm        2006-03-10 
14:09:34 UTC (rev 14150)
+++ branches/SAMBA_4_0/source/build/smb_build/summary.pm        2006-03-10 
14:13:04 UTC (rev 14151)
@@ -0,0 +1,51 @@
+# Samba Build System
+# - write out summary
+#
+#  Copyright (C) Jelmer Vernooij 2006
+#  Released under the GNU GPL
+
+package summary;
+use strict;
+
+sub showitem($$$)
+{
+       my ($output,$desc,$items) = @_;
+
+       my @need = ();
+
+       foreach (@$items) {
+               if ($output->{"EXT_LIB_$_"}->{ENABLE} ne "YES") {
+                       push (@need, $_);
+               }
+       }
+
+       print "Support for $desc: ";
+       if ($#need > 0) {
+               print "no (install " . join(',',@need) . ")\n";
+       } else {
+               print "yes\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, "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";
+
+       }
+       print "\n";
+}
+
+1;

Reply via email to