Can't compile with OpenSSL

Plot Lost <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
If I compile without open SSL, all goes as expected and free tds is able to
connect to the server (ms sql server, using sqsh to connect)

However, once I reconfigure to use it (./configure --with-openssl) any
attempt to compile then fails, stopping with:

gcc -pthread -g -O2 -I/usr/local/ssl/include -Wdeclaration-after-statement
-o .libs/fisql fisql.o terminal.o edit.o handlers.o interrupt.o
-L/usr/local/ssl/lib ../../dblib/.libs/libsybdb.so
../../replacements/.libs/libreplacements.a -lssl -lcrypto -lrt
../../dblib/.libs/libsybdb.so: undefined reference to `dlsym'
../../dblib/.libs/libsybdb.so: undefined reference to `dlerror'
../../dblib/.libs/libsybdb.so: undefined reference to `dladdr'
../../dblib/.libs/libsybdb.so: undefined reference to `dlopen'
../../dblib/.libs/libsybdb.so: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[3]: *** [fisql] Error 1
make[3]: Leaving directory `/home/db/downloads/freetds-0.82/src/apps/fisql'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/db/downloads/freetds-0.82/src/apps'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/db/downloads/freetds-0.82/src'
make: *** [all-recursive] Error 1

Can anyone shed any light as to what might be causing this, and what I can
do to fix it?

System is running ubuntu 9.10, 32 bit. gcc version 4.3.3 (Ubuntu
4.3.3-5ubuntu4).  OpenSSL 0.9.8l

Thanks.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.