/ Check-in [3a049ca7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3a049ca761f36d0fdb3b5b5f254c00210b373e9e
User & Date: vapier 2009-01-28 04:46:15
Context
2009-01-28
04:46
regenerate autotools (CVS 6211) check-in: 813a3c96 user: vapier tags: trunk
04:46
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) check-in: 3a049ca7 user: vapier tags: trunk
02:55
Add testcase() macros for coverage in date.c. (CVS 6209) check-in: 90b42eba user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   105    105   #
   106    106   HAVE_TCL = @HAVE_TCL@
   107    107   
   108    108   # This is the command to use for tclsh - normally just "tclsh", but we may
   109    109   # know the specific version we want to use
   110    110   #
   111    111   TCLSH_CMD = @TCLSH_CMD@
          112  +
          113  +# Where do we want to install the tcl plugin
          114  +#
          115  +TCLLIBDIR = @TCLLIBDIR@
   112    116   
   113    117   # The suffix used on shared libraries.  Ex:  ".dll", ".so", ".dylib"
   114    118   #
   115    119   SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
   116    120   
   117    121   # If gcov support was enabled by the configure script, add the appropriate
   118    122   # flags here.  It's not always as easy as just having the user add the right
................................................................................
   456    460   libsqlite3.la:	$(LIBOBJ)
   457    461   	$(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
   458    462   		${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
   459    463   
   460    464   libtclsqlite3.la:	tclsqlite.lo libsqlite3.la
   461    465   	$(LTLINK) -o $@ tclsqlite.lo \
   462    466   		libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
   463         -                -rpath "$(libdir)/sqlite" \
   464         -		-version-info "8:6:8"
          467  +		-rpath "$(TCLLIBDIR)" \
          468  +		-version-info "8:6:8" \
          469  +		-avoid-version
   465    470   
   466    471   sqlite3$(TEXE):	$(TOP)/src/shell.c libsqlite3.la sqlite3.h
   467    472   	$(LTLINK) $(READLINE_FLAGS) \
   468    473   		-o $@ $(TOP)/src/shell.c libsqlite3.la \
   469    474   		$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
   470    475   
   471    476   # This target creates a directory named "tsrc" and fills it with
................................................................................
   764    769   	$(LTINSTALL) sqlite3$(BEXE) $(DESTDIR)$(bindir)
   765    770   	$(INSTALL) -d $(DESTDIR)$(includedir)
   766    771   	$(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(includedir)
   767    772   	$(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(includedir)
   768    773   	$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
   769    774   	$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
   770    775   
   771         -tcl_install:	libtclsqlite3.la
   772         -	$(TCLSH_CMD) $(TOP)/tclinstaller.tcl $(RELEASE)
          776  +pkgIndex.tcl:
          777  +	echo 'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3.so sqlite3]' > $@
          778  +tcl_install:	libtclsqlite3.la pkgIndex.tcl
          779  +	$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
          780  +	$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
          781  +	rm -f $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)/libtclsqlite3.a
          782  +	$(INSTALL) -m 0644 pkgIndex.tcl $(DESTDIR)$(TCLLIBDIR)
   773    783   
   774    784   clean:	
   775    785   	rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
   776    786   	rm -f sqlite3.h opcodes.*
   777    787   	rm -rf .libs .deps tsrc
   778    788   	rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz
   779    789   	rm -f mkkeywordhash$(BEXE) keywordhash.h

Changes to configure.ac.

    88     88   # the corresponding code.
    89     89   #
    90     90   AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
    91     91   
    92     92   dnl Put the RCS revision string after AC_INIT so that it will also
    93     93   dnl show in in configure.
    94     94   # The following RCS revision string applies to configure.in
    95         -# $Revision: 1.53 $
           95  +# $Revision: 1.54 $
    96     96   
    97     97   #########
    98     98   # Programs needed
    99     99   #
   100    100   AC_PROG_LIBTOOL
   101    101   AC_PROG_INSTALL
   102    102   AC_PROG_AWK
................................................................................
   135    135     # If we can't find a local tclsh, then building the amalgamation will fail.
   136    136     # We act as though --disable-amalgamation has been used.
   137    137     echo "Warning: can't find tclsh - defaulting to non-amalgamation build."
   138    138     USE_AMALGAMATION=0
   139    139     TCLSH_CMD="tclsh"
   140    140   fi
   141    141   AC_SUBST(TCLSH_CMD)
          142  +
          143  +AC_ARG_VAR([TCLLIBDIR], [Where to install tcl plugin])
          144  +if test "x${TCLLIBDIR+set}" != "xset" ; then
          145  +  TCLLIBDIR='$(libdir)'
          146  +  for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do
          147  +    TCLLIBDIR=$i
          148  +    break
          149  +  done
          150  +  TCLLIBDIR="${TCLLIBDIR}/sqlite3"
          151  +fi
   142    152   
   143    153   
   144    154   #########
   145    155   # Set up an appropriate program prefix
   146    156   #
   147    157   if test "$program_prefix" = "NONE"; then
   148    158     program_prefix=""

Deleted tclinstaller.tcl.

     1         -# This script attempts to install SQLite3 so that it can be used
     2         -# by TCL.  Invoke this script with single argument which is the
     3         -# version number of SQLite.  Example:
     4         -#
     5         -#    tclsh tclinstaller.tcl 3.0
     6         -#
     7         -set VERSION [lindex $argv 0]
     8         -set LIBFILE .libs/libtclsqlite3[info sharedlibextension]
     9         -if { ![info exists env(DESTDIR)] } { set env(DESTDIR) "" }
    10         -if { ![info exists env(TCLLIBDIR)] } { set env(TCLLIBDIR) [lindex $auto_path 0] }
    11         -set LIBDIR $env(DESTDIR)$env(TCLLIBDIR)
    12         -set LIBDIR_INSTALL $env(TCLLIBDIR)
    13         -set LIBNAME [file tail $LIBFILE]
    14         -set LIB $LIBDIR/sqlite3/$LIBNAME
    15         -set LIB_INSTALL $LIBDIR_INSTALL/sqlite3/$LIBNAME
    16         -
    17         -file delete -force $LIBDIR/sqlite3
    18         -file mkdir $LIBDIR/sqlite3
    19         -set fd [open $LIBDIR/sqlite3/pkgIndex.tcl w]
    20         -puts $fd "package ifneeded sqlite3 $VERSION \[list load $LIB_INSTALL sqlite3\]"
    21         -close $fd
    22         -
    23         -# We cannot use [file copy] because that will just make a copy of
    24         -# a symbolic link.  We have to open and copy the file for ourselves.
    25         -#
    26         -set in [open $LIBFILE]
    27         -fconfigure $in -translation binary
    28         -set out [open $LIB w 0755]
    29         -fconfigure $out -translation binary
    30         -puts -nonewline $out [read $in]
    31         -close $in
    32         -close $out