> So then I saw something about the --with-openssl-dir option for 
> configure, and I ran configure again using:
>   ./configure --with-openssl-dir=/usr/local/ssl/include/openssl/

There is no 'with-openssl-dir' option that I can see:

$ grep -i ssl configure
$ 

But I suggest you try:

  LDFLAGS="-L/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/ssl/include" ./configure
  make

If that doesn't work, then post the contents of ext/openssl/mkmf.log here
for us to look at.

I remember that I had to do some trick like this to get ruby with openssl to
build on a Red Hat 9 box, but I don't have a note of what was the exact
command I had to run.

Regards,

Brian.