When OpenSSL lives in /usr then configure output will be: > checking for OpenSSL library... using openssl from /usr/ and /usr/include '/usr/' is obviously wrong. The root cause is in build/tcnative.m4. In the case of '"$use_openssl" = "/usr"' 'test -d $use_openssl/lib64 && ssllibdir=lib64 || ssllibdir=lib" is not executed', thus remains unset. The simplest fix is to move the dir test out of the if clause.
More over, the ssllibdir is always wrong on HP-UX. It has to be either lib/hpux32 or lib/hpux64.
Fix in 1.2.24 and onwards