unify TCLLIBDIR handling with libtclsqlite3.so and use libtool to install it rather than custom tclinstaller.tcl ... this integrates better with autotools and avoids relinking issues (RPATH pointing to builddir) (CVS 6210)
FossilOrigin-Name: 3a049ca761f36d0fdb3b5b5f254c00210b373e9e
This commit is contained in:
parent
6711002c7b
commit
6d120f39aa
18
Makefile.in
18
Makefile.in
@ -110,6 +110,10 @@ HAVE_TCL = @HAVE_TCL@
|
||||
#
|
||||
TCLSH_CMD = @TCLSH_CMD@
|
||||
|
||||
# Where do we want to install the tcl plugin
|
||||
#
|
||||
TCLLIBDIR = @TCLLIBDIR@
|
||||
|
||||
# The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib"
|
||||
#
|
||||
SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
|
||||
@ -460,8 +464,9 @@ libsqlite3.la: $(LIBOBJ)
|
||||
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
|
||||
$(LTLINK) -o $@ tclsqlite.lo \
|
||||
libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
|
||||
-rpath "$(libdir)/sqlite" \
|
||||
-version-info "8:6:8"
|
||||
-rpath "$(TCLLIBDIR)" \
|
||||
-version-info "8:6:8" \
|
||||
-avoid-version
|
||||
|
||||
sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
|
||||
$(LTLINK) $(READLINE_FLAGS) \
|
||||
@ -768,8 +773,13 @@ install: sqlite3$(BEXE) libsqlite3.la sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_inst
|
||||
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
|
||||
$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
|
||||
|
||||
tcl_install: libtclsqlite3.la
|
||||
$(TCLSH_CMD) $(TOP)/tclinstaller.tcl $(RELEASE)
|
||||
pkgIndex.tcl:
|
||||
echo 'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3.so sqlite3]' > $@
|
||||
tcl_install: libtclsqlite3.la pkgIndex.tcl
|
||||
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
|
||||
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
|
||||
rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
|
||||
$(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
|
||||
|
||||
clean:
|
||||
rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
|
||||
|
12
configure.ac
12
configure.ac
@ -92,7 +92,7 @@ AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
|
||||
dnl Put the RCS revision string after AC_INIT so that it will also
|
||||
dnl show in in configure.
|
||||
# The following RCS revision string applies to configure.in
|
||||
# $Revision: 1.53 $
|
||||
# $Revision: 1.54 $
|
||||
|
||||
#########
|
||||
# Programs needed
|
||||
@ -140,6 +140,16 @@ if test "$TCLSH_CMD" = "none"; then
|
||||
fi
|
||||
AC_SUBST(TCLSH_CMD)
|
||||
|
||||
AC_ARG_VAR([TCLLIBDIR], [Where to install tcl plugin])
|
||||
if test "x${TCLLIBDIR+set}" != "xset" ; then
|
||||
TCLLIBDIR='$(libdir)'
|
||||
for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do
|
||||
TCLLIBDIR=$i
|
||||
break
|
||||
done
|
||||
TCLLIBDIR="${TCLLIBDIR}/sqlite3"
|
||||
fi
|
||||
|
||||
|
||||
#########
|
||||
# Set up an appropriate program prefix
|
||||
|
17
manifest
17
manifest
@ -1,7 +1,7 @@
|
||||
C Add\stestcase()\smacros\sfor\scoverage\sin\sdate.c.\s(CVS\s6209)
|
||||
D 2009-01-28T02:55:29
|
||||
C unify\sTCLLIBDIR\shandling\swith\slibtclsqlite3.so\sand\suse\slibtool\sto\sinstall\sit\srather\sthan\scustom\stclinstaller.tcl\s...\sthis\sintegrates\sbetter\swith\sautotools\sand\savoids\srelinking\sissues\s(RPATH\spointing\sto\sbuilddir)\s(CVS\s6210)
|
||||
D 2009-01-28T04:46:15
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in 56e5fccf24f8369a812623abccbf99918d4bb0e6
|
||||
F Makefile.in 3871d308188cefcb7c5ab20da4c7b6aad023bc52
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
F Makefile.vxwSH4 d53b4be86491060d498b22148951b6d765884cab
|
||||
F README b974cdc3f9f12b87e851b04e75996d720ebf81ac
|
||||
@ -19,7 +19,7 @@ F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
|
||||
F config.h.in 3fda160d9a0ebbd6c22c0391354fa0036474680f
|
||||
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
|
||||
F configure ba834380ddf76cd00c1e6b51a2a97ce671946b41 x
|
||||
F configure.ac 42015e27775407b09b6fa385e8b57744a1f2d79c
|
||||
F configure.ac 2c06a767c7be70560317754f3eea4c84887da9ca
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
|
||||
F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
|
||||
@ -208,7 +208,6 @@ F src/vdbemem.c 06311d5c46fd703fe95ff81bd0a1b72ba0341311
|
||||
F src/vtab.c e39e011d7443a8d574b1b9cde207a35522e6df43
|
||||
F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d
|
||||
F src/where.c 48249767437bfbacbd3488270449240b9bfd05c4
|
||||
F tclinstaller.tcl d7f0b0c80d3ef63bd783cc1d70951316315cc2fb
|
||||
F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
|
||||
F test/alias.test 597662c5d777a122f9a3df0047ea5c5bd383a911
|
||||
F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45
|
||||
@ -693,7 +692,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P ed08025ad2c5c9e52732ad91192e1c6d58272c87
|
||||
R fdd2f7ab99f4f73c1dd0919a10dc240f
|
||||
U drh
|
||||
Z 81178b096f92b1be5a731beb39f7c3b2
|
||||
P 90b42eba8e02402c342e04236148bbd5e4d93eb8
|
||||
R 013d3e21a1216f4954e0de60c5cc4773
|
||||
U vapier
|
||||
Z dc3613ec26c552b3579b5d061d0577f5
|
||||
|
@ -1 +1 @@
|
||||
90b42eba8e02402c342e04236148bbd5e4d93eb8
|
||||
3a049ca761f36d0fdb3b5b5f254c00210b373e9e
|
@ -1,32 +0,0 @@
|
||||
# This script attempts to install SQLite3 so that it can be used
|
||||
# by TCL. Invoke this script with single argument which is the
|
||||
# version number of SQLite. Example:
|
||||
#
|
||||
# tclsh tclinstaller.tcl 3.0
|
||||
#
|
||||
set VERSION [lindex $argv 0]
|
||||
set LIBFILE .libs/libtclsqlite3[info sharedlibextension]
|
||||
if { ![info exists env(DESTDIR)] } { set env(DESTDIR) "" }
|
||||
if { ![info exists env(TCLLIBDIR)] } { set env(TCLLIBDIR) [lindex $auto_path 0] }
|
||||
set LIBDIR $env(DESTDIR)$env(TCLLIBDIR)
|
||||
set LIBDIR_INSTALL $env(TCLLIBDIR)
|
||||
set LIBNAME [file tail $LIBFILE]
|
||||
set LIB $LIBDIR/sqlite3/$LIBNAME
|
||||
set LIB_INSTALL $LIBDIR_INSTALL/sqlite3/$LIBNAME
|
||||
|
||||
file delete -force $LIBDIR/sqlite3
|
||||
file mkdir $LIBDIR/sqlite3
|
||||
set fd [open $LIBDIR/sqlite3/pkgIndex.tcl w]
|
||||
puts $fd "package ifneeded sqlite3 $VERSION \[list load $LIB_INSTALL sqlite3\]"
|
||||
close $fd
|
||||
|
||||
# We cannot use [file copy] because that will just make a copy of
|
||||
# a symbolic link. We have to open and copy the file for ourselves.
|
||||
#
|
||||
set in [open $LIBFILE]
|
||||
fconfigure $in -translation binary
|
||||
set out [open $LIB w 0755]
|
||||
fconfigure $out -translation binary
|
||||
puts -nonewline $out [read $in]
|
||||
close $in
|
||||
close $out
|
Loading…
x
Reference in New Issue
Block a user