Readd pg_config --pgxs code.
authorBruce Momjian
Mon, 2 Aug 2004 12:34:14 +0000 (12:34 +0000)
committerBruce Momjian
Mon, 2 Aug 2004 12:34:14 +0000 (12:34 +0000)
doc/src/sgml/ref/pg_config-ref.sgml
src/bin/pg_config/pg_config.c

index bab5883b8dbcd98675aab5ea7b177161f9537531..d7ef8946a24c4ea2852865680b50add525893abc 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  
@@ -25,6 +25,7 @@
     --includedir-server
     --libdir
     --pkglibdir
+    --pgxs
     --configure
     --version
    
      
     
 
+    
+     
+     
+      
+       Print the location of extension makefiles.
+     
+     
+    
+
     
      
      
index 62b80145e00c8707f289c42a1129a923d614d96b..b3480ffb5ff685e35dad756f4980fb1d16361f72 100644 (file)
@@ -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);
    }