[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-806-ga44af7c

Jelmer Vernooij jelmer at samba.org
Wed Feb 13 18:01:34 GMT 2008


The branch, v4-0-test has been updated
       via  a44af7c3872e900e1ea0da74ef796213030e29ac (commit)
      from  af9e0421529104d2583c58f7723abe8612e78f53 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit a44af7c3872e900e1ea0da74ef796213030e29ac
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Feb 13 18:59:57 2008 +0100

    Put soversions and versions for libraries with a hard-coded version in the
    generated .mk file.
    
    Move CPPFLAGS to be generated entirely inside configure.ac (simplifies
    makefile.pm).

-----------------------------------------------------------------------

Summary of changes:
 source/build/smb_build/makefile.pm |   35 +++--------------------------------
 source/configure.ac                |   19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/build/smb_build/makefile.pm b/source/build/smb_build/makefile.pm
index 50a16c5..3df1b56 100644
--- a/source/build/smb_build/makefile.pm
+++ b/source/build/smb_build/makefile.pm
@@ -45,8 +45,6 @@ sub new($$$)
 	$self->output("################################################\n");
 	$self->output("\n");
 
-	$self->_prepare_compiler_linker();
-
 	if (!$self->{automatic_deps}) {
 		$self->output("ALL_PREDEP = proto\n");
 		$self->output(".NOTPARALLEL:\n");
@@ -62,36 +60,6 @@ sub output($$)
 	$self->{output} .= $text;
 }
 
-sub _prepare_compiler_linker($)
-{
-	my ($self) = @_;
-
-	my $builddir_headers = "";
-	my $libdir;
-	my $extra_link_flags = "";
-
-	if ($self->{config}->{USESHARED} eq "true") {
-		$libdir = "\$(builddir)/bin/shared";
-		$extra_link_flags = "-Wl,-rpath-link,\$(builddir)/bin/shared";
-	} else {
-		$libdir = "\$(builddir)/bin/static";
-	}
-	
-	if (!(abs_path($self->{config}->{srcdir}) eq abs_path($self->{config}->{builddir}))) {
-	    $builddir_headers= "-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
-	}
-
-	$self->output(<< "__EOD__"
-
-CPPFLAGS=$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $self->{config}->{CPPFLAGS}
-
-INSTALL_LINK_FLAGS=$extra_link_flags
-
-INTERN_LDFLAGS = -L$libdir
-__EOD__
-);
-}
-
 sub _prepare_mk_files($)
 {
 	my $self = shift;
@@ -251,6 +219,9 @@ sub SharedLibrary($$)
 
 	my $has_static_lib = 0;
 
+	$self->output("$ctx->{NAME}_SOVERSION = $ctx->{SO_VERSION}\n") if (defined($ctx->{SO_VERSION}));
+	$self->output("$ctx->{NAME}_VERSION = $ctx->{VERSION}\n") if (defined($ctx->{VERSION}));
+
 	push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
 	push (@{$self->{installable_shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
 
diff --git a/source/configure.ac b/source/configure.ac
index 0a59e41..17925df 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -138,6 +138,25 @@ for d in build/smb_build bin include ; do
     test -d ${builddir}/$d || AS_MKDIR_P(${builddir}/$d)
 done
 
+AC_SUBST(INTERN_LDFLAGS)
+AC_SUBST(INSTALL_LINK_FLAGS)
+if test $USESHARED = "true";
+then
+	INTERN_LDFLAGS="-L\${builddir}/bin/shared"
+	INSTALL_LINK_FLAGS="-Wl,-rpath-link,\${builddir}/bin/shared";
+else
+	INTERN_LDFLAGS="-L\${builddir}/bin/static"
+fi
+
+builddir_headers=""
+	
+if test "x$ac_abs_srcdir" != "x$ac_abs_builddir"
+then
+	builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
+fi
+
+CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"
+
 echo "configure: creating build/smb_build/config.pm"
 cat >build/smb_build/config.pm<<CEOF
 # config.pm - Autogenerate by configure. DO NOT EDIT!


-- 
Samba Shared Repository


More information about the samba-cvs mailing list