summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-07-28 11:51:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:09 -0500
commit930e624d816a175d5ca4448e6ed40bc7dd8ec5b7 (patch)
treecefd60a954d828902c8fde6a6e8a69954e0baa63 /source4
parentd0496a4ee626f829f1b5032122d2daf53e0bd2e2 (diff)
downloadsamba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.gz
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.xz
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.zip
r8826: Make configure generate config.mk files (with the external libraries
that were found) and a config.pm file (with all substitution variables) (This used to be commit 52bb1374bbcfc9b9a6d098687bafe9021a1ee858)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/check_path.m416
-rw-r--r--source4/build/m4/check_perl.m42
-rw-r--r--source4/build/m4/core.m468
-rw-r--r--source4/build/m4/env.m42
-rw-r--r--source4/build/m4/public.m4179
-rw-r--r--source4/build/smb_build/config_mk.pm24
-rw-r--r--source4/build/smb_build/input.pm32
-rw-r--r--source4/build/smb_build/main.pl31
-rw-r--r--source4/build/smb_build/main.pm47
-rw-r--r--source4/build/smb_build/makefile.pm20
-rw-r--r--source4/config.list1
-rw-r--r--source4/configure.in26
-rw-r--r--source4/heimdal_build/config.m44
-rw-r--r--source4/lib/cmdline/config.m41
14 files changed, 153 insertions, 300 deletions
diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4
index a6e9ab258d4..55f04dee9a7 100644
--- a/source4/build/m4/check_path.m4
+++ b/source4/build/m4/check_path.m4
@@ -14,16 +14,16 @@ AC_PREFIX_DEFAULT(/usr/local/samba)
AC_ARG_WITH(fhs,
[ --with-fhs Use FHS-compliant paths (default=no)],
configdir="${sysconfdir}/samba"
- lockdir="\${VARDIR}/cache/samba"
- piddir="\${VARDIR}/run/samba"
- logfilebase="\${VARDIR}/log/samba"
+ lockdir="\${localstatedir}/cache/samba"
+ piddir="\${localstatedir}/run/samba"
+ logfilebase="\${localstatedir}/log/samba"
privatedir="\${CONFIGDIR}/private"
libdir="\${prefix}/lib/samba"
swatdir="\${DATADIR}/samba/swat",
- configdir="\${LIBDIR}"
- logfilebase="\${VARDIR}"
- lockdir="\${VARDIR}/locks"
- piddir="\${VARDIR}/locks"
+ configdir="\${libdir}"
+ logfilebase="\${localstatedir}"
+ lockdir="\${localstatedir}/locks"
+ piddir="\${localstatedir}/locks"
privatedir="\${prefix}/private"
swatdir="\${prefix}/swat")
@@ -152,8 +152,6 @@ AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings a
CFLAGS="${CFLAGS} -g -Wall"
developer=yes
DEVELOPER_CFLAGS="-Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -Wformat=2 -Wno-format-y2k -DDEBUG_PASSWORD -DDEVELOPER"
- SMB_INFO_BUILD_ENV="$SMB_INFO_BUILD_ENV
- \$SETTINGS{DEVELOPER} = \"YES\";"
fi])
debug=no
diff --git a/source4/build/m4/check_perl.m4 b/source4/build/m4/check_perl.m4
index 5e493db875d..34a7e5e7699 100644
--- a/source4/build/m4/check_perl.m4
+++ b/source4/build/m4/check_perl.m4
@@ -8,7 +8,7 @@ dnl
AC_PATH_PROG(PERL, perl)
if test x"$PERL" = x""; then
AC_MSG_WARN([No version of perl was not found!])
- AC_MSG_ERROR([Please Install perl from http://www.perl.com/])
+ AC_MSG_ERROR([Please install perl from http://www.perl.com/])
fi
if test x"$debug" = x"yes";then
PERL="$PERL -W"
diff --git a/source4/build/m4/core.m4 b/source4/build/m4/core.m4
deleted file mode 100644
index 6471fc9e64f..00000000000
--- a/source4/build/m4/core.m4
+++ /dev/null
@@ -1,68 +0,0 @@
-dnl SMB Build Core System
-dnl -------------------------------------------------------
-dnl Copyright (C) Stefan (metze) Metzmacher 2004
-dnl Copyright (C) Jelmer Vernooij 2004
-dnl Released under the GNU GPL
-dnl -------------------------------------------------------
-dnl
-dnl _SMB_BUILD_CORE(
-dnl 1: outputfile
-dnl )
-
-dnl #######################################################
-dnl ### And now the implementation ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CORE(
-dnl 1: outputfile
-dnl )
-AC_DEFUN([_SMB_BUILD_CORE],
-[
-
-$PERL -I$srcdir/build <<\_SMB_ACEOF
-use strict;
-
-my %SETTINGS;
-my %INPUT;
-
-use smb_build::main;
-
-###########################################################
-### First we list all info from configure ###
-###########################################################
-#
-#########################################
-## Start Build Env
-$SMB_INFO_BUILD_ENV
-## End Build Env
-#########################################
-#########################################
-## Start Ext Libs
-$SMB_INFO_EXT_LIBS
-## End Ext Libs
-#########################################
-#########################################
-## Start Modules
-$SMB_INFO_MODULES
-## End Modules
-#########################################
-## Start Subsystems
-$SMB_INFO_SUBSYSTEMS
-## End Subsystems
-#########################################
-## Start Libraries
-$SMB_INFO_LIBRARIES
-## End Libraries
-#########################################
-## Start Binaries
-$SMB_INFO_BINARIES
-## End Binaries
-#########################################
-
-$SMB_INFO_ENABLES
-
-smb_build_main(\%INPUT, \%SETTINGS);
-
-_SMB_ACEOF
-
-])
diff --git a/source4/build/m4/env.m4 b/source4/build/m4/env.m4
index 7d43f920ddb..7ab6dc61b07 100644
--- a/source4/build/m4/env.m4
+++ b/source4/build/m4/env.m4
@@ -13,8 +13,6 @@ if test -n "${SAMBA_VERSION_SVN_REVISION}";then
echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}"
fi
-SMB_INFO_BUILD_ENV=""
-
sinclude(build/m4/check_path.m4)
sinclude(build/m4/check_perl.m4)
sinclude(build/m4/check_cc.m4)
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 2a6b4e38934..c70514bdb67 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -1,104 +1,46 @@
dnl SMB Build System
dnl ----------------
dnl Copyright (C) 2004 Stefan Metzmacher
-dnl Copyright (C) 2004 Jelmer Vernooij
+dnl Copyright (C) 2004-2005 Jelmer Vernooij
dnl Published under the GPL
dnl
-dnl SMB_MODULE_DEFAULT(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_MODULE_DEFAULT(name,default_build)
dnl
-dnl SMB_SUBSYSTEM_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_SUBSYSTEM_ENABLE(name,default_build)
dnl
-dnl SMB_SUBSYSTEM(
-dnl 1:name,
-dnl 2:init_obj_files,
-dnl 3:add_obj_files,
-dnl 4:required_libraries,
-dnl 5:required_subsystems
-dnl )
+dnl SMB_SUBSYSTEM(name,init_obj_files,add_obj_files,required_subsystems)
dnl
-dnl SMB_EXT_LIB_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_EXT_LIB_ENABLE(name,default_build)
dnl
-dnl SMB_EXT_LIB_FROM_PKGCONFIG(
-dnl 1:name,
-dnl 2:pkg-config name
-dnl )
+dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name)
dnl
-dnl SMB_EXT_LIB(
-dnl 1:name,
-dnl 2:libs,
-dnl 3:cflags,
-dnl 4:cppflags,
-dnl 5:ldflags
-dnl )
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
dnl
-dnl SMB_LIBRARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_LIBRARY_ENABLE(name,default_build)
dnl
-dnl SMB_BINARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_BINARY_ENABLE(name,default_build)
dnl
-dnl SMB_MAKE_TARGET(
-dnl 1:name
-dnl 2:calledname
-dnl )
-dnl
-dnl SMB_ENV_CHECK(
-dnl 1:dummy
-dnl )
-dnl
-dnl SMB_AC_OUTPUT(
-dnl 1: outputfile
-dnl )
-
dnl #######################################################
dnl ### And now the implementation ###
dnl #######################################################
-AC_DEFUN([STR2ARRAY], [@<:@ input::str2array(\"$1\") @:>@])
-
-
-dnl SMB_MODULE_DEFAULT(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_MODULE_DEFAULT(name,default_build)
AC_DEFUN([SMB_MODULE_DEFAULT],
[
[SMB_MODULE_DEFAULT][$1]="$2"
-SMB_INFO_MODULES="$SMB_INFO_MODULES
-\$INPUT{$1}{DEFAULT_BUILD} = \"$2\";"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_SUBSYSTEM_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_SUBSYSTEM_ENABLE(name,default_build)
AC_DEFUN([SMB_SUBSYSTEM_ENABLE],
[
[SMB_SUBSYSTEM_ENABLE_][$1]="$2"
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-\$INPUT{$1}{ENABLE} = \"$2\";"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_SUBSYSTEM(
-dnl 1:name,
-dnl 2:init_obj_files,
-dnl 3:add_obj_files,
-dnl 4:required_libs,
-dnl 5:required_subsystems
-dnl )
+dnl SMB_SUBSYSTEM(name,init_obj_files,add_obj_files,required_subsystems)
AC_DEFUN([SMB_SUBSYSTEM],
[
@@ -113,35 +55,25 @@ AC_DEFUN([SMB_SUBSYSTEM],
SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem $1
-\$INPUT{$1} = {
- TYPE => \"SUBSYSTEM\",
- NAME => \"$1\",
- INIT_OBJ_FILES => ][STR2ARRAY([$2])][,
- ADD_OBJ_FILES => ][STR2ARRAY([$3])][,
- REQUIRED_LIBRARIES => ][STR2ARRAY([$4])][,
- REQUIRED_SUBSYSTEMS => ][STR2ARRAY([$5])][,
- ENABLE => \"YES\"
-};
+@<:@SUBSYSTEM::$1@:>@
+INIT_OBJ_FILES = $2
+ADD_OBJ_FILES = $3
+REQUIRED_SUBSYSTEMS = $4
+ENABLE = YES
# End Subsystem $1
###################################
"
])
-dnl SMB_EXT_LIB_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_EXT_LIB_ENABLE(name,default_build)
AC_DEFUN([SMB_EXT_LIB_ENABLE],
[
[SMB_EXT_LIB_ENABLE_][$1]="$2"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$INPUT{EXT_LIB_$1}{ENABLE} = \"$2\";"
+\$enabled{EXT_LIB_$1} = \"$2\";"
])
-dnl SMB_EXT_LIB_FROM_PKGCONFIG(
-dnl 1:name,
-dnl 2:pkg-config name
-dnl )
+dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name)
AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
[
dnl Figure out the correct variables and call SMB_EXT_LIB()
@@ -201,76 +133,35 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
fi
])
-dnl SMB_EXT_LIB(
-dnl 1:name,
-dnl 2:libs,
-dnl 3:cflags,
-dnl 4:cppflags,
-dnl 5:ldflags
-dnl )
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
AC_DEFUN([SMB_EXT_LIB],
[
SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
###################################
# Start Ext Lib $1
-\$INPUT{EXT_LIB_$1} = {
- TYPE => \"EXT_LIB\",
- NAME => \"EXT_LIB_$1\",
- LIBS => ][STR2ARRAY([$2])][,
- CFLAGS => ][STR2ARRAY([$3])][,
- CPPFLAGS => ][STR2ARRAY([$4])][,
- LDFLAGS => ][STR2ARRAY([$5])][
-};
+@<:@EXT_LIB::EXT_LIB_$1@:>@
+LIBS = $2
+CFLAGS = $3
+CPPFLAGS = $4
+LDFLAGS = $5
# End Ext Lib $1
###################################
"
])
-
-dnl SMB_LIBRARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_LIBRARY_ENABLE(name,default_build)
AC_DEFUN([SMB_LIBRARY_ENABLE],
[
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$INPUT{$1}{ENABLE} = \"$2\";"
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_BINARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_BINARY_ENABLE(name,default_build)
AC_DEFUN([SMB_BINARY_ENABLE],
[
[SMB_BINARY_ENABLE_][$1]="$2";
-SMB_INFO_BINARIES="$SMB_INFO_BINARIES
-\$INPUT{$1}{ENABLE} = \"$2\";"
-])
-
-dnl SMB_MAKE_TARGET(
-dnl 1:name
-dnl 2:calledname
-dnl )
-AC_DEFUN([SMB_MAKE_TARGET],
-[
- echo "#SMB_MAKE_TARGET TOTO"
-])
-
-dnl SMB_ENV_CHECK(
-dnl 1:dummy
-dnl )
-AC_DEFUN([SMB_ENV_CHECK],
-[
- _SMB_BUILD_ENV($1)
-])
-
-dnl SMB_AC_OUTPUT(
-dnl 1: outputfile
-dnl )
-AC_DEFUN([SMB_AC_OUTPUT],
-[
- AC_OUTPUT([$1],[],[_SMB_BUILD_CORE([[$1][.in]])])
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index ba8badc3d1f..d26d85f5b99 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -19,6 +19,10 @@ my %attribute_types = (
"ADD_OBJ_FILES" => "list",
"OBJ_FILES" => "list",
"SUBSYSTEM" => "string",
+ "CFLAGS" => "list",
+ "CPPFLAGS" => "list",
+ "LDFLAGS" => "list",
+ "LIBS" => "list",
"INIT_FUNCTION" => "string",
"MAJOR_VERSION" => "string",
"MINOR_VERSION" => "string",
@@ -168,7 +172,7 @@ sub import_file($$)
$input->{$name}{TYPE} = $type;
foreach my $key (values %{$result->{$section}}) {
- $key->{VAL} = input::strtrim($key->{VAL});
+ $key->{VAL} = smb_build::input::strtrim($key->{VAL});
my $vartype = $attribute_types{$key->{KEY}};
if (not defined($vartype)) {
die("Unknown attribute $key->{KEY}");
@@ -176,7 +180,7 @@ sub import_file($$)
if ($vartype eq "string") {
$input->{$name}{$key->{KEY}} = $key->{VAL};
} elsif ($vartype eq "list") {
- $input->{$name}{$key->{KEY}} = [input::str2array($key->{VAL})];
+ $input->{$name}{$key->{KEY}} = [smb_build::input::str2array($key->{VAL})];
} elsif ($vartype eq "bool") {
if (($key->{VAL} ne "YES") and ($key->{VAL} ne "NO")) {
die("Invalid value for bool attribute $key->{KEY}: $key->{VAL}");
@@ -186,4 +190,20 @@ sub import_file($$)
}
}
}
+
+sub import_files($$)
+{
+ my ($input, $config_list) = @_;
+
+ open(IN, $config_list) or die("Can't open $config_list: $!");
+ my @mkfiles = grep{!/^#/} <IN>;
+ close(IN);
+
+ $| = 1;
+
+ foreach (@mkfiles) {
+ s/\n//g;
+ import_file($input, $_);
+ }
+}
1;
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index d469550a762..fc14c1d2e93 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -8,7 +8,7 @@
###########################################################
use strict;
-package input;
+package smb_build::input;
my $subsystem_default_output_type = "OBJLIST";
my $srcdir = ".";
@@ -51,6 +51,7 @@ sub check_module($$)
die("Module $mod->{NAME} does not have a SUBSYSTEM set") if not defined($mod->{SUBSYSTEM});
+
($mod->{DEFAULT_BUILD} = "STATIC") if not defined($mod->{DEFAULT_BUILD});
my $use_default = 0;
@@ -62,12 +63,17 @@ sub check_module($$)
return;
}
- if ($mod->{ENABLE} ne "YES")
+ if (($mod->{ENABLE} eq "STATIC") or
+ ($mod->{ENABLE} eq "NOT") or
+ ($mod->{ENABLE} eq "SHARED")) {
+ $mod->{DEFAULT_BUILD} = $mod->{ENABLE};
+ } elsif ($mod->{ENABLE} ne "YES")
{
$mod->{CHOSEN_BUILD} = "NOT";
}
- if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT") {
+ if (not defined($mod->{CHOSEN_BUILD}) or $mod->{CHOSEN_BUILD} eq "DEFAULT")
+ {
$mod->{CHOSEN_BUILD} = $mod->{DEFAULT_BUILD};
}
@@ -145,14 +151,22 @@ sub calc_unique_deps($$)
# check_input($INPUT)
#
# $INPUT - the global INPUT context
-sub check($)
+# $enabled - list of enabled subsystems/libs
+sub check($$)
{
- my $INPUT = shift;
+ my ($INPUT, $enabled) = @_;
($subsystem_default_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE}) if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"}));
foreach my $part (values %$INPUT) {
- ($part->{ENABLE} = "YES") if not defined($part->{ENABLE});
+ if (defined($enabled->{$part->{NAME}})) {
+ $part->{ENABLE} = $enabled->{$part->{NAME}};
+ next;
+ }
+
+ unless(defined($part->{ENABLE})) {
+ $part->{ENABLE} = "YES";
+ }
}
foreach my $k (keys %$INPUT) {
@@ -166,12 +180,6 @@ sub check($)
check_library($INPUT, $part) if ($part->{TYPE} eq "LIBRARY");
check_binary($INPUT, $part) if ($part->{TYPE} eq "BINARY");
check_target($INPUT, $part) if ($part->{TYPE} eq "TARGET");
-
- #FIXME: REQUIRED_LIBRARIES needs to go
- if (defined($part->{REQUIRED_LIBRARIES})) {
- push(@{$part->{REQUIRED_SUBSYSTEMS}}, @{$part->{REQUIRED_LIBRARIES}});
- delete ($part->{REQUIRED_LIBRARIES});
- }
}
my %depend = %$INPUT;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
new file mode 100644
index 00000000000..abe63ffaba2
--- /dev/null
+++ b/source4/build/smb_build/main.pl
@@ -0,0 +1,31 @@
+###########################################################
+### SMB Build System ###
+### - the main program ###
+### ###
+### Copyright (C) Stefan (metze) Metzmacher 2004 ###
+### Copyright (C) Jelmer Vernooij 2005
+### Released under the GNU GPL ###
+###########################################################
+
+use smb_build::makefile;
+use smb_build::smb_build_h;
+use smb_build::input;
+use smb_build::config_mk;
+use smb_build::output;
+use smb_build::dot;
+use config;
+use strict;
+
+my $INPUT = {};
+
+config_mk::import_files($INPUT, "config.list");
+my $DEPEND = smb_build::input::check($INPUT, \%config::enabled);
+my $OUTPUT = output::create_output($DEPEND);
+makefile::create_makefile_in($OUTPUT, "Makefile.in");
+smb_build_h::create_smb_build_h($OUTPUT, "include/smb_build.h");
+
+open DOTTY, ">samba4-deps.dot";
+print DOTTY dot::generate($DEPEND);
+close DOTTY;
+
+1;
diff --git a/source4/build/smb_build/main.pm b/source4/build/smb_build/main.pm
deleted file mode 100644
index 950d02a2f67..00000000000
--- a/source4/build/smb_build/main.pm
+++ /dev/null
@@ -1,47 +0,0 @@
-###########################################################
-### SMB Build System ###
-### - the main program ###
-### ###
-### Copyright (C) Stefan (metze) Metzmacher 2004 ###
-### Released under the GNU GPL ###
-###########################################################
-
-use smb_build::makefile;
-use smb_build::smb_build_h;
-use smb_build::input;
-use smb_build::config_mk;
-use smb_build::output;
-use smb_build::dot;
-use strict;
-
-my $config_list = "config.list";
-
-sub smb_build_main($$)
-{
- my ($INPUT, $settings) = @_;
-
- open(IN, $config_list) or die("Can't open $config_list: $!");
- my @mkfiles = grep{!/^#/} <IN>;
- close(IN);
-
- $| = 1;
-
- foreach (@mkfiles) {
- s/\n//g;
- config_mk::import_file($INPUT, $_);
- }
-
- my $DEPEND = input::check($INPUT);
-
- my $OUTPUT = output::create_output($DEPEND);
-
- makefile::create_makefile_in($OUTPUT, $settings, "Makefile.in");
-
- smb_build_h::create_smb_build_h($OUTPUT, "include/smb_build.h");
-
- open DOTTY, ">samba4-deps.dot";
- print DOTTY dot::generate($DEPEND);
- close DOTTY;
-}
-
-1;
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 38d93f636ce..a720ea30694 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -509,9 +509,8 @@ bin/.TARGET_$ctx->{NAME}:
";
}
-sub _prepare_proto_rules($)
+sub _prepare_proto_rules()
{
- my $settings = shift;
my $output = "";
$output .= << '__EOD__';
@@ -761,10 +760,9 @@ __EOD__
return $output;
}
-sub _prepare_rule_lists($$)
+sub _prepare_rule_lists($)
{
my $depend = shift;
- my $settings = shift;
my $output = "";
foreach my $key (values %{$depend}) {
@@ -779,7 +777,7 @@ sub _prepare_rule_lists($$)
my $idl_ctx;
$output .= _prepare_IDL($idl_ctx);
- $output .= _prepare_proto_rules($settings);
+ $output .= _prepare_proto_rules();
$output .= _prepare_install_rules($depend);
return $output;
@@ -793,9 +791,9 @@ sub _prepare_rule_lists($$)
# $OUTPUT - the global OUTPUT context
#
# $output - the resulting output buffer
-sub _prepare_makefile_in($$)
+sub _prepare_makefile_in($)
{
- my ($CTX, $settings) = @_;
+ my ($CTX) = @_;
my $output;
$output = "########################################\n";
@@ -828,7 +826,7 @@ sub _prepare_makefile_in($$)
$output .= _prepare_man_rule("7");
$output .= _prepare_manpages($CTX);
$output .= _prepare_target_settings($CTX);
- $output .= _prepare_rule_lists($CTX, $settings);
+ $output .= _prepare_rule_lists($CTX);
my @all = ();
@@ -850,12 +848,12 @@ sub _prepare_makefile_in($$)
# $OUTPUT - the global OUTPUT context
#
# $output - the resulting output buffer
-sub create_makefile_in($$$)
+sub create_makefile_in($$)
{
- my ($CTX, $settings,$file) = @_;
+ my ($CTX, $file) = @_;
open(MAKEFILE_IN,">$file") || die ("Can't open $file\n");
- print MAKEFILE_IN _prepare_makefile_in($CTX, $settings);
+ print MAKEFILE_IN _prepare_makefile_in($CTX);
close(MAKEFILE_IN);
print "config.smb_build.pl: creating $file\n";
diff --git a/source4/config.list b/source4/config.list
index 21cf430fccc..2aeb0f20f7d 100644
--- a/source4/config.list
+++ b/source4/config.list
@@ -1,4 +1,5 @@
# master list of build config files for Samba4
+config.mk
heimdal_build/config.mk
dsdb/config.mk
gtk/config.mk
diff --git a/source4/configure.in b/source4/configure.in
index 51589e9fe80..f678d9c7e8c 100644
--- a/source4/configure.in
+++ b/source4/configure.in
@@ -5,6 +5,7 @@ dnl disabled 2.53 requirement - we do work with 2.52 on suse 7.3 for example
dnl AC_PREREQ(2.53)
AC_INIT([samba],[],[samba-technical@samba.org])
+
AC_CONFIG_SRCDIR([include/includes.h])
AC_CONFIG_HEADER(include/config.h)
@@ -85,4 +86,27 @@ dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
-SMB_AC_OUTPUT(Makefile)
+echo "configure: creating config.pl"
+cat >config.pm<<CEOF
+# config.pm - Autogenerate by configure. DO NOT EDIT!
+
+package config;
+use strict;
+
+use vars qw(%enabled AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [\$AC_Var ]));
+
+AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
+\$AC_Var = "$AC_Var";])
+
+$SMB_INFO_ENABLES
+CEOF
+
+echo "configure: creating config.mk"
+cat >config.mk<<CEOF
+# config.mk - Autogenerated by configure, DO NOT EDIT!
+$SMB_INFO_EXT_LIBS
+$SMB_INFO_SUBSYSTEMS
+$SMB_INFO_LIBRARIES
+CEOF
+
+AC_OUTPUT(Makefile,,[$PERL -Ibuild build/smb_build/main.pl])
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
index bffb3c5605f..7f083e9314d 100644
--- a/source4/heimdal_build/config.m4
+++ b/source4/heimdal_build/config.m4
@@ -177,7 +177,7 @@ AC_CHECK_DECL(h_errno,
#endif])
# these are disabled unless heimdal is found below
-SMB_MODULE_DEFAULT(KERBEROS_LIB, NOT)
+SMB_SUBSYSTEM_ENABLE(KERBEROS_LIB, NO)
SMB_BINARY_ENABLE(asn1_compile, NO)
SMB_BINARY_ENABLE(compile_et, NO)
@@ -194,7 +194,7 @@ if test -d heimdal; then
AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available])
CFLAGS="${CFLAGS} -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/gssapi -Iheimdal/lib/asn1 -Iheimdal/lib/com_err -Iheimdal/lib/hdb -Iheimdal/kdc"
HAVE_KRB5=YES
- SMB_MODULE_DEFAULT(KERBEROS_LIB, STATIC)
+ SMB_SUBSYSTEM_ENABLE(KERBEROS_LIB, YES)
SMB_BINARY_ENABLE(asn1_compile, YES)
SMB_BINARY_ENABLE(compile_et, YES)
fi
diff --git a/source4/lib/cmdline/config.m4 b/source4/lib/cmdline/config.m4
index 45c3a70f9f6..4f6606b8dbb 100644
--- a/source4/lib/cmdline/config.m4
+++ b/source4/lib/cmdline/config.m4
@@ -76,7 +76,6 @@ SMB_EXT_LIB(READLINE, [${TMP_LIBCMDLINE_LIBS}])
SMB_SUBSYSTEM(LIBCMDLINE,[],
[${TMP_LIBCMDLINE_OBJS}],
- [],
[LIBPOPT EXT_LIB_READLINE EXT_LIB_ALLLIBS LIBCMDLINE_CREDENTIALS])
AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[