PQ_SYM=PQregisterEventProc
PHP_CHECK_LIBRARY(pq, $PQ_SYM, [
- LDFLAGS="$save_LDFLAGS"
PHP_ADD_LIBRARY_WITH_PATH(pq, $PQ_DIR/$PHP_LIBDIR, PQ_SHARED_LIBADD)
PHP_SUBST(PQ_SHARED_LIBADD)
],[
],[
-L$PQ_DIR/$PHP_LIBDIR
])
+ PHP_CHECK_LIBRARY(pq, PQlibVersion, AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion))
PQ_SRC="src/php_pq.c"
- PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
PHP_NEW_EXTENSION(pq, $PQ_SRC, $ext_shared)
+ PHP_ADD_BUILD_DIR($ext_builddir/src, 1)
fi
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<package
+ packagerversion="1.4.11"
+ version="2.0"
+ xmlns="http://pear.php.net/dtd/package-2.0"
+ xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
+http://pear.php.net/dtd/tasks-1.0.xsd
+http://pear.php.net/dtd/package-2.0
+http://pear.php.net/dtd/package-2.0.xsd">
+ <name>pq</name>
+ <channel>pecl.php.net</channel>
+ <summary>libpq binding</summary>
+ <description>Binding for libpq (PostgreSQL client library)</description>
+ <lead>
+ <name>Michael Wallner</name>
+ <user>mike</user>
+ <email>mike@php.net</email>
+ <active>yes</active>
+ </lead>
+ <date>2013-01-31</date>
+ <version>
+ <release>1.0.0dev</release>
+ <api>1.0.0</api>
+ </version>
+ <stability>
+ <release>beta</release>
+ <api>beta</api>
+ </stability>
+ <license>BSD, revised</license>
+ <notes><![CDATA[
+* Initial release
+]]></notes>
+ <contents>
+ <dir name="/">
+ <file role="doc" name="CREDITS" />
+ <file role="doc" name="EXPERIMENTAL" />
+ <file role="doc" name="LICENSE" />
+ <file role="src" name="config.m4" />
+ <dir name="src">
+ <file role="src" name="php_pq.h" />
+ <file role="src" name="php_pq.c" />
+ </dir>
+ <dir name="tests">
+ <file role="test" name="async001.phpt" />
+ <file role="test" name="async002.phpt" />
+ <file role="test" name="async003.phpt" />
+ <file role="test" name="async004.phpt" />
+ <file role="test" name="async005.phpt" />
+ <file role="test" name="async006.phpt" />
+ <file role="test" name="basic001.phpt" />
+ <file role="test" name="basic002.phpt" />
+ <file role="test" name="cancel001.phpt" />
+ <file role="test" name="copy001.phpt" />
+ <file role="test" name="lob001.phpt" />
+ <file role="test" name="map001.phpt" />
+ <file role="test" name="notify001.phpt" />
+ <file role="test" name="reset001.phpt" />
+ <file role="test" name="savepoint001.phpt" />
+ <file role="test" name="stm_desc001.phpt" />
+ <file role="test" name="trans001.phpt" />
+ <file role="test" name="_setup.inc" />
+ <file role="test" name="_skipif.inc" />
+ </dir>
+ </dir>
+ </contents>
+ <dependencies>
+ <required>
+ <php>
+ <min>5.4</min>
+ </php>
+ <pearinstaller>
+ <min>1.4.0</min>
+ </pearinstaller>
+ </required>
+ </dependencies>
+ <providesextension>pq</providesextension>
+ <extsrcrelease>
+ <configureoption default="yes" name="with-pq" prompt="whether to enable libpq support" />
+ </extsrcrelease>
+</package>
+
*/
static PHP_MINFO_FUNCTION(pq)
{
+ int libpq_v;
+ char libpq_version[10] = "pre-9.1";
+
php_info_print_table_start();
- php_info_print_table_header(2, "pq support", "enabled");
+ php_info_print_table_header(2, "PQ Support", "enabled");
+ php_info_print_table_row(2, "Extension Version", PHP_PQ_EXT_VERSION);
+ php_info_print_table_end();
+
+ php_info_print_table_start();
+ php_info_print_table_header(2, "Used Library", "Version");
+#ifdef HAVE_PQLIBVERSION
+ libpq_v = PQlibVersion();
+ slprintf(libpq_version, sizeof(libpq_version), "%d.%d.%d", libpq_v/10000%100, libpq_v/100%100, libpq_v%100);
+#endif
+ php_info_print_table_row(2, "libpq", libpq_version);
php_info_print_table_end();
/* Remove comments if you have entries in php.ini