1 --- a/src/Makefile.global.in
2 +++ b/src/Makefile.global.in
3 @@ -120,7 +120,7 @@ libdir := @libdir@
5 ifeq "$(findstring pgsql, $(pkglibdir))" ""
6 ifeq "$(findstring postgres, $(pkglibdir))" ""
7 -override pkglibdir := $(pkglibdir)/postgresql
8 +override pkglibdir := $(pkglibdir)/postgresql/@PG_MAJORVERSION@/lib
12 @@ -168,7 +168,7 @@ endif # PGXS
14 # These derived path variables aren't separately configurable.
16 -includedir_server = $(pkgincludedir)/server
17 +includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server
18 includedir_internal = $(pkgincludedir)/internal
19 pgxsdir = $(pkglibdir)/pgxs
21 --- a/src/bin/pg_config/pg_config.c
22 +++ b/src/bin/pg_config/pg_config.c
25 #include "common/config_info.h"
27 +#include "../port/pg_config_paths.h"
29 static const char *progname;
32 @@ -148,11 +150,7 @@ main(int argc, char **argv)
36 - if (find_my_exec(argv[0], my_exec_path) < 0)
38 - fprintf(stderr, _("%s: could not find own program executable\n"), progname);
41 + snprintf(my_exec_path, sizeof(my_exec_path), "%s/%s", PGBINDIR, progname);
43 configdata = get_configdata(my_exec_path, &configdata_len);
44 /* no arguments -> print everything */