SQLite Forum

Compiling sqlite3 with readline support
Login
Thanks, but I already figured it out. I don't know why the distributed configure script works for you but not for me, though. I ended up editing the configure script (patch at the end of this message). Then I had to set `LDFLAGS=-L/opt/local/lib` in the environment before running

```
../configure --prefix=/some-irrelevant-path --disable-editline --enable-readline --disable-tcl
make install
```

(disabling tcl because otherwise, it tries to install some tcl stuff in `/opt/local`). One problem that I encountered along the way is the system provided `/usr/lib/libreadline.dylib`, which is a symlink to `libedit.3.dylib`.

Now the shell works as it should.

But *editing the configure script*? I feel dirty. Someday, maybe I'll learn enough about autoconf to diagnose the problem better. But that day is not today.

```
--- configure
+++ configure
@@ -8691,12 +8691,12 @@
   soname_spec='${libname}${release}${major}$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'

-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /opt/local/lib"
+  sys_lib_dlsearch_path_spec='/opt/local/lib /lib /usr/lib'
   ;;

 dgux*)
   version_type=linux
   need_lib_prefix=no
@@ -11128,11 +11128,11 @@
   found="yes"
 else

 			found="no"
 			if test "$cross_compiling" != yes; then
-				for dir in /usr /usr/local /usr/local/readline /usr/contrib /mingw; do
+				for dir in /usr /opt/local /opt/local/readline /usr/contrib /mingw; do
 					for subdir in include include/readline; do
 						as_ac_File=`$as_echo "ac_cv_file_$dir/$subdir/readline.h" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dir/$subdir/readline.h" >&5
 $as_echo_n "checking for $dir/$subdir/readline.h... " >&6; }
 if eval \${$as_ac_File+:} false; then :
```