title: Failed compilation of php 7 with-gnupg on centos 7
body: <p>With reference to <a href="https://secure.php.net/manual/en/install.pecl.static.php" rel="nofollow noreferrer">Compiling PECL extensions statically into PHP</a>.</p>
  
  <p>I am trying to make a compilation of PHP 7.0.13 with --with-gnupg (gnupg-1.4.0):</p>
  
  <pre><code>./configure --prefix=/usr/local/php7013 --enable-fpm --with-fpm-user=lighttpd2 --with-fpm-group=lighttpd2  --enable-bcmath --with-gnupg
  </code></pre>
  
  <p>Part of the output regarding gnupg:</p>
  
  <pre><code>checking for gnupg support... yes
  checking for gnupg files in default path... found in /usr/include
  checking for gpgme_check_version in -lgpgme... yes
  checking for gpg... /usr/bin/gpg
  </code></pre>
  
  <p>But then it fails with:</p>
  
  <pre><code>/usr/bin/ld: ext/gnupg/gnupg_keylistiterator.o: undefined reference to symbol 'gpg_strerror'
  /usr/bin/ld: note: 'gpg_strerror' is defined in DSO /lib64/libgpg-error.so.0 so try adding it to the linker command line
  /lib64/libgpg-error.so.0: could not read symbols: Invalid operation
  collect2: error: ld returned 1 exit status
  make: *** [sapi/cli/php] Error 1
  </code></pre>
  
  <p>What is going wrong?</p>