php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35981 pdo-pgsql shouldn't use pkg-config when it is not present
Submitted: 2006-01-12 18:03 UTC Modified: 2007-07-09 12:55 UTC
From: flconseil at yahoo dot fr Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5.1.2 OS: HP-UX
Private report: No CVE-ID: None
 [2006-01-12 18:03 UTC] flconseil at yahoo dot fr
Description:
------------
Compiling PHP 5.1.2 on HP-UX 11.11 with pgsql 8.1.1 and OpenSSL support.

I don't have pkg-config on my system. configure gets it right at the beginning : checking for pkg-config... no

Then, in the pdo-pgsql section, I get :
  checking for openssl dependencies... yes
  ./configure[75167]: pkg-config:  not found.

I think that this code in ext/pdo_pgsql/config.m4 should be modified :

  AC_MSG_CHECKING([for openssl dependencies])
  if grep -q openssl $PGSQL_INCLUDE/libpq-fe.h ; then
         AC_MSG_RESULT([yes])
         if pkg-config openssl ; then
      PDO_PGSQL_CFLAGS="`pkg-config openssl --cflags`"
    fi
  else
         AC_MSG_RESULT([no])
  fi

There should be an alternate check for systems without pkg-config. Or pkg-config should be listed as a pre-requisite, which is not the case, is it ?

I cannot tell you more on a possible solution as I don't know exactly what pkg-config is supposed to say in this case.

In my case, after building and installing PHP, it seems to work OK. I didn't try pdo_pgsql more than loading it and checking in phpinfo that it is seen as enabled, but I didn't have any other error message during compile.

Reproduce code:
---------------
configure ... --with-pdo-pgsql=shared,<DIR>


Expected result:
----------------
Correct SSL dependencies even if pkg-config is not installed.

Actual result:
--------------
  checking for openssl dependencies... yes
  ./configure[75167]: pkg-config:  not found.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-09 12:55 UTC] jani@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC