Index: doc/src/sgml/ref/pg_config-ref.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/pg_config-ref.sgml,v
retrieving revision 1.17
diff -c -c -r1.17 pg_config-ref.sgml
*** doc/src/sgml/ref/pg_config-ref.sgml	29 Nov 2003 19:51:39 -0000	1.17
--- doc/src/sgml/ref/pg_config-ref.sgml	2 Aug 2004 12:31:43 -0000
***************
*** 25,30 ****
--- 25,31 ----
      --includedir-server
      --libdir
      --pkglibdir
+     --pgxs
      --configure
      --version
     
***************
*** 101,106 ****
--- 102,116 ----
      
  
      
+      >
+      
+       
+        Print the location of extension makefiles.
+      
+      
+     
+ 
+     
       >
       
        
Index: src/bin/pg_config/pg_config.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_config/pg_config.c,v
retrieving revision 1.2
diff -c -c -r1.2 pg_config.c
*** src/bin/pg_config/pg_config.c	1 Aug 2004 14:01:36 -0000	1.2
--- src/bin/pg_config/pg_config.c	2 Aug 2004 12:31:48 -0000
***************
*** 43,48 ****
--- 43,49 ----
  	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,86 ****
--- 82,88 ----
  			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,141 ****
--- 138,148 ----
  			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);
  	}