January 2007 Archives
01.31.2007 14:14
Installing sqsh on OS X 10.4
If forced to use an MS-SQL database, I find it much easier and
more convenient to use the excellent sqsh shell. On our Ubuntu boxes,
installing it was as simple as apt-get install sqsh.
Unfortunately, DarwinPorts doesn't include it. Building from source
was somewhat problematic due to OS X's none-GNU-readline readline.h
(it's actually part of the BSD editline library).
Here's what I needed to do:
-
Install FreeTDS:
port install freetds -
Download and untar sqsh.
-
Configure as you would normally, setting $SYBASE to point to the top of the FreeTDS install:
SYBASE=/opt/local ./configure --with-readline -
Edit
src/Makefileand appendfreetdsto line #18 so it looks like this:SYBASE_INCDIR = -I$(SYBASE_OCOS)/include/freetds -
Modify the header/library paths for libreadline to point to the version from DarwinPorts:
READLINE_LIBDIR = -L/opt/local/lib READLINE_INCDIR = -I/opt/local/include/ -
makeandmake install