Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 290 | magnus | 1 | From: Henrik Grubbström <grubba@grubba.org> |
| 2 | Date: Tue, 20 Sep 2016 15:53:02 +0200 |
||
| 3 | Subject: [PATCH] Build [Postgres]: Detect Postgres 10.x and later. |
||
| 4 | Origin: upstream, commit:0c397325d9de6f8bcb28020adc55e2c15b300955 |
||
| 5 | |||
| 6 | --- a/src/modules/Postgres/configure.in |
||
| 7 | +++ b/src/modules/Postgres/configure.in |
||
| 8 | @@ -112,7 +112,7 @@ dnl see if we can find the include files in any of the standard locations |
||
| 9 | fi |
||
| 10 | fi |
||
| 11 | |||
| 12 | -dnl final ckeck, just to be sure we did not mess up |
||
| 13 | +dnl final check, just to be sure we did not mess up |
||
| 14 | AC_CHECK_HEADERS(postgres.h postgres_fe.h \ |
||
| 15 | server/postgres.h server/postgres_fe.h \ |
||
| 16 | postgresql/server/postgres.h \ |
||
| 17 | @@ -137,6 +137,7 @@ PG_VERSION |
||
| 18 | HAVE_PG72=yes |
||
| 19 | AC_DEFINE(HAVE_PG72) |
||
| 20 | ], [ |
||
| 21 | + # Detect Postgres 8.x and 9.x. |
||
| 22 | AC_EGREP_CPP([\"[8-9]\..*], [ |
||
| 23 | #ifdef HAVE_POSTGRESQL_SERVER_PG_CONFIG_H |
||
| 24 | #include <postgresql/server/pg_config.h> |
||
| 25 | @@ -149,6 +150,21 @@ PG_VERSION |
||
| 26 | ], [ |
||
| 27 | HAVE_PG72=yes |
||
| 28 | AC_DEFINE(HAVE_PG72) |
||
| 29 | + ], [ |
||
| 30 | + # Detect Postgres 10.x and anything later. |
||
| 31 | + AC_EGREP_CPP([\"[1-9][0-9][0-9]*\..*], [ |
||
| 32 | +#ifdef HAVE_POSTGRESQL_SERVER_PG_CONFIG_H |
||
| 33 | +#include <postgresql/server/pg_config.h> |
||
| 34 | +#elif defined(HAVE_SERVER_PG_CONFIG_H) |
||
| 35 | +#include <server/pg_config.h> |
||
| 36 | +#elif defined(HAVE_PG_CONFIG_H) |
||
| 37 | +#include <pg_config.h> |
||
| 38 | +#endif |
||
| 39 | +PG_VERSION |
||
| 40 | + ], [ |
||
| 41 | + HAVE_PG72=yes |
||
| 42 | + AC_DEFINE(HAVE_PG72) |
||
| 43 | + ]) |
||
| 44 | ]) |
||
| 45 | ]) |
||
| 46 | |||
| 47 | -- |
||
| 48 | 2.17.1 |
||
| 49 |