aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-08-02 12:34:14 +0000
committerBruce Momjian <bruce@momjian.us>2004-08-02 12:34:14 +0000
commite3b8530cc39b5114bd6a22c1c10418a5040b3773 (patch)
tree15806397fef71554ab9eef41b3af5dd8b480bf4a
parentf0efe26402499f11e3f93459f0f87b666f1a0c56 (diff)
downloadpostgresql-e3b8530cc39b5114bd6a22c1c10418a5040b3773.tar.gz
postgresql-e3b8530cc39b5114bd6a22c1c10418a5040b3773.zip
Readd pg_config --pgxs code.
-rw-r--r--doc/src/sgml/ref/pg_config-ref.sgml12
-rw-r--r--src/bin/pg_config/pg_config.c9
2 files changed, 19 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/pg_config-ref.sgml b/doc/src/sgml/ref/pg_config-ref.sgml
index bab5883b8db..d7ef8946a24 100644
--- a/doc/src/sgml/ref/pg_config-ref.sgml
+++ b/doc/src/sgml/ref/pg_config-ref.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.17 2003/11/29 19:51:39 pgsql Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_config-ref.sgml,v 1.18 2004/08/02 12:34:14 momjian Exp $ -->
<refentry id="app-pgconfig">
<refmeta>
@@ -25,6 +25,7 @@
<arg>--includedir-server</arg>
<arg>--libdir</arg>
<arg>--pkglibdir</arg>
+ <arg>--pgxs</arg>
<arg>--configure</arg>
<arg>--version</arg>
</group>
@@ -101,6 +102,15 @@
</varlistentry>
<varlistentry>
+ <term><option>--pgxs</option></>
+ <listitem>
+ <para>
+ Print the location of extension makefiles.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--configure</option></>
<listitem>
<para>
diff --git a/src/bin/pg_config/pg_config.c b/src/bin/pg_config/pg_config.c
index 62b80145e00..b3480ffb5ff 100644
--- a/src/bin/pg_config/pg_config.c
+++ b/src/bin/pg_config/pg_config.c
@@ -17,7 +17,7 @@
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.2 2004/08/01 14:01:36 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.3 2004/08/02 12:34:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,6 +43,7 @@ help()
printf(_(" --includedir-server show location of C header files for the server\n"));
printf(_(" --libdir show location of object code libraries\n"));
printf(_(" --pkglibdir show location of dynamically loadable modules\n"));
+ printf(_(" --pgxs show location of extension makefile\n"));
printf(_(" --configure show options given to 'configure' script when\n"));
printf(_(" PostgreSQL was built\n"));
printf(_(" --version show the PostgreSQL version, then exit\n"));
@@ -81,6 +82,7 @@ main (int argc, char ** argv)
strcmp(argv[i],"--includedir-server") == 0 ||
strcmp(argv[i],"--libdir") == 0 ||
strcmp(argv[i],"--pkglibdir") == 0 ||
+ strcmp(argv[i],"--pgxs") == 0 ||
strcmp(argv[i],"--configure") == 0)
{
/* come back to these later */
@@ -136,6 +138,11 @@ main (int argc, char ** argv)
get_lib_path(mypath,otherpath);
else if (strcmp(argv[i],"--pkglibdir") == 0)
get_pkglib_path(mypath,otherpath);
+ else if (strcmp(argv[i],"--pgxs") == 0)
+ {
+ get_pkglib_path(mypath,otherpath);
+ strncat(otherpath, "/pgxs", MAXPGPATH-1);
+ }
printf("%s\n",otherpath);
}