Rev 4590 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#! /bin/sh# This is a hand-written shell scriptif test ! -d src/SQLite; then(cd src; gzip -dc ../sqlite-3*.tar.gz | tar -xf -)(cd src; ln -s sqlite-3* SQLite)(cd src/SQLite; mv src/sqliteInt.h src/sqliteInt.h.orig; sed -e 's/MAX_ATTACHED 10/MAX_ATTACHED 31/' src/sqliteInt.h.orig > src/sqliteInt.h)fiif test ! -f src/SQLite/Makefile; then: ${R_HOME=`R RHOME`}if test -z "${R_HOME}"; thenecho "could not determine R_HOME"exit 1fiCC=`${R_HOME}/bin/R CMD config CC`# we need to force a PIC build of a static libraryCFLAGS=`${R_HOME}/bin/R CMD config CFLAGS`CPICFLAGS=`${R_HOME}/bin/R CMD config CPICFLAGS`CFLAGS="${CFLAGS} ${CPICFLAGS}"export CC CFLAGS(cd src/SQLite; sed -e '/^#include.*stdlib.h/a\#include <unistd.h>' tool/lemon.c > lemon.c.tmp; mv lemon.c.tmp tool/lemon.c; ./configure --disable-shared)fi(cd src/SQLite; make)# we need to pick up the library containing fdatasyncTLIBS=`sed -n -e'/^TLIBS =/p' src/SQLite/Makefile | sed -e's/^TLIBS = //' `sed -e "s/@TLIBS@/${TLIBS}/" src/Makevars.in > src/Makevars