summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-06 15:28:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:47 -0500
commit6b5e86f47b21b560827c3ca24ee09f92f80fad3b (patch)
treed3c2aaef9000d4a94b054b935d0bb463b40fe823 /source4
parentc8295a7d2f68b5f2733b947ee2dbcd4358d0bf37 (diff)
downloadsamba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.tar.gz
samba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.tar.bz2
samba-6b5e86f47b21b560827c3ca24ee09f92f80fad3b.zip
r18183: - add LIBREPLACE globaly and add LIBREPLACE_HOSTCC
- also specify USE_HOSTCC = YES on binaries that use HOSTCC I also disable autodependecies as this change let make run forever, I hopefully fix that tomorrow metze (This used to be commit 159f74570233a8707dc1deb70fb1917a854213f8)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/m4/check_cc.m41
-rw-r--r--source4/build/smb_build/config_mk.pm4
-rw-r--r--source4/build/smb_build/input.pm23
-rw-r--r--source4/build/smb_build/makefile.pm4
-rw-r--r--source4/heimdal_build/config.mk10
-rw-r--r--source4/lib/replace/config.mk9
6 files changed, 42 insertions, 9 deletions
diff --git a/source4/build/m4/check_cc.m4 b/source4/build/m4/check_cc.m4
index 7f166ff641..397a6dd044 100644
--- a/source4/build/m4/check_cc.m4
+++ b/source4/build/m4/check_cc.m4
@@ -285,6 +285,7 @@ if test x$GNU_MAKE = x"yes"; then
new_make=yes
fi
fi
+new_make=no
AC_MSG_RESULT($new_make)
automatic_dependencies=no
AX_CFLAGS_GCC_OPTION([-M -MT conftest.d -MF conftest.o], [], [ automatic_dependencies=$new_make ], [])
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 80da0ab2fa..65f873f500 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -76,7 +76,9 @@ my $section_types = {
"PUBLIC_HEADERS" => "list",
"CFLAGS" => "string",
- "STANDARD_VISIBILITY" => "string"
+ "STANDARD_VISIBILITY" => "string",
+
+ "USE_HOSTCC" => "bool"
},
"LIBRARY" => {
"VERSION" => "string",
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index b07c9b1a07..a8f5485a35 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -30,6 +30,25 @@ sub str2array($)
return split /[ \t\n]/;
}
+sub add_libreplace($)
+{
+ my ($part) = @_;
+
+ return if ($part->{NAME} eq "LIBREPLACE");
+ return if ($part->{NAME} eq "LIBREPLACE_HOSTCC");
+
+ foreach my $n (@{$part->{PRIVATE_DEPENDENCIES}}) {
+ return if ($n eq "LIBREPLACE");
+ return if ($n eq "LIBREPLACE_HOSTCC");
+ }
+
+ if (defined($part->{USE_HOSTCC}) && $part->{USE_HOSTCC} eq "YES") {
+ push (@{$part->{PRIVATE_DEPENDENCIES}}, "LIBREPLACE_HOSTCC");
+ } else {
+ push (@{$part->{PRIVATE_DEPENDENCIES}}, "LIBREPLACE");
+ }
+}
+
sub check_subsystem($$$)
{
my ($INPUT, $subsys, $default_ot) = @_;
@@ -38,6 +57,7 @@ sub check_subsystem($$$)
unless(defined($subsys->{OUTPUT_TYPE})) {
$subsys->{OUTPUT_TYPE} = $default_ot;
}
+ add_libreplace($subsys);
}
sub check_module($$$)
@@ -75,6 +95,7 @@ sub check_module($$$)
} else {
push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
}
+ add_libreplace($mod);
}
sub check_library($$$)
@@ -100,6 +121,7 @@ sub check_library($$$)
}
$lib->{INSTALLDIR} = "LIBDIR";
+ add_libreplace($lib);
}
sub check_binary($$)
@@ -111,6 +133,7 @@ sub check_binary($$)
($bin->{BINARY} = (lc $bin->{NAME})) if not defined($bin->{BINARY});
$bin->{OUTPUT_TYPE} = "BINARY";
+ add_libreplace($bin);
}
sub import_integrated($$)
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 5309adea1d..a453cb6203 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -117,7 +117,7 @@ sub _prepare_compiler_linker($)
}
if (!(abs_path($self->{config}->{srcdir}) eq abs_path($self->{config}->{builddir}))) {
- $builddir_headers= "-I\$(builddir)/include -I\$(builddir)/lib/replace -I\$(builddir) -I\$(builddir)/lib ";
+ $builddir_headers= "-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
}
$self->output(<< "__EOD__"
@@ -126,7 +126,7 @@ SHELL=$self->{config}->{SHELL}
PERL=$self->{config}->{PERL}
CPP=$self->{config}->{CPP}
-CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir)/lib/replace -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS}
+CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -D_SAMBA_BUILD_ -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS}
CC=$self->{config}->{CC}
CFLAGS=$self->{config}->{CFLAGS} \$(CPPFLAGS)
diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/config.mk
index 18aa705c33..1443d87338 100644
--- a/source4/heimdal_build/config.mk
+++ b/source4/heimdal_build/config.mk
@@ -393,6 +393,7 @@ OBJ_FILES = ../heimdal/lib/asn1/lex.ho
# Start BINARY asn1_compile
[BINARY::asn1_compile]
CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
+USE_HOSTCC = YES
OBJ_FILES = \
../heimdal/lib/asn1/main.ho \
../heimdal/lib/asn1/gen.ho \
@@ -412,10 +413,8 @@ OBJ_FILES = \
../heimdal/lib/roken/estrdup.ho \
../heimdal/lib/roken/ecalloc.ho \
../heimdal/lib/asn1/symbol.ho \
- replace.ho \
../heimdal/lib/vers/print_version.ho \
- ../lib/replace/snprintf.ho \
- ../lib/replace/replace.ho
+ replace.ho
PRIVATE_DEPENDENCIES = HEIMDAL_ASN1_COMPILE_LEX HEIMDAL_ROKEN_GETPROGNAME_H
# End BINARY asn1_compile
#######################
@@ -432,6 +431,7 @@ OBJ_FILES = ../heimdal/lib/com_err/lex.ho
# Start BINARY compile_et
[BINARY::compile_et]
CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
+USE_HOSTCC = YES
OBJ_FILES = ../heimdal/lib/vers/print_version.ho \
../heimdal/lib/com_err/parse.ho \
../heimdal/lib/com_err/compile_et.ho \
@@ -439,9 +439,7 @@ OBJ_FILES = ../heimdal/lib/vers/print_version.ho \
../heimdal/lib/roken/get_window_size.ho \
../heimdal/lib/roken/strupr.ho \
../heimdal/lib/roken/setprogname.ho \
- replace.ho \
- ../lib/replace/snprintf.ho \
- ../lib/replace/replace.ho
+ replace.ho
PRIVATE_DEPENDENCIES = HEIMDAL_COM_ERR_COMPILE_LEX HEIMDAL_ROKEN_GETPROGNAME_H
# End BINARY compile_et
#######################
diff --git a/source4/lib/replace/config.mk b/source4/lib/replace/config.mk
index dd338ac305..1e940b0a71 100644
--- a/source4/lib/replace/config.mk
+++ b/source4/lib/replace/config.mk
@@ -18,3 +18,12 @@ OBJ_FILES = replace.o \
PUBLIC_DEPENDENCIES = REPLACE_READDIR DL
# End SUBSYSTEM LIBREPLACE
##############################
+
+[SUBSYSTEM::LIBREPLACE_HOSTCC]
+CFLAGS = -Ilib/replace
+OBJ_FILES = replace.ho \
+ snprintf.ho \
+ dlfcn.ho \
+ getpass.ho \
+ timegm.ho
+