title: php7 configure: error: libcrypto not found
body: <p>I am compiling php-7.3.22 with</p>
  <pre><code>'./configure' \
  '--prefix=/usr/local/php7' \
  '--with-apxs2=/usr/local/apache2/bin/apxs' \
  '--with-config-file-path=/usr/local/php7/conf' \
  '--with-curl=/usr' \
  '--with-openssl=/usr/local/ssl' \
  '--with-openssl-dir=/usr/local/ssl'
  </code></pre>
  <p>I am getting getting the following error during the configure:</p>
  <pre><code>checking for pkg-config... /bin/pkg-config
  checking for OpenSSL version... &gt;= 1.0.1
  checking for CRYPTO_free in -lcrypto... no
  configure: error: libcrypto not found!
  </code></pre>
  <p>Following is the OS info:</p>
  <pre><code>**$ uname -a**
  Linux internal 4.18.0-193.19.1.el8_2.x86_64 #1 SMP Wed Aug 26 15:29:02 EDT 2020 x86_6                           4 x86_64 x86_64 GNU/Linux
  
  **$ cat /etc/redhat-release**
  Red Hat Enterprise Linux release 8.2 (Ootpa)
  </code></pre>
  <p>I have installed openss-1.1.1h</p>
  <pre><code>sudo ./config --prefix=/usr/local/ss/ --openssldir=/usr/local/ssl shared
  sudo make
  sudo make test
  sudo make install
  </code></pre>
  <p>OpenSSL is installed and reporting its correct version:</p>
  <pre><code>$ /usr/local/ssl/bin/openssl version
  OpenSSL 1.1.1h  22 Sep 2020 (Library: OpenSSL 1.1.1c FIPS  28 May 2019)
  </code></pre>
  <p>lib folder shows libcrypto is there.</p>
  <pre><code>$ ls -al /usr/local/ssl/lib/
  total 10464
  drwxr-xr-x.  4 root root     159 Sep 24 15:20 .
  drwxr-xr-x. 10 root root     201 Sep 24 15:20 ..
  drwxr-xr-x.  2 root root      55 Sep 24 15:20 engines-1.1
  -rw-r--r--.  1 root root 5635122 Sep 24 15:20 libcrypto.a
  lrwxrwxrwx.  1 root root      16 Sep 24 15:20 libcrypto.so -&gt; libcrypto.so.1.1
  -rwxr-xr-x.  1 root root 3359896 Sep 24 15:20 libcrypto.so.1.1
  -rw-r--r--.  1 root root 1027768 Sep 24 15:20 libssl.a
  lrwxrwxrwx.  1 root root      13 Sep 24 15:20 libssl.so -&gt; libssl.so.1.1
  -rwxr-xr-x.  1 root root  686168 Sep 24 15:20 libssl.so.1.1
  drwxr-xr-x.  2 root root      61 Sep 24 01:46 pkgconfig
  </code></pre>
  <p>libcrypto files are all there.</p>
  <pre><code>$ sudo find /  -name &quot;libcrypto*so*&quot;
  /usr/lib64/libcrypto.so.1.1
  /usr/lib64/libcrypto.so.1.1.1c
  /usr/lib64/libcrypto.so
  /usr/local/src/openssl-1.1.1h/libcrypto.so.1.1
  /usr/local/src/openssl-1.1.1h/libcrypto.so
  /usr/local/ssl/lib/libcrypto.so.1.1
  /usr/local/ssl/lib/libcrypto.so
  </code></pre>
  <p>OS is also installed with Vendor supplied OpenSSL</p>
  <pre><code>$ rpm -qa | grep openssl
  openssl-devel-1.1.1c-15.el8.x86_64
  openssl-1.1.1c-15.el8.x86_64
  openssl-libs-1.1.1c-15.el8.x86_64
  openssl-pkcs11-0.4.10-2.el8.x86_64
  </code></pre>
  <p>Following info is from config.log</p>
  <pre><code>| /* Override any GCC internal prototype to avoid an error.
  |    Use char because int might match the return type of a GCC
  |    builtin and then its argument prototype would still apply.  */
  | #ifdef __cplusplus
  | extern &quot;C&quot;
  | #endif
  | char CRYPTO_free ();
  | int
  | main ()
  | {
  | return CRYPTO_free ();
  |   ;
  |   return 0;
  | }
  configure:19188: result: no
  configure:19226: error: libcrypto not found!
  
  ## ---------------- ##
  </code></pre>
  <p>What am I missing?</p>