1、首先安装 readline-6.2.tar.gz 库到文件件系统
这是为支持sqlite 控制台界面程序时的上下键选择历史记录的功能。
解压之后 ,进入目录 :
readline-6.2#./configure --host=arm-none-linux-gnueabi -prefix=/root/targetfs/usr
///注意 安裝目錄是指/root/targetfs/usr 而不是指/root/targetfs/usr/lib
make && make install
2、下载 sqlite-autoconf-3071300.tar.gz
解压后,进入目录。
sqlite-autoconf-3071300#
./configure --host=arm-none-linux-gnueabi -prefix=/root/targetfs/usr CFLAGS=-I/root/targetfs/usr/include LDFLAGS=-L/root/targetfs/usr/lib
其中“CFLAGS=-I/root/targetfs/usr/include LDFLAGS=-L/root/targetfs/usr/lib” 是引用上述交叉編譯的readline庫。
---配置後的結果如下--------
.........
hecking for a thread-safe mkdir -p... /bin/mkdir -p
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for library containing tgetent... -lncurses
checking for library containing readline... -lreadline
checking for readline... yes------------------------------------------>注意這一行
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... -ldl
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfilng deO
然后 make && make install