Commit Graph

36 Commits

Author SHA1 Message Date
Christoph M. Becker
ce668c0ec6 PGSQL and POD_SQL: don't include pg_config.h
Even if that header file is available, we better consider it private,
and don't include it.  The information about whether SSL support is
enabled is now missing (`USE_(OPEN)SSL`), and it seems there is no
alternative way to get it (`PQinitSSL()` is always defined), so we
remove it from the PHP info.  Furthermore, the `PG_VERSION` and
`PG_VERSION_STR` macros are no longer available, but as of libpq 9.1
there is `PQlibVersion()` which allows us to construct `PG_VERSION` in
a most likely backwards compatible manner.  The additional information
available through `PG_VERSION_STR` is lost, though, so we define
`PGSQL_LIBPQ_VERSION_STR` basically as alias of `PGSQL_LIBPQ_VERSION`,
and deprecate it right away.

Since we are now requiring at least libpq 9.1, we can remove some
further compatibility code and additional checks.

Regarding the raised requirements: official support for PostGreSQL 9.0
ended on 2015-10-08, and even CentOS 7 already has PostGreSQL 9.2, so
this is not supposed to be too much of an issue.
2020-05-25 10:48:35 +02:00
Peter Kokot
94421e5724 Remove conditional calls of always available macros
These checks were once relevant for these extensions in PECL and PHP
versions without availability of the checked macros.

Closes GH-4405
2019-07-14 22:24:21 +02:00
Peter Kokot
a39ea91753 Simplify PHP_CHECK_PDO_INCLUDES calls
Conditional checks were once used for backwards compatibility with
phpize from PHP versions that didn't have this macro call yet.

Closes GH-4376
2019-07-08 10:24:41 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Eli Schwartz
bdd4eb2d9e ext/pdo_pgsql: drop unneeded code
This check was added in 0db373883f and
greps for a private implementation detail of the postgres headers,
removed in 3c4768d0d1

It hasn't worked as intended for 12 years, and can safely be assumed to
not be needed.
2018-12-09 17:15:58 +01:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Maxime BESSON
f384971552 Look for PDO include files in the right folder
Configure scripts for extensions look for PDO include files in
$prefix/include/php. This change makes them look into $phpincludedir
instead, which may be different from $prefix/include/php.
2015-02-06 12:06:29 +01:00
Matteo Beccati
b1ffea3ccc Drop PDO support for extremely old libpq versions
configure will now fail if any of the following function is missing:
* PQprepare
* PQexecParams
* PQescapeStringConn
* PQescapeByteaConn
2014-03-11 23:10:47 +01:00
Christopher Jones
c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -07:00
Rasmus Lerdorf
08792f6f9b Cache the pdo include path 2011-05-15 05:03:29 +00:00
Adam Harvey
9de1ad4cd2 Fix bug #54318 (Non-portable grep option used in PDO pgsql configuration).
Patch by Ben Walton <bwalton at artsci dot utoronto dot ca>.
2011-03-22 09:12:01 +00:00
Rasmus Lerdorf
937358ebc7 Revert attempt at supporting both autoconf 2.13 and
modern versions in the same build chain.  There are
simply too many broken things in 2.13 to make it work.
Cache handling is broken as well which is why I need
to revert the pdo_inc_path cache fix as well.

trunk is now 2.60+ only and I'll work on cleaning out
all the legacy cruft from there.
2009-11-29 06:13:22 +00:00
Rasmus Lerdorf
5a2b41a627 Someone strap down Jani and give him a sedative please.
This makes our toolchain work with the latest versions
of autoconf and avoids a lot of end-user grief.
2009-11-25 01:30:06 +00:00
Matteo Beccati
6e22ab5e3e MFH:
- Changed PDO_PGSQL configure script to require libpq 7.4
- Cleaned up usage of HAVE_PQ* defines
- Fixed compiler warnings
- Removed custom implementation of PQunescapeByte
# Rationale:
# - PDO_PGSQL couldn't even compile when using libpq 7.3
# - PostgreSQL 7.3 is unsupported since a long time
# - Got consensus from pgsql devs on freenode
2009-04-30 12:38:43 +00:00
Jani Taskinen
281352fe02 MFH: Fix PDO configure dependancy: If --disable-pdo is used, disable all
MFH: enabled-by-default drivers. Also error out if you try to configure
MFH: a driver as static but pdo is disabled.
2008-07-25 13:46:24 +00:00
Jani Taskinen
8af7bc2044 MFH: Fix some lib vs $PHP_LIBDIR issues 2007-07-31 13:02:00 +00:00
Jani Taskinen
0261432888 MFH 2007-07-11 21:51:55 +00:00
Jani Taskinen
cab5c25dc2 MFH:- Fixed bug #35981 (pdo-pgsql should not use pkg-config when not present) 2007-07-09 12:54:11 +00:00
Jani Taskinen
fb8aedb046 MFH 2007-07-09 12:38:02 +00:00
Ilia Alshanetsky
b43e18a70e Make quote() in PostgreSQL use PQescapeByteaConn() whenever possible for
binary strings.
2006-10-06 22:34:16 +00:00
Ilia Alshanetsky
40765184be Added support for character sets in PDO quote() method for PostgreSQL
8.1.4 and higher.
2006-10-04 23:53:36 +00:00
Wez Furlong
ba77f8515b prep for PECL release 2005-07-27 02:51:01 +00:00
Wez Furlong
529d8177fe Add early support for native prepared statements in pgsql.
Note that some tests now fail; if we can't resolve this in time for the beta,
the prepare code should be disabled (I'll add a flag for this later today).
2005-07-08 15:27:34 +00:00
Ilia Alshanetsky
6c332449f9 Use PQexecParams() when available, use original case in all other instances. 2005-07-07 13:35:39 +00:00
foobar
15cf2a60b0 - Added PHP_CHECK_PDO_INCLUDES macro (caches the result) 2005-06-14 00:00:53 +00:00
foobar
a20383ba06 - Unify the "configure --help" texts 2005-05-29 23:17:16 +00:00
Wez Furlong
4f778ca31d patch by Christopher Kings-Lynne, slightly modified 2005-05-13 18:09:03 +00:00
Rasmus Lerdorf
99f832a206 If pdo is disabled, skip all the pdo extensions. 2005-02-28 08:18:47 +00:00
Wez Furlong
55f53a5a96 symlinked pdo drivers under ext.
Enabled PDO and PDO_SQLITE by default.
Fixup PDO header detection so that it searches in the correct order, and
correctly picks up the headers when building from outside of the source
tree.

TODO: make pdo_XXX auto-enable when XXX is enabled.  Volunteers welcome.
2005-02-17 04:23:15 +00:00
Hartmut Holzgraefe
1f98a966c5 fix aclocal "underquoted argument" warnings 2005-02-13 07:31:02 +00:00
Wez Furlong
c28a0b9fcb disable dep 2005-02-09 05:18:02 +00:00
Wez Furlong
0db373883f detect funky kerberos deps that chain on from openssl deps on RH distros 2005-01-13 01:12:34 +00:00
Marcus Boerger
3bca709fbc Add missing module deps 2004-08-11 21:04:36 +00:00
Edin Kadribasic
9d6c259988 PostgreSQL PDO driver. 2004-05-20 02:27:49 +00:00