summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-18 19:46:27 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-18 19:46:27 +0100
commit094769618e180cae404f5951b969e9c6c778e421 (patch)
treee2f1e6f4211ba73deae9592273bccb1be3df64ef
parentc5487903df0f770600d0e96bfb26e00f8254c82f (diff)
downloadsamba-094769618e180cae404f5951b969e9c6c778e421.tar.gz
samba-094769618e180cae404f5951b969e9c6c778e421.tar.bz2
samba-094769618e180cae404f5951b969e9c6c778e421.zip
Use implicit build system element creation for external libraries.
(This used to be commit 3b08f190c9dd4567e684c804a22e2612f405bbec)
-rw-r--r--source4/build/m4/public.m422
-rw-r--r--source4/build/smb_build/config_mk.pm2
-rw-r--r--source4/build/smb_build/input.pm13
-rw-r--r--source4/build/smb_build/output.pm2
4 files changed, 13 insertions, 26 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index d045cf42b7..f3d262e07a 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -8,7 +8,7 @@ dnl SMB_SUBSYSTEM(name,obj_files,required_subsystems)
dnl
dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
dnl
-dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname)
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
dnl
dnl SMB_ENABLE(name,default_build)
dnl
@@ -40,7 +40,7 @@ ENABLE = YES
"
])
-dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
+dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags)
AC_DEFUN([SMB_LIBRARY],
[
MAKE_SETTINGS="$MAKE_SETTINGS
@@ -60,7 +60,6 @@ VERSION = $4
SO_VERSION = $5
CFLAGS = \$($1_CFLAGS)
LDFLAGS = \$($1_LDFLAGS)
-PC_NAME = $8
ENABLE = YES
# End Library $1
###################################
@@ -104,8 +103,7 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
[`$PKG_CONFIG --libs-only-l '$2'`],
[`$PKG_CONFIG --cflags-only-other '$2'`],
[`$PKG_CONFIG --cflags-only-I '$2'`],
- [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`],
- [ $2 ])
+ [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`])
ac_cv_$1_found=yes
else
@@ -137,7 +135,7 @@ include $1
"
])
-dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname)
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
AC_DEFUN([SMB_EXT_LIB],
[
MAKE_SETTINGS="$MAKE_SETTINGS
@@ -147,18 +145,6 @@ $1_CPPFLAGS = $4
$1_LDFLAGS = $5
"
-SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
-###################################
-# Start Ext Lib $1
-@<:@EXT_LIB::$1@:>@
-LIBS = \$($1_LIBS)
-CFLAGS = \$($1_CFLAGS)
-CPPFLAGS = \$($1_CPPFLAGS)
-LDFLAGS = \$($1_LDFLAGS)
-PC_NAME = $6
-# End Ext Lib $1
-###################################
-"
])
dnl SMB_ENABLE(name,default_build)
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index aa075490bc..ed05a4e4d9 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -18,7 +18,6 @@ my $section_types = {
"CFLAGS" => "list",
"CPPFLAGS" => "list",
"LDFLAGS" => "list",
- "PC_NAME" => "string",
},
"PYTHON" => {
SWIG_FILE => "string",
@@ -90,7 +89,6 @@ my $section_types = {
"SO_VERSION" => "string",
"LIBRARY_REALNAME" => "string",
- "PC_NAME" => "string",
"PC_FILE" => "string",
"INIT_FUNCTION_TYPE" => "string",
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index d636ecc898..da90e9db48 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -92,7 +92,7 @@ sub check_module($$$)
if (not defined($mod->{OUTPUT_TYPE})) {
if ($INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") {
- $mod->{OUTPUT_TYPE} = ["SHARED_LIBRARY"];
+ $mod->{OUTPUT_TYPE} = undef;
} else {
$mod->{OUTPUT_TYPE} = $default_ot;
}
@@ -163,7 +163,7 @@ sub check_python($$$)
$python->{LIBRARY_REALNAME} = "$basename.\$(SHLIBEXT)";
$python->{INIT_FUNCTION} = "{ (char *)\"$basename\", init$basename }";
}
- push (@{$python->{CFLAGS}}, @{$INPUT->{EXT_LIB_PYTHON}->{CFLAGS}});
+ push (@{$python->{CFLAGS}}, "\$(EXT_LIB_PYTHON_CFLAGS)");
$python->{SUBSYSTEM} = "LIBPYTHON";
@@ -189,9 +189,12 @@ sub add_implicit($$)
$INPUT->{$n} = {
TYPE => "MAKE_RULE",
NAME => $n,
- TARGET => lc($n),
- LIBS => "\$(".uc($n)."_LIBS)",
- CFLAGS => "\$(".uc($n)."_CFLAG)"
+ TARGET => "",
+ OUTPUT_TYPE => undef,
+ LIBS => ["\$(".uc($n)."_LIBS)"],
+ LDFLAGS => ["\$(".uc($n)."_LDFLAGS)"],
+ CFLAGS => ["\$(".uc($n)."_CFLAGS)"],
+ CPPFLAGS => ["\$(".uc($n)."_CPPFLAGS)"]
};
}
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 3d5f4466ca..83be28e740 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -210,7 +210,7 @@ sub create_output($$)
}
foreach $part (values %{$depend}) {
- if (($part->{STANDARD_VISIBILITY} ne "default") and
+ if (defined($part->{STANDARD_VISIBILITY}) and ($part->{STANDARD_VISIBILITY} ne "default") and
($config->{visibility_attribute} eq "yes")) {
push(@{$part->{FINAL_CFLAGS}}, "-fvisibility=$part->{STANDARD_VISIBILITY}");
}