Issue with configure and SSL in 1.4.17 (res_crypto)

I am trying to build Asterisk on an old system. I can not change the OS on this. It is running Redhat ES 3.

I need to have res_crypto installed.

When I run configure, this is what I get:
[asterisk-1.4.17]# ./configure | grep ssl
checking for ssl2_connect in -lssl… yes
checking openssl/ssl.h usability… no
checking openssl/ssl.h presence… no
checking for openssl/ssl.h… no
[asterisk-1.4.17]#

And no big surprise, when I run make menuselect I get:

XXX 7. res_crypto

I have these packages installed:

[asterisk-1.4.17]# rpm -qa | grep ssl
openssl-0.9.7a-33.24
openssl-devel-0.9.7a-33.24
[asterisk-1.4.17]#

Lets check the integrity of the packages…

[asterisk-1.4.17]# rpm -qV rpm -qa | grep ssl
…T c /usr/share/ssl/certs/ca-bundle.crt
…T c /usr/share/ssl/openssl.cnf
[asterisk-1.4.17]#

Ok, nothing wrong with ssl.h

If I do some poking I see I do have ssl.h and it has some content:
[asterisk-1.4.17]# find /usr -name ssl.h -exec ls -l {} ;
-rw-r–r-- 1 root root 74519 Oct 22 07:58 /usr/include/openssl/ssl.h
[asterisk-1.4.17]#

Lets see the configure options for ssl…
[asterisk-1.4.17]# ./configure --help | grep ssl
–with-ssl=PATH use OpenSSL files in PATH
[asterisk-1.4.17]#

Ok that seems easy enough:
[asterisk-1.4.17]# ./configure --with-ssl=/usr
……
……
checking for ssl2_connect in -lssl… yes
checking /usr/include/openssl/ssl.h usability… no
checking /usr/include/openssl/ssl.h presence… no
checking for /usr/include/openssl/ssl.h… no
configure: ***
configure: *** It appears that you do not have the ssl development package installed.
configure: *** Please install it to include OpenSSL support, or re-run configure
configure: *** without explicitly specifying --with-ssl
[asterisk-1.4.17]#

Ok, WTF, lets make sure…
[asterisk-1.4.17]# more /usr/include/openssl/ssl.h
/* ssl/ssl.h /
/
Copyright © 1995-1998 Eric Young (eay@cryptsoft.com)

  • All rights reserved.
  • This package is an SSL implementation written
  • by Eric Young (eay@cryptsoft.com).
    …
    …

Dang, it seems to be there. Bug??

Even odder, lets see where it tries to look if we don’t specify a location…
[asterisk-1.4.17]# ./configure --with-ssl
….
….
checking openssl/ssl.h usability… no
checking openssl/ssl.h presence… no
checking for openssl/ssl.h… no
configure: ***
configure: *** It appears that you do not have the ssl development package installed.
configure: *** Please install it to include OpenSSL support, or re-run configure
configure: *** without explicitly specifying --with-ssl

Hmmmm, is it tacking only openssl/ssl.h on the end? Lets try with /usr/include this time…

./configure --with-ssl=/usr/include
….
….
checking for ssl2_connect in -lssl… yes
checking /usr/include/include/openssl/ssl.h usability… no
checking /usr/include/include/openssl/ssl.h presence… no
checking for /usr/include/include/openssl/ssl.h… no
configure: ***
configure: *** It appears that you do not have the ssl development package installed.
configure: *** Please install it to include OpenSSL support, or re-run configure
configure: *** without explicitly specifying --with-ssl

Odd… It seems to tack more on if you specify anything.

I have spent quite a while digging through the configure script, and it is very slow going for me. I am having a hard time figuring out how all of the tests work and where this is failing, or if this is a bug. I think I have eliminated all of the operator errors on ths one…

Has anybody else ran into this with 1.4.17?

Thanks!

–Matthew