mirror of https://github.com/citusdata/citus.git
Identify build and source directory of postgres we're compiling against.
That's useful when trying to rely on files only present in source and/or build directories, not in the normal installation. E.g. the isolationtester binary, or the valgrind suppression files.pull/917/head
parent
c3e1d49e34
commit
ce73ffdf2e
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
citus_abs_srcdir:=@abs_top_srcdir@/${citus_subdir}
|
citus_abs_srcdir:=@abs_top_srcdir@/${citus_subdir}
|
||||||
citus_abs_top_srcdir:=@abs_top_srcdir@
|
citus_abs_top_srcdir:=@abs_top_srcdir@
|
||||||
|
postgres_abs_srcdir:=@POSTGRES_SRCDIR@
|
||||||
|
postgres_abs_builddir:=@POSTGRES_BUILDDIR@
|
||||||
|
|
||||||
PG_CONFIG:=@PG_CONFIG@
|
PG_CONFIG:=@PG_CONFIG@
|
||||||
PGXS:=$(shell $(PG_CONFIG) --pgxs)
|
PGXS:=$(shell $(PG_CONFIG) --pgxs)
|
||||||
|
|
||||||
|
|
|
@ -586,6 +586,8 @@ PACKAGE_URL=''
|
||||||
|
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
|
POSTGRES_BUILDDIR
|
||||||
|
POSTGRES_SRCDIR
|
||||||
CITUS_CFLAGS
|
CITUS_CFLAGS
|
||||||
OBJEXT
|
OBJEXT
|
||||||
EXEEXT
|
EXEEXT
|
||||||
|
@ -2540,6 +2542,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||||
|
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
# Locate source and build directory of the postgres we're building
|
||||||
|
# against. Can't rely on either still being present, but e.g. optional
|
||||||
|
# test infrastructure can rely on it.
|
||||||
|
POSTGRES_SRCDIR=$(grep ^abs_top_srcdir $(dirname $($PG_CONFIG --pgxs))/../Makefile.global|cut -d ' ' -f3-)
|
||||||
|
POSTGRES_BUILDDIR=$(grep ^abs_top_builddir $(dirname $($PG_CONFIG --pgxs))/../Makefile.global|cut -d ' ' -f3-)
|
||||||
|
|
||||||
|
|
||||||
# check for a number of CFLAGS that make development easier
|
# check for a number of CFLAGS that make development easier
|
||||||
|
|
||||||
# CITUSAC_PROG_CC_CFLAGS_OPT
|
# CITUSAC_PROG_CC_CFLAGS_OPT
|
||||||
|
@ -2938,6 +2948,10 @@ fi
|
||||||
|
|
||||||
CITUS_CFLAGS="$CITUS_CFLAGS"
|
CITUS_CFLAGS="$CITUS_CFLAGS"
|
||||||
|
|
||||||
|
POSTGRES_SRCDIR="$POSTGRES_SRCDIR"
|
||||||
|
|
||||||
|
POSTGRES_BUILDDIR="$POSTGRES_BUILDDIR"
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile.global"
|
ac_config_files="$ac_config_files Makefile.global"
|
||||||
|
|
||||||
|
|
10
configure.in
10
configure.in
|
@ -63,6 +63,14 @@ SAVE_CFLAGS="$CFLAGS"
|
||||||
AC_PROG_CC([$($PG_CONFIG --cc)])
|
AC_PROG_CC([$($PG_CONFIG --cc)])
|
||||||
CFLAGS="$SAVE_CFLAGS"
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
|
||||||
|
|
||||||
|
# Locate source and build directory of the postgres we're building
|
||||||
|
# against. Can't rely on either still being present, but e.g. optional
|
||||||
|
# test infrastructure can rely on it.
|
||||||
|
POSTGRES_SRCDIR=$(grep ^abs_top_srcdir $(dirname $($PG_CONFIG --pgxs))/../Makefile.global|cut -d ' ' -f3-)
|
||||||
|
POSTGRES_BUILDDIR=$(grep ^abs_top_builddir $(dirname $($PG_CONFIG --pgxs))/../Makefile.global|cut -d ' ' -f3-)
|
||||||
|
|
||||||
|
|
||||||
# check for a number of CFLAGS that make development easier
|
# check for a number of CFLAGS that make development easier
|
||||||
|
|
||||||
# CITUSAC_PROG_CC_CFLAGS_OPT
|
# CITUSAC_PROG_CC_CFLAGS_OPT
|
||||||
|
@ -102,6 +110,8 @@ CITUSAC_PROG_CC_CFLAGS_OPT([-Wmissing-declarations])
|
||||||
CITUSAC_PROG_CC_CFLAGS_OPT([-Wmissing-prototypes])
|
CITUSAC_PROG_CC_CFLAGS_OPT([-Wmissing-prototypes])
|
||||||
|
|
||||||
AC_SUBST(CITUS_CFLAGS, "$CITUS_CFLAGS")
|
AC_SUBST(CITUS_CFLAGS, "$CITUS_CFLAGS")
|
||||||
|
AC_SUBST(POSTGRES_SRCDIR, "$POSTGRES_SRCDIR")
|
||||||
|
AC_SUBST(POSTGRES_BUILDDIR, "$POSTGRES_BUILDDIR")
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile.global])
|
AC_CONFIG_FILES([Makefile.global])
|
||||||
AC_CONFIG_HEADERS([src/include/citus_config.h])
|
AC_CONFIG_HEADERS([src/include/citus_config.h])
|
||||||
|
|
Loading…
Reference in New Issue