kokizzu / plv8js

Automatically exported from code.google.com/p/plv8js
Other
0 stars 0 forks source link

[PATCH] Use `pg_config --includedir-server` for the include path #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi! Brandon Noard, my colleague at Socialtext, reported that when we have two 
Pg installations on the same instance that differs only by version, calling 
`pg_config --includedir` always returned the information for the higher-version 
one, but `pg_config --includedir-server` works correctly.

Given that PLV8 is meant to run in server side, would the following patch make 
sense to you?

Thanks again for the ongoing work on plv8!

Cheers,
Audrey

--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ PLV8_VERSION = 1.4.0
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)

-PG_VERSION_NUM := $(shell cat `$(PG_CONFIG) --includedir`/pg_config*.h \
+PG_VERSION_NUM := $(shell cat `$(PG_CONFIG) --includedir-server`/pg_config*.h \
                   | perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/')

 # set your custom C++ compler

Original issue reported on code.google.com by audreyt....@gmail.com on 10 Jun 2013 at 8:49

GoogleCodeExporter commented 9 years ago
I usually pass PG_CONFIG to make so that it points to the right directory.

$ make PG_CONFIG=/usr/local/pg92/bin/pg_config

I don't know why the patch works for him.

Original comment by umi.tan...@gmail.com on 11 Jun 2013 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by umi.tan...@gmail.com on 22 Jun 2013 at 10:35